Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Importing Dependency Version

by Khen1950fx (Canon)
on Oct 11, 2013 at 03:17 UTC ( #1057806=note: print w/ replies, xml ) Need Help??

in reply to Importing Dependency Version

FWIW, the parameter for lib must be a directory and not a file. Here's what I tried with Exporter-5.67:

#!/usr/bin/perl -l BEGIN { unshift @INC, '/root/mylib/lib'; } use strict; use warnings; require Exporter; use Email::Date::Format; use lib '/root/mylib/lib'; print "Email::Date::Format: ", $Email::Date::Format::VERSION; print "Exporter: ", $Exporter::VERSION;

Comment on Re: Importing Dependency Version
Download Code
Replies are listed 'Best First'.
Re^2: Importing Dependency Version
by perldc (Initiate) on Oct 14, 2013 at 14:16 UTC
    That script seems to work and use the Exporter in my projects lib directory. I'm not sure why but I was using:
    use strict; use warnings; use lib qw{./lib}; print "Email::Date::Format: ", $Email::Date::Format::VERSION; print "Exporter: ", $Exporter::VERSION;
    which did not work. Simply moving the use warnings; to the end does work.
    use strict; use lib qw{./lib}; use warnings; print "Email::Date::Format: ", $Email::Date::Format::VERSION; print "Exporter: ", $Exporter::VERSION;
    Apparently there is a special order to for "use" which I did not know about.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1057806]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2015-11-28 20:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (744 votes), past polls