I make out a solution, injecting an END block for each new born DB handle, and
it seems work:
sub connect {
...
eval "END { if (\$dbh->{Active}) {
\$dbh->rollback;
\$dbh->disconnect();
}
} " unless $dbh->{AutoCommit};
return $
undef
From: David E. Wheeler
To: tiger peng
Cc: "dbi-users@perl.org"
Sent: Wednesday, August 24, 2011 11:52 AM
Subject: Re: Turn off "Issuing rollback..." warning for AutoCommit.
On Aug 24, 2011, at 7:51 AM, tiger peng wrote:
> I am subclassing DBI f
o with DBD::Oracle
Not sure if this will work in DBI 1.30 though as I do not have that code base
arount to look at.
Hope this helps
cheers
John
> Subject: Re: Turn off "Issuing rollback..." warning for AutoCommit.
> From: da...@kineticode.com
> Date: Wed, 24 Aug 2011 0
On Aug 24, 2011, at 7:51 AM, tiger peng wrote:
> I am subclassing DBI for authenticating purpose by overwriting connection.
>
> I try to turn off warning message "Issuing rollback() for database handle
> being DESTROY'd without explicit disconnect()" by explicitly issuing
> rollback, disconnect