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

Ok, it was a lame mistake, but I said "ok" when asked about installing perl5.10.0 when installing Term::Readline using CPAN. Now, things don't work right. One obvious error is that @INC doesn't include the 5.8.8 modules. CPAN is set to use UNINST=1. Does that mean there's some reasonable way to rollback the install of 5.10.0? If not, what are the less reasonable options? I just want my 5.8.8 back. FWIW, I'm on Fedora 7. -j

Replies are listed 'Best First'.
Re: CPAN fooled me into upgrading
by CountZero (Bishop) on Jul 18, 2008 at 10:02 UTC
    Well, you can continue installing (through CPAN) the missing modules you had in 5.8.8 with the corresponding 5.10.0 modules.

    It is unlikely that all 5.8.8 modules will run under 5.10.0 as there is no guaranteed binary compatibility between major upgrades of perl.

    Saving all of your 5.8.8 modules, then re-installing perl 5.8.8 and finally copying over your existing modules might just work, but I would not trust such a hacky solution in a production environment.

    The UNINST=1 option does not do what you think it does. It allows cpan to uninstall older versions from the module your are installing if they are under a different path. As that is a possibly dangerous operation, it is not the default and you have to explictly allow it by setting UNINST to 1.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      I believe there is guaranteed incompatibility
        XS modules will most likely have problems. Pure Perl modules have much better chances to work, but will of course not gain any benefit of the new features of perl 5.10.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: CPAN fooled me into upgrading
by moritz (Cardinal) on Jul 18, 2008 at 09:32 UTC
    Use Fedora's package manager to re-install perl 5.8.8. I don't know if you can easily uninstall perl 5.10.0 without leaving any tainting behind.

    If you have a recent backup available, it might be easiest to restore it, instead of fiddling with the 5.8.8 vs. 5.10.0 issue.

      Unfortunately, neither yum nor rpm know anything about 5.10.0, and uninstalling 5.8.8 through rpm and reinstalling via yum don't get rid of 5.10.0.

      One thing I've discovered is that 5.8.8 is in /usr/lib/perl5 while 5.10.0 is in /usr/local/lib/perl5.

      So, I removed the contents of /usr/local/lib/perl5, which only seemed to kill perldoc. Now my @INC still points to the 5.10.0 dirs and "perl -v" still reports 5.10.0 as the version.

      Where is @INC getting set? And how to I actually get rid of 5.10.0?