Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: die in a DESTROY

by adrianh (Chancellor)
on Sep 28, 2005 at 13:47 UTC ( [id://495738]=note: print w/replies, xml ) Need Help??


in reply to die in a DESTROY

If, inside a DESTORY, I *really* want to CORE::die, how can I do it?

Short answer - you can't. Exceptions don't propagate out of DESTROY blocks.

If you want to detect some kind of error condition that happened during DESTROY time your best bet would be to set a global error flag and then test that.

Personally I'm would be suspicious of DESTROY blocks that would need to throw exceptions.... can you describe what you want to do in more detail? There might be a better way :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-19 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found