Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Overwriting exit and similar

by jhourcle (Prior)
on Jul 26, 2005 at 11:55 UTC ( #478148=note: print w/replies, xml ) Need Help??


in reply to Overwriting exit and similar

The easiest way to trap die is to just put everything in an eval block. Also see die for info about what you can do with $SIG{'__DIE__'}.

exit is a little trickier, but you might be able to set something up in an END block. (I've never tried, myself... I'm not sure what would happen if you did a goto in an END block). I'd think you'd be better off just removing calls to exit, or changing them to die where appropriate, if that's possible.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2023-05-30 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?