Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: forcing eval'd die to ignore global $SIG{__DIE__} handler

by ikegami (Pope)
on Sep 22, 2007 at 20:39 UTC ( #640546=note: print w/ replies, xml ) Need Help??


in reply to forcing eval'd die to ignore global $SIG{__DIE__} handler

In your handler, don't print and exit if $^S is true.


Comment on Re: forcing eval'd die to ignore global $SIG{__DIE__} handler
Download Code
Replies are listed 'Best First'.
Re^2: forcing eval'd die to ignore global $SIG{__DIE__} handler
by dk (Chaplain) on Sep 23, 2007 at 18:52 UTC
    quote latest "perldoc perlvar":

    Having to even think about the $^S variable in your exception handlers is simply wrong. $SIG{__DIE__} as currently implemented invites grievous and difficult to track down errors. Avoid it and use an "END{}" or CORE::GLOBAL::die override instead.

    I'm not saying that I support that, quite the contrary, but at least it is worth to know about this sudden perversion of the nature.

Re^2: forcing eval'd die to ignore global $SIG{__DIE__} handler
by cLive ;-) (Parson) on Sep 22, 2007 at 20:46 UTC
    Thanks! Damn I knew there was something simple I was missing. Heh.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (15)
As of 2015-07-28 14:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (256 votes), past polls