Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: How bad is $SIG{__DIE__} really? (global)

by tye (Sage)
on Oct 12, 2016 at 03:36 UTC ( #1173788=note: print w/replies, xml ) Need Help??

in reply to Re: How bad is $SIG{__DIE__} really?
in thread How bad is $SIG{__DIE__} really?

If you clean up in destructors, then you don't have to try to trap global events. Having a non-global thing (such as your module) try to trap global events is usually a pretty bad idea, as the methods for trapping such things don't have built-in support for multiple handlers.

- tye        

  • Comment on Re^2: How bad is $SIG{__DIE__} really? (global)

Replies are listed 'Best First'.
Re^3: How bad is $SIG{__DIE__} really? (global)
by stevieb (Canon) on Oct 12, 2016 at 12:36 UTC

    You're absolutely right tye. I suppose in my case I'd only have to watch for $SIG{INT} (as DESTROY() isn't called on the interrupt signal), and not $SIG{__DIE__}.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2022-08-09 20:52 GMT
Find Nodes?
    Voting Booth?

    No recent polls found