Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Self resurrecting perl scripts

by bobtfish (Scribe)
on Apr 12, 2001 at 12:32 UTC ( #71982=note: print w/replies, xml ) Need Help??


in reply to Self resurrecting perl scripts

Two suggestions:
1) You can call exec and re-start your script from within your end block.
By passing it enviromental variables and/or command line parameters you can give it all the information it needs.
2) Override the built in die function. (See camel, p306 in v3).
<code> *CORE::GLOBAL::die = sub {
print STDERR "In my own die function!"; CORE::die(@_);
#Notreached exit(1); }

N.B. This is just untested example code.
When you call die it prints In my own die function then call's the builtin die function.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2022-05-28 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (98 votes). Check out past polls.

    Notices?