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

While working with perl 5.10.1 today, my CPAN data has gotten messed up:
cpan[1]> force install Term::ReadLine CPAN: Storable loaded ok (v2.21) Going to read '/home/____/.cpan/Metadata' Database was generated on Sat, 29 Aug 2009 21:27:01 GMT Running install for module 'Term::ReadLine' CPAN: YAML loaded ok (v0.70) Running make for D/DA/DAPM/perl-5.10.1.tar.gz CPAN: LWP::UserAgent loaded ok (v5.829) CPAN: Time::HiRes loaded ok (v1.9719) Fetching with LWP: ftp://cpan-sj.viaverio.com/pub/CPAN/authors/id/D/DA/DAPM/perl-5.10.1 +.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.02) Checksum for /home/____/.cpan/sources/authors/id/D/DA/DAPM/perl-5.10.1 +.tar.gz ok Scanning cache /home/____/.cpan/build for sizes ...................................................................... +......DONE DEL(1/1): /home/____/.cpan/build/DAPM-Xy6n72 CPAN: Archive::Tar loaded ok (v1.52) perl-5.10.1/ perl-5.10.1/sv.c
which then goes on for a long time, untarring perl5.10.1, until it stops at
perl-5.10.1/Configure
I have to control-C out of it.

I tried deleting some things from ~/.cpan/ but have not been able to find the right thing to remove, to keep CPAN from think that perl 5.10.1 is needed for Term::ReadLine.

In what order should I try deleting things from ~/.cpan (or doing something else) so as to keep as much of my context while getting rid of this problem?

Thanks,
cmac

Replies are listed 'Best First'.
Re: CPAN local data corrupted
by Khen1950fx (Canon) on Aug 30, 2009 at 06:28 UTC
    Sometimes, it can be difficult to tell what modules are core, or even what modules are dualLived. For example, Term::ReadLine is part of the core, currrently 5.10.1; however, take a module like Module::CoreList. It's part of the core, but it is dualLived in that you can upgrade it without having to upgrade perl. I haven't found an easy way to determine if a module is dualLived, but you can use the corelist script from Module::CoreList to see if a module is indeed core. For an example from the command line:

    corelist -a Term::ReadLine

    An even better one:

     corelist -a /^Term::/

    It'll return all the Term modules that are part of the core.

      Thanks to all three respondents. What happened was that @INC in my 5.10.1 didn't include all of the directories from past versions, such that (as I found out later) I needed an update of Term::ReadLine::Gnu to make one of my scripts work right. I thought the problems was with Term::ReadLine, and didn't check its status. Naturally, when I just said install, perl -MCPAN said it was up to date, so I tried to force it.

      Perl -MCPAN's response of trying to unpack perl was mysterious at the end of a long day. Later I finally got @INC in 5.10.1 right, so that all past module directories are now present and in the right order.
Re: CPAN local data corrupted
by chorny (Scribe) on Aug 30, 2009 at 02:12 UTC
    Why do you use "force"? If I try this without force, I see message about installing Perl:
    >install Term::ReadLine
    
    Running install for module 'Term::ReadLine'
    The most recent version "1.04" of the module "Term::ReadLine"
    is part of the perl-5.10.1 distribution. To install that, you need to run
      force install Term::ReadLine   --or--
      install D/DA/DAPM/perl-5.10.1.tar.gz
    
Re: CPAN local data corrupted
by Anonymous Monk on Aug 30, 2009 at 01:55 UTC