It's probably my fault, I've got into the habit of using die whenever I want to report an error and exit. In this case of course, my program was already in the process of exiting which is why the DESTROY got called, but I was still surprised to find that when in the event of an error happening and I used die inside the DESTROY, my error message did not print. Easily fixed by printing to STDERR instead, but I was wondering if others were aware of this behaviour and if someone had as explanation as to why it happens (or doesn't in this case!).
Cheers!
In reply to die & DESTROY - but not at the same time? by mildside
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |