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

I was just wondering what the best way was to be able to upgrade to newer versions of Perl without having to re-install all of the cpan modules again.

I have a directory /opt/perl which I link to the latest version, but when I do this I of course lose the link to the cpan modules I installed in the previous version.

  • Comment on Upgrading Perl and keeping CPAN modules

Replies are listed 'Best First'.
Re: Upgrading Perl and keeping CPAN modules
by almut (Canon) on Oct 22, 2009 at 08:11 UTC

    Note that if you do an upgrade to another major Perl version (such as 5.8 to 5.10), many of the modules (those with an XS/binary component) aren't compatible anyway...

    In case that doesn't bother you, you can always point to the existing lib dirs using use lib ...; or PERL5LIB.