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 $dbh;
}
________________________________
From: tiger peng <[email protected]>
To: "[email protected]" <[email protected]>
Sent: Wednesday, August 24, 2011 9:51 AM
Subject: Turn off "Issuing rollback..." warning for AutoCommit.
Hello All,
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 and set AutoCommit to 0 without success. Could you please provide
any solution and/or suggestion? My environment is quite old (Perl/5.80;
DBI/1.30; DBD::Oracle/1.12).
Thanks
tiger