Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Help adding paths to @INC

by tospo (Hermit)
on Apr 23, 2012 at 08:15 UTC ( [id://966543]=note: print w/replies, xml ) Need Help??


in reply to Help adding paths to @INC

using
use lib [...]
is ok if all your scripts need to use that paths in all your environments, but that doesn't seem to be what you need.
A better way of controlling include paths that would allow you to manage the different requirements of different servers is to use local::lib. It may seem a bit complicated at first but it really isn't. Just follow the description of "The bootstrapping technique" to set up your local library path in the .bashrc (or csh/tcsh whatever you are using) script in the $HOME dir of each machine.
What that is doing is to set the PERL5LIB and some other environment variables for you so that a) @INC will include the correct path on each machine and b) modules will automatically be installed into the correct path using cpan(p|m).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-25 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found