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 ( #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).


Comment on Re: Help adding paths to @INC
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-11-27 01:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (178 votes), past polls