[Munich-pm] Moose Demolish

Robin Clarke robin at robinclarke.net
Mo Jan 27 01:34:27 PST 2014


Has any of you had experience with Moose DEMOLISH (the Moosey way of doing
DESTROY)?

I'm a bit stuck... I want to run a cleanup in an object when it goes out of
scope, but I'm a bit confusticated... normally DEMOLISH does not seem to be
called.
If I add this to the method

use sigtrap qw/die normal-signals/;

the DEMOLISH method is called, but if I kill the script with a CTRL-C, the
DEMOLISH method also gets called (correct behaviour), but the script does
not end, because the method does not contain an exit().
If I add exit(), it kills the application every time an object goes out of
context...
I'm standing on the pipe here. (auf'm Schlauch stehen)... can someone give
me a kickstart?

Thanks!

Best winds,
-Robin-
~:)
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://mail.pm.org/pipermail/munich-pm/attachments/20140127/901658fa/attachment.html>


Mehr Informationen über die Mailingliste Munich-pm