Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: 'use lib' versus '-I'

by htoug (Deacon)
on Nov 30, 2004 at 18:05 UTC ( #411233=note: print w/ replies, xml ) Need Help??


in reply to 'use lib' versus '-I'

I assume use lib loads the module at another time than -I

Testing will show that -I and use lib does exactly the same:

$ perl -IDoc -Ilib -e 'print join(":", @INC), "\n";' Doc:lib:/usr/lib/perl5/5.8.3/i586-linux-thread-multi:... $ perl -e 'use lib qw(Doc lib); print join(":", @INC), "\n";' Doc:lib:/usr/lib/perl5/5.8.3/i586-linux-thread-multi:...
So your problems must stem from something else - probably that the current directory is not what you expect when running under mod_perl.

Try using absolute paths in your use libs.


Comment on Re: 'use lib' versus '-I'
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (15)
As of 2015-07-29 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls