in reply to Segmentation fault

Start the cpan shell and run the command recompile.

Replies are listed 'Best First'.
Re^2: Segmentation fault
by locked_user sundialsvc4 (Abbot) on Jul 03, 2012 at 15:10 UTC

    Exactly.   Remember that every CPAN module includes as part of its implementation a fair amount of C/C++ (so called “XS”) code.   When you change versions of the Perl executable, you will ex minimis need to recompile the versions of what you have.   You probably should upgrade them, too.   There’s a lot of “magic” in the install-scripts, and some of that might be Perl-version aware.   When you have changed the layer of software that’s at the bottom of it all (“Perl itself...”), you need to re-do these things so that everyone’s once again singing from the same songbook.

      Every CPAN module has "C/C++ (so called "XS") code"? Perhaps I don't know what I'm talking about, but aren't there "pure Perl" modules in CPAN that don't have any C/C++/XS code in them? (i.e. only Perl code)

      Actually, after re-reading your wording, maybe I misunderstood you. Are you saying "every module in CPAN" has C/C++ code or are you just talking about the CPAN module itself that has C/C++ code?

        There are some “Pure Perl” packages out there, certainly.   But if you’re getting a segmentation fault, you are definitely (directly or indirectly...) dealing with one that is not.

        Many Perl packages consist partially or entirely of “wrappers for” existing libraries.   (e.g. XML::LibXML).   Others (YAML::Syck) do it for speed.   So, even though you as a Perl programmer are simply dealing with “a nice, well-behaved Perl package,” in the case of some packages there are lower-level calls being made under the hood.   The source-code of the package therefore consists, not only of Perl code, but also C/C++ code and the necessary “plumbing” needed to connect one to the other.   Just install the package in the usual way, and, presto, it all just happens.   It’s kind of like Laws and Sausages:   they work (well, sausages do, anyway), but you really don’t want to know how they’re made ...

Re^2: Segmentation fault
by ig (Vicar) on Jul 03, 2012 at 20:01 UTC

    If Perl was installed from platform packages and upgraded this way, it might be best to avoid running cpan against it. Mixing platform packages with installations from cpan can lead to difficulties.