On Dec 20, 2003, at 2:33 AM, christopher j bottaro wrote:
on my system, perl looks for modules in /usr/lib/perl5/5.8.0/. how can i
specify an additional path to look for modules in? say for
instance, /home/cjb/perlmodules/ in addition to the aforementioned path.
first off, if I may recommend it, you might want to be a bit more 'old school' about this.
My personal OCD is to lay things out
$HOME/bin # where my apps go $HOME/lib # where lib things go perl5/ # the perl stuff java/ # jave stuff... <stuff>/ # where the stuff stuff goes $HOME/include # where headers are installed $HOME/etc # where config foo goes $HOME/proj # where we do projects
What this will allow you do to is install in your home directories the whole mess of marvels - including those 'lib_foo.[so|dll|a|dynlib|<buzzPhraseHere>' which will be required to build certain perl modules.
But the big win in this game is that once you like your code well enough to share it with friends, then you can advertise it, because it will be using
#!/usr/bin/perl use strict; use warnings; use FindBin qw($RealBin); use lib "$RealBin/../lib/perl5";
# use lib "$ENV{HOME}/lib/perl5"; # now the module call out list is here use myCool::New::Module; # rest of the code here...
hence whether they opt to pre-pend your personal bin directory, or put in a symbolic link into their personal bin directory pointing at your code, the perl code will do the right thing.
What you might want is to use the
PERL5LIB
environmental variable - may I recommend that you have an alternative profile that you source when doing that type of development, so that when you want to see that it is all self contained in the perl script you run the code without the environmental variable.
But personally I would bug the system administrator with why having the Foo::Bar module is just something that they can not live without - hence get them to install it in the classical CPAN style way into the site_perl or vendor_perl space.
{ trust me, I have that argument with myself regularly. }
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>