Hi, So can't I set PERL5LIB so that the perl will search first my local lib directory and then system lib directory.
Something like setting PATH variable to /usr/local/bin and then /usr/bin.
I want to do this because certain CPAN modueles which I use in my program are of higher version than the default version installed by perl. And I dont want to upgrade the system modules and still use the newer once to be used by CPAN modules.
Thanks, Manish
On 04/15/2005 06:23 PM, Zentara wrote:
On Thu, 14 Apr 2005 18:27:23 +0530, [EMAIL PROTECTED] (Manish Sapariya) wrote:
Hi List, I have default MIME module installed and I have installed the lated version in one of my own directory.
Any my perl code needs the latest version which I have installed in local_perl_lib.
How do I instruct perl interpreter to use the latest one in the $PERL5LIB and not the one in the default installation.
When perl searchs @INC for modules, it will grab the first one it finds that matches the name. So what you want to do is
make sure that 'local_perl_lib' is first in the array.
At the top of your script put:
BEGIN { unshift(@INC, 'local_perl_lib')}
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>