in reply to Perl installation broken

Undefined subroutine &Carp::longmess_heavy called at /usr/lib/perl5/5. +8.8/Carp.pm line 239. Warning: No success on command[/usr/bin/perl Makefile.PL] ZEFRAM/Carp-1.26.tar.gz /usr/bin/perl Makefile.PL -- NOT OK
AFAICT, you should be getting that same failure *every* time you do a cpan install ... and it puzzles me how *any* cpan install could ever succeed while that broken version of Carp is being found.

Every time 'perl Makefile.PL' gets run, ExtUtils/MakeMaker.pm is loaded and it, in turn, loads that broken version of Carp - at which point the build fails.
I presume the problem there is that /usr/lib/perl5/5.8.8/Carp/Heavy.pm, which should define the longmess_heavy sub, is either corrupted or not being loaded - and the best way I can see of fixing this would be to manually copy'n'paste Heavy.pm (from the source distro) to the location that I've just specified. Maybe you should also copy Carp.pm from the source distro to /usr/lib/perl5/5.8.8/Carp.pm (just to make sure that you have matching versions of Carp.pm and Heavy.pm).

However, I believe this is the *system* perl that you're tampering with, and I'm always a bit nervous when it comes to doing that lest the system gets broken.
It would be far preferable that you install and use a different perl (say, /usr/local/perl) and leave the system perl well alone.

Cheers,
Rob

Replies are listed 'Best First'.
Re^2: Perl installation broken
by taint (Chaplain) on Jun 22, 2012 at 05:26 UTC
    Greetings,

    Along the same lines Rob mentioned above && assuming a *NIX system;
    building and installing a miniperl into your ~ (/home/) might be useful
    to have around. When building && installing, use --prefix /home, or /home/lib, or
    whatever seems appropriate given the layout you keep in your $home. ;)
    Then anytime you run into trouble -- or want to experiment with something, you only need
    to change your environment's PATH to ensure that your HOME version of perl (or lib) comes
    Before the system's version. This should allow you to build a replacement version of CARP
    (again using the correct --prefix (/usr/lib || /usr/local/lib)), and install it.

    Good luck! Hope this helps. :)

    use perl::always;
    my $perl_version = "5.12.4";
    print $perl_version;