Hello everyone,

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:

$ 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.
*stares vacantly at screen at prospect of reinstalling lots of modules*

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.