SLUG Mailing List Archives
Re: [SLUG] How to add /usr/local/lib/perl/5.6.1/ to the perl @INC array in Debian
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] How to add /usr/local/lib/perl/5.6.1/ to the perl @INC array in Debian
- From: Mike Lake <Mike.Lake@xxxxxxxxxxxxxxxxx>
- Date: Sun, 3 Jul 2005 20:51:03 +1000
- User-agent: Mutt/1.5.6+20040907i
Michael Lake wrote:
> >I have a server with some CPAN modules in /usr/local/lib/perl/5.6.1/
> >perl is now 5.8 and is not finding the scripts in 5.6 An upgrade
> >occurred weeks ago so I dont know why this has occurrred just today or
> >maybe yesterday.
> >I probably need to add /usr/local/lib/perl/5.6.1/ to the @INC array
> >Does anyone know where this is set in Debian? I know that you can add
> >directories to the INC array via the -I command line invoking perl
> >but what scripts starts perl in Debian to add this so that all scripts
> >starting with /usr/bin/perl end up with the new @INC. I looked for env
> >vars also but didnt find it it anywhere.
I have fixed my problem with a quick hack.
A web application that needs the perl modules had failed as it could not find: Template.pm
This was in /usr/local/lib/perl/5.6.1/ and @INC looks for modules in /usr/local/lib/site_perl
I didnt have a directory usr/local/lib/site_perl so as @INC was already
looking there I made a symlink:
ln -s /usr/local/lib/perl/5.6.1/ /usr/local/lib/site_perl
Thus Template.pm was found. This does not mean that all other modules
will work. I think there will be other probs taht I have that I will
find soon enough.
I have two options:
1. Carefully one-by-one install the modules that are required into perl
5.8 via the normal process accepting the defaults. @INC looks for them in
5.8 directories before site_perl.
Eventually then remove the symlink.
2. Install the packages again but install download the newest from CPAN
and install them to usr/local/lib/site_perl so they are never missed
again when perl goes to 5.9 or 6.0
My question is where do folks store your CPAN moduless on machines so that they are not
'orphaned' when perl gets to 5.9?
Caver, Linux enthusiast and interested in anything technical.