Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: combination of multiple installed Perls and some environment variables cause segfaults

by dlamb (Initiate)
on Apr 06, 2013 at 22:33 UTC ( #1027308=note: print w/ replies, xml ) Need Help??


in reply to Re: combination of multiple installed Perls and some environment variables cause segfaults
in thread combination of multiple installed Perls and some environment variables cause segfaults

Thanks for the reply.

I don't think I want to delete $ENV{PERL5LIB} because none of these scripts are solely "mine", so I don't want to mess anybody else up.

My understanding was that use lib or -I were good for individual scripts or one-offs, but not a good solution for permanently setting up a working environment. But I could be wrong.

Since I already have 2 system perls (legacy 5.8.9 and the aforementioned 5.10.0) and 2 MacPorts perls (5.12 and 5.14), and presumably those MP perls are needed by other programs I have installed so I can't get rid of them, I think adding more Perls with perlbrew would just complicate things.

Maybe getting netpbm to change to /usr/bin/env perl would be the best solution.


Comment on Re^2: combination of multiple installed Perls and some environment variables cause segfaults
Select or Download Code
Re^3: combination of multiple installed Perls and some environment variables cause segfaults
by tobyink (Abbot) on Apr 06, 2013 at 23:47 UTC

    Adding

    BEGIN { delete $ENV{PERL5LIB} };

    ... to the top if the script shouldn't mess anything up. It will only have any effect on child processes launched by the script - e.g. things launched using system() or backticks.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-07-12 05:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls