in reply to Re^2: 5.16 vs Date::Manip
in thread 5.16 vs Date::Manip

Perl API version v5.14.0 of Storable does not match v5.16.0 at /usr/sh +are/perl5/core_perl/XSLoader.pm line 92.

It is kinda sad that this particular error gives you details about the full paths to a bunch of files but doesn't bother to include the two full paths that actually would be useful for diagnosing the problem. That is, it should tell you the full path to Storable.pm and to Storable.so (or whatever dynamic library it found to load).

But, since the paths that it reports include

/usr/share/perl5/core_perl/XSLoader.pm /usr/share­/perl5/ven­dor_perl/D­ate/Manip/­Obj.pm

It seems clear that the instance of Perl you installed puts module files into a directory structure that is not specific to one version of Perl. That is a very old idea that I find, these days, is just never worth the headaches it causes.

Likely, the version of Storable.pm that you wanted either got overwritten when a different version of Perl was installed (that stupidly shared the same /usr/share/perl5 directory structure) or (seems less likely) just gets ignored because the version of Storable.pm that you don't want gets found first due to the order of directories listed in @INC.

My suggestion is to uninstall all versions of Perl except the one included with the operating system, force a re-install of the Perl included in the operating system, and make sure that any other versions of Perl that you install don't touch nor look at any of the directories where the system Perl stores modules.

- tye        

Replies are listed 'Best First'.
Re^4: 5.16 vs Date::Manip (sharing--)
by ChrisDennis (Sexton) on Jun 18, 2012 at 20:23 UTC
    I haven't installed any versions of Perl except what Arch Linux gives me -- i.e. the latest.

    I've tried uninstalling and reinstalling the main Perl package, but that didn't help.

    I haven't found any reports of similar issue with Arch, so I've now asked on the Arch Linux forum too. cheers Chris

      Sounds like you could benefit from some basic debugging:

      % locate /Storable.pm | xargs grep -w VERSION % locate /Storable. % perl -del > use XSLoader > l XSLoader::load > b 92 > use Storable > x $INC{'Storable.pm'} > x $file > x @INC > q

      - tye        

        Thanks -- that helped:
        $ locate /Storable.pm | xargs grep -w VERSION /usr/lib/perl5/core_perl/Storable.pm:use vars qw($canonical $forgive_m +e $VERSION); /usr/lib/perl5/core_perl/Storable.pm:$VERSION = '2.34'; /usr/lib/perl5/core_perl/Storable.pm:XSLoader::load('Storable', $Stora +ble::VERSION); /usr/lib/perl5/site_perl/Storable.pm:use vars qw($canonical $forgive_m +e $VERSION); /usr/lib/perl5/site_perl/Storable.pm:$VERSION = '2.30'; /usr/lib/perl5/site_perl/Storable.pm:XSLoader::load 'Storable', $Stora +ble::VERSION;

        So I renamed the site_perl version, and now my script runs.

        There are still other problems with site_perl though -- probably because in the past I've used cpanp to install modules. Now I can't re-run cpanp to update things because cpanp itself doesn't run:

        $ cpanp Attempt to reload Module/Load/Conditional.pm aborted. Compilation failed in require at /usr/share/perl5/site_perl/IPC/Cmd.pm + line 50. BEGIN failed--compilation aborted at /usr/share/perl5/site_perl/IPC/Cm +d.pm line 50. Compilation failed in require at /usr/share/perl5/site_perl/CPANPLUS/C +onfig.pm line 18. BEGIN failed--compilation aborted at /usr/share/perl5/site_perl/CPANPL +US/Config.pm line 18. Compilation failed in require at /usr/share/perl5/site_perl/CPANPLUS/C +onfigure.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/site_perl/CPANPL +US/Configure.pm line 7. Compilation failed in require at /usr/share/perl5/site_perl/CPANPLUS/B +ackend.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/site_perl/CPANPL +US/Backend.pm line 7. Compilation failed in require at /usr/share/perl5/site_perl/CPANPLUS.p +m line 7. BEGIN failed--compilation aborted at /usr/share/perl5/site_perl/CPANPL +US.pm line 7. Compilation failed in require at /usr/bin/site_perl/cpanp line 11. BEGIN failed--compilation aborted at /usr/bin/site_perl/cpanp line 11.

        There's lots of stuff in /usr/share/perl5/site_perl -- I'll try getting rid of all of it temporarily to see what else breaks...

        cheers, Chris

        Is the user supposed to type that in form a shell?

        How about getting rid of those > so the user can copy/paste that stuff?

        Or better yet, why not simply copy/paste your entire session, instead of just the command portions?