0

our system admin recently upgraded my OS and perl (to 5.12.3). when I load up the local::lib environment variables, it appears to break anything that depends on xs:

demianshell~> perl -e 'use Storable; store({a=>1}, 'test')'
demianshell~> eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
demianshell~> perl -e 'use Storable; store({a=>1}, 'test')'
Assertion ((svtype)((_svi)->sv_flags & 0xff)) >= SVt_RV failed: file "Storable.xs", line 3753 at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/_store.al) line 263, at -e line 1

is there an easy fix to this?

Demian
  • 215
  • 2
  • 9

1 Answers1

6

If you are saying that your only Perl has been upgraded from something other than Perl 5.12.*, and the binary components of your local::lib installations haven't, then sorry no, there is no easy solution to this apart from rebuilding the local::lib modules to your new Perl. Perl XS components are just not viable across major Perl revisions.

This is why it is often a good idea not to trust any system Perl, as it is outside your control. It's always a good plan to use your own Perl installs so you can control this, either with App::perlbrew or just a separate Perl install somewhere.

Stuart Watt
  • 5,242
  • 2
  • 24
  • 31
  • is there a way to tell cpanm to just go ahead and reinstall everything in the local::lib? – Demian Jul 08 '11 at 16:42
  • I don't know of one. It can be hard to get it right in all cases, as in the meantime the modules involved could actually have changed, split and so on. cpanm --scandeps might help. It's an interesting scenario, though. – Stuart Watt Jul 08 '11 at 18:18
  • 2
    http://stackoverflow.com/questions/6100492/how-to-use-a-cpanplus-autobundle-to-update-a-new-version-of-perl – daxim Jul 08 '11 at 18:41
  • It's dumb of local::lib to use INSTALL_BASE instead of PREFIX + LIB for exactly this reason. The latter would allow multiple incompatible Perl installations to use the same local::lib directory. – ikegami Jul 09 '11 at 01:27