in reply to using DESTROY to DBI disconnect

It is happening because you are running on a version of Perl prior to 5.8.

Unfortunately Perl 5.8 doesn't yet exist, but when the current development branch becomes stable, it will be the first one which has reliable destruction mechanics for data which survives to global destruction.

See the thread Re (tilly) 1: Tie & Destroy, OOP for a discussion of the issue and some possible solutions, and Class::FlyweightWrapper for a very slow implementation of the wrapper method I came up with to work around global destruction for some simple situations. (Yours qualifies as simple.)

  • Comment on Re (tilly) 1: using DESTROY to DBI disconnect