<div dir="ltr">Has any of you had experience with Moose DEMOLISH (the Moosey way of doing DESTROY)?<div><br></div><div>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.</div>
<div>If I add this to the method</div><div><br></div><div>use sigtrap qw/die normal-signals/;</div><div><br></div><div>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().</div>
<div>If I add exit(), it kills the application every time an object goes out of context...</div><div>I'm standing on the pipe here. (auf'm Schlauch stehen)... can someone give me a kickstart?</div><div><br></div><div>
Thanks!</div><div> </div><div>Best winds,<br>-Robin-<br>~:)
</div></div>