The stupid question is the question not asked | |
PerlMonks |
Re: combination of multiple installed Perls and some environment variables cause segfaultsby tobyink (Canon) |
on Apr 06, 2013 at 07:57 UTC ( [id://1027262]=note: print w/replies, xml ) | Need Help?? |
XS modules compiled for one version of Perl are likely to segfault other Perls. (Though recently p5p have been ensuring binary compatibility across minor versions - i.e. 5.16.0, 5.16.1, 5.16.2 and 5.16.3 should all be binary compatible.) The problem with PERL5LIB is that environment variables get passed to child processes, so when your Perl 5.14 spawns Perl 5.10, Perl 5.10 sees a lib dir that was intended for 5.14. You could try adding this near the top of your script:
Or you could avoid setting that variable to begin with and instead use lib or use the Perl -I command-line option. Personally though, I'd suggest App::perlbrew which makes managing multiple versions of Perl a breeze.
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
In Section
Seekers of Perl Wisdom
|
|