开发者

how to alleviate local::lib troubles after system/perl upgrade?

开发者 https://www.devze.com 2023-03-19 09:27 出处:网络
our 开发者_StackOverflow中文版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:

our 开发者_StackOverflow中文版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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号