in reply to What _should_ DESTROY do?
I've got this oo module, it may open a database handle with autocommit off- It may or may not open other handles..
I use DESTROY to check if the handles are open, if they need to be committed, and then if the connection needs to be.. let's say- 'disconnected'.
I'm no authority- but my loose understanding is DESTROY is the last thing that will happen in that code as long as your module is alive- like with BEGIN{} you know it's the first thing that will happen. That can be of use to you.
|
|---|