DBI bzw Perl ist dein Freund. Du musst also nicht eine eigene sub DESTROY{}
schreiben.
QuoteThe database is automatically disconnected by the DESTROY method
if still connected when there are no longer any references to the handle.
The DESTROY method for each driver should implicitly call rollback to undo any
uncommitted changes. This is vital behaviour to ensure that incomplete
transactions don't get committed simply because Perl calls DESTROY on every
object before exiting. Also, do not rely on the order of object destruction during
"global destruction", as it is undefined.
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.