in reply to Broken cpan

The version number 1.61 is not especially helpful. That's the version number of the App::Cpan module, but there have been several releases of the CPAN distribution that include the same version of the App::Cpan module. (The CPAN distribution is quite annoying in that each of its internal modules has its own completely independent version numbering system. With most multi-module distributions, people tend to keep the version numbers for each module synchronized.) You can find out what version of the CPAN distribution you have using:

perl -MCPAN -E'say $CPAN::VERSION'

But anyway, it looks like your CPAN version is new enough for you to need a more recent version of CPAN::Meta::Requirements than the one you have. You can find out what version of CPAN::Meta::Requirements you have like this:

perl -MCPAN::Meta::Requirements -E'say $CPAN::Meta::Requirements::VERS +ION'

I'd recommend installing an up to date copy of CPAN::Meta::Requirements. But how to do that if your CPAN client is broken?

Download the archive, then run:

tar zxfv CPAN-Meta-Requirements-2.125.tar.gz cd CPAN-Meta-Requirements-2.125 perl Makefile.PL make all make test && sudo make install

Also, you should clear your build directory. This will solve the "unwrapped" problem.

rm -fr ~/.cpan/build/

Hopefully that will fix everything.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^2: Broken cpan
by halfcountplus (Hermit) on Apr 22, 2014 at 17:11 UTC

    This may well have fixed it (but see my comment to marto's answer). I'm suspicious because the version difference was only from 2.120351 to 2.125 -- but OTOH, this was one of the modules with overlap in the two `/usr/local` directories; 2.125 had been installed (presumably by a previous upgrade) but the older one was taking precedence.

      If I were you, what I'd do, is now that the system Perl is in a reasonable state; use that to install App::perlbrew; use perlbrew to install a fresh copy of Perl in my home directory; and use that fresh copy of Perl for any serious work.

      There is a popular school of thought that you should touch the version of Perl that was pre-installed with your system as little as possible, because upgrading modules might break your system. (Lots of Linux distributions' admin scripts, package managers, etc are written in Perl.)

      use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re^2: Broken cpan
by bill_mcgonigle (Acolyte) on Jun 11, 2014 at 14:27 UTC
    I hit the same breakage but was able to 'look CPAN::Meta::Requirements' and then 'perl Makefile.PL; make; make install' successfully, without having to download manually.
      I ran into this as well on an (otherwise) pretty uncomplicated install of CentOS 6.5, and your solution worked for me as well. But what is the fundamental problem? Why does CPAN insist on hosing itself in this way?
      this solution worked great for me.
      That worked for me. Thanks!