Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a directory to the Perl library path at the system level?

On a standard linux set up, where can I add a directory to the @INC variable?

In the /etc/profile file, I added:

 export PERLLIB=$PERLLIB:/foo/bar
 export PERL5LIB=$PERL5LIB:/foo/bar

Thanks

like image 727
paulj3000 Avatar asked Mar 25 '10 19:03

paulj3000


1 Answers

If you want every Perl script to have the additional library paths, you can re-compile Perl and specify the extra directories as part of the setup. Other than that, you're stuck with the ad hoc methods as you describe.

like image 129
brian d foy Avatar answered Oct 23 '22 04:10

brian d foy