Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 ( #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        

  • Comment on Re^2: setting PERL_PERTURB_KEYS & PERL_HASH_SEED in a perl file (simpler)
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2020-10-27 07:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (256 votes). Check out past polls.

    Notices?