Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

by tye (Sage)
on Oct 12, 2016 at 03:36 UTC ( [id://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__}.