Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???

by jplindstrom (Monsignor)
on Apr 06, 2009 at 14:27 UTC ( #755734=note: print w/ replies, xml ) Need Help??


in reply to Re: Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???
in thread Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???

Note that anything that happens to alter $SIG{__DIE__} would break that since the exception string wouldn't be "alarm\n" anymore.

I've done that myself numerous times when adding a use Carp::Always; for debugging purposes, thereby accidentally the whole test run.

If you want to be extra super safe, you should do local $SIG{__DIE__}; in the block as well.

/J


Comment on Re^2: Why <c>eval {...};if ($@) { die $@ } else { ...</c> ???
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-08-02 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (53 votes), past polls