in reply to Re: DBI Can't call method "close" during global destruction
in thread DBI Can't call method "close" during global destruction

I also suggest:
sub DB_finish { my $self = shift; if (defined($self->{dbh})) { $self->{dbh}->disconnect; } }
because if the database connect fails or is not called the dbh variable will be undefined and the same error will occur again.

Regards,
Marcel