Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Throw from within a DESTROY block

by ribasushi (Monk)
on Sep 07, 2011 at 05:56 UTC ( #924534=note: print w/ replies, xml ) Need Help??


in reply to Re: Throw from within a DESTROY block
in thread Throw from within a DESTROY block

There is no rest. The question is:

How do I massage perl (with a trick, with XS, whatever) to throw a real (as in eval-trappable) exception from within some DESTROY of some object being destroyed.


Comment on Re^2: Throw from within a DESTROY block
Re^3: Throw from within a DESTROY block
by ikegami (Pope) on Sep 07, 2011 at 20:41 UTC

    Using die. The catch is that Perl's calls DESTROY inside of an eval (effectively) so it doesn't go far.

    If you want to throw something catchable outside of DESTROY, it'll have to be thrown from outside of DESTROY.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2014-08-20 20:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (124 votes), past polls