Hope this is not too dumb a post, but I've got a question about upgrading perl and how this works with pre-existing modules on a system. I've tried searching on google and on perlmonks for advice but not found an answer, hence my mail.
The question is: is there any way of using modules installed before an upgrade without having to reinstall all the modules?
The scenario is:
We've just upgraded from v5.005_03 to v5.8.0, and we have a few modules within the @INC for 5.005_03.
From the documentation that comes with the v5.8 installation, the impression I get is that module directories for previous installs of Perl will be searched after an upgrade. Below is a quote from the doc:
~~~~~~~~~~~~~~~~~~
This way, modules installed under 5.005_03 will continue to be usable by 5.005_03 but will
also accessible to 5.6.0. Further, suppose that you upgrade a module to one which requires features present only in 5.6.0. That new module will get installed into /usr/local/lib/perl5/site_perl/5.6.0 and will be available to 5.6.0, but will not
interfere with the 5.005_03 version.
~~~~~~~~~~~~~~~~~~~
Unfortunately, that's not what I'm finding on our system.
The @INC's for our versions are:
$ /usr/opt/perl5/bin/perl5.00503 -e 'for (@INC) {print "Inc: \"$_\" \n"}'
Inc: "/usr/opt/perl5/lib/5.00503/aix"
Inc: "/usr/opt/perl5/lib/5.00503"
Inc: "/usr/opt/perl5/lib/site_perl/5.005/aix"
Inc: "/usr/opt/perl5/lib/site_perl/5.005"
Inc: "."
$ /usr/opt/perl5/bin/perl5.8.0 -e 'for (@INC) {print "Inc: \"$_\" \n"}'
Inc: "/usr/opt/perl5/lib/5.8.0/aix"
Inc: "/usr/opt/perl5/lib/5.8.0"
Inc: "/usr/opt/perl5/lib/site_perl/5.8.0/aix"
Inc: "/usr/opt/perl5/lib/site_perl/5.8.0"
Inc: "/usr/opt/perl5/lib/site_perl"
Inc: "."
If I run a test script with a module that I installed under 5.005_03, I get this error:
*stares vacantly at screen at prospect of reinstalling lots of modules*$ new_version_test.pl Can't locate Config/IniFiles.pm in @INC (@INC contains: /usr/opt/perl5 +/lib/5.8.0/aix /usr/opt/perl5/lib/5.8.0 /usr/opt/perl5/lib/site_perl/ +5.8.0/aix /usr/opt/perl5/lib/site_perl/5.8.0 /usr/opt/perl5/lib/site_ +perl .) at new_version_test.pl line 10. BEGIN failed--compilation aborted at new_version_test.pl line 10.
Any chance I can still use the old modules under 5.8?
Thanks very much for your help.
Mark
Edit by tye, put CODE tags / drop BR for lines that IE won't fold
In reply to perl 5.8 upgrade - @INC problem by Ogbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |