Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: setting PERL_PERTURB_KEYS & PERL_HASH_SEED in a perl file (simpler)

by tye (Sage)
on Jul 14, 2016 at 18:22 UTC ( [id://1167798]=note: print w/replies, xml ) Need Help??


in reply to Re: setting PERL_PERTURB_KEYS & PERL_HASH_SEED in a perl file
in thread setting PERL_PERTURB_KEYS & PERL_HASH_SEED in a perl file

if( ! $ENV{PERL_PERTURB_KEYS} ) { $ENV{PERL_PERTURB_KEYS} = 1; $ENV{PERL_HASH_SEED} = ...; exec( $^X, $0, @ARGV ); die "Failed to exec self: $!\n($^X $0 @ARGV)\n"; } ... rest of Perl code ...

You can add the BEGIN block if you want to optimize away some wasted initialization work.

Note that this does not take care of options being passed to Perl by the user, for example, if the script is being invoked like "perl -Imylib -i.old script *.ds". In a more likely scenario, you wouldn't be able to debug the script by just doing "perl -d script ...".

- tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-29 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found