[Za-pm] paths in @INC global special array
Anne Wainwright
anotheranne at fables.co.za
Thu Oct 23 11:06:00 PDT 2008
Hi,
Any one at home?
I upgraded my entire system (a Debian upgrade) for various reasons and now my perl is broken. Specifically the path
/usr/lib/perl/5.8.4
is not in the perl @INC array
so things like Dynaloader.pm , POSIX.pm , Config.pm, and other stuff do not get found when needed.
Following some googled help I did as follows
# PERL5LIB=/usr/lib/perl/5.8.4
# export PERL5LIB
success! for instance, an item that did not previously execute, like the following, did in fact now execute.
# perldoc lib .... now ran OK
Of course when I closed the terminal, and opened another the setting had evaporated.
So I now put this new environment variable into the .bashrc file.
# perl -V --> now shows the new path in @INC
[I note that if I try to update perl online that the configuration fails precisely because IO/File.pm cannot be found in @INC ... and of course it is in /usr/lib/perl/5.8.4 . How this happened I cannot say. Probably something yours truly did.]
Could I cheat the array and put a link to /usr/lib/perl/5.8.4 in one of the @INC paths? like in
/usr/local/lib/perl/5.8.4 (which exists with some stuff in) OR in ...
/usr/local/share/perl/5.8.4 ( which also exists with some other stuff in)
or just copy everything over into one of them even? haven't played with links or symlinks ever.
LATER ...
failure :( From my browser I am calling a cruddy.pl script in /var/www/cgi-bin . Despite $PERL5LIB the apache error.log reflects that Dynaloader.pm and other folowing modules are not found and lists the @INC paths which do _not_ include my new one - and that is where it is of course.
I don't want to have to put something like
use lib "/usr/lib/perl/5.8.4";
in every script or module I use. Is there any way around this or should I unistall perl and try a reinstall again?
thanks in advance for any light in the dark corners.
Anne
--
so much to do, so little time :(
More information about the Za-pm
mailing list