because if the database connect fails or is not called the dbh variable will be undefined and the same error will occur again.sub DB_finish { my $self = shift; if (defined($self->{dbh})) { $self->{dbh}->disconnect; } }
In reply to Re: Re: DBI Can't call method "close" during global destruction
by Marcello
in thread DBI Can't call method "close" during global destruction
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |