Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://966543]
help
Chatterbox?
[stevieb]: in a C++ header file, if a function declaration is listed twice with each listing containing different params, that's just essentially allowing one function accept two different arg lists, yes?
[stevieb]: int func(int x, int y);
[stevieb]: int func(int x);
[stevieb]: For example

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2017-06-28 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (653 votes). Check out past polls.