Rob Arnold writes:
> I can make this happen consistently with Perl DBI by placing a
> $dbh->disconnect() in the DESTROY subroutine of an object. I doubt the two
> issues have much in common, but there's my $.02. You might post to the list
> (not me, I'm ignorant) how you managed to make this happen.
Yes, the same here. You must not does this as the described in DBI
manpage (last sentence):
The 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', it is undefined.
Dirk