GoCool has asked for the wisdom of the Perl Monks concerning the following question:

I'm currently using perl v5.6.1 and would like to upgrade it to v5.8.5, also when i download and install modules from cpan.org it prints this at the end of installation: "Appending installation info to /usr/lib/perl/5.6.1/perllocal.pod" I have 2 questions: 1. How do i upgrade from 5.6.1 to 5.8.5 2. If i upgrade to perl 5.8.5, am i going to lose all the modules i built and installed, if no, how do i make sure that all these modules that i built and installed are still available in the newer version. thanks in advance.

Replies are listed 'Best First'.
Re: upgrade perl 5.6.1 to 5.8.5
by holli (Abbot) on Mar 09, 2005 at 18:22 UTC
    am i going to lose all the modules i built and installed
    Perl 5.6 and Perl 5.8 are not binary compatible. That means you will have to recompile all your modules that contain XS-Extensions. There should be no problem with availability if you build these modules from source. For pure Perl modules there is no problem whatsoever.


    holli, /regexed monk/
Re: upgrade perl 5.6.1 to 5.8.5
by chromatic (Archbishop) on Mar 09, 2005 at 20:29 UTC

    To update the modules you have installed, use CPAN's autobundle command:

    $ perl -MCPAN -e shell CPAN> autobundle

    This writes a list of all of the modules you have installed to a bundle file under your CPAN home directory. (Mine is /usr/src/cpan/Bundle/Snapshot_2005_03_09_00.pm.)

    When you install the new version, configure CPAN with the same directory, then run:

    $ cpan install Bundle::Snapshot_2005_03_09_00

    (Change the name of the module appropriately.)

    Update: Corrected first command line.

      THAT's what that's for! I was just messing in CPAN today and wondered, "what's autobundle? :I try it: Created a 'snapshot' for me, but why?"

      -Scott

Re: upgrade perl 5.6.1 to 5.8.5
by davido (Cardinal) on Mar 09, 2005 at 18:18 UTC

    Perl 5.8.x is not binary compatible with previous Perl's, so many modules will have to be rebuilt and reinstalled.


    Dave