Results 1 to 4 of 4
Hi.
I have folder where I have lots of .pm files.
Now I would like to add path into @INC variable, because I don't want add this line in every ...
- 05-08-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 13
How to add path into @INC variable?
Hi.
I have folder where I have lots of .pm files.
Now I would like to add path into @INC variable, because I don't want add this line in every perl script
use lib /path...
How can I add path into the @INC variable ?
- 05-08-2007 #2
First of all, Google is your friend. Please use it!
There are several ways to do this, but given your situation I believe the best way to go about it is to define the environmental variable PERL5LIB, preferably in ~/.bashrc or something.Flies of a particular kind, i.e. time-flies, are fond of an arrow.
Registered Linux User #408794
- 05-08-2007 #3Just Joined!
- Join Date
- Apr 2007
- Posts
- 13
Javasnob.
I can't add any path into .bashrc etc.. because the user which uses these .pm files are nologin.
So user doesent have own home folder, .bashrc files etc...
- 05-08-2007 #4Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
perl takes -I option where you can specify the additional directories where it should search for modules.
The directories passed with -I (possibly with multiple -I instances) get added to @INC.
HTH
The Unforgiven
Registered Linux User #358564


Reply With Quote