in reply to cleaning up in DESTROY

Wouldn't be very much of a DESTROY method if the instance weren't passed in as a parameter, now would it?

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: cleaning up in DESTROY
by pysome (Scribe) on Apr 05, 2008 at 10:36 UTC
    i think your should call the $dbh->disconnect with a independent method in the package definition. for example:
    sub finish { my $self = shift; $self->{'dbh'}->disconnect; }