From: Peter Rabbitson Date: Sun, 30 Aug 2009 07:07:00 +0000 (+0000) Subject: Put the ocmment back X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7d78dad862babcad9819ebb8e927b74092f6c296;p=dbsrgits%2FDBIx-Class-Historic.git Put the ocmment back --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index b2a92ef..e72ac64 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1107,6 +1107,12 @@ sub txn_begin { sub _dbh_begin_work { my $self = shift; + + # if the user is utilizing txn_do - good for him, otherwise we need to + # ensure that the $dbh is healthy on BEGIN. + # We do this via ->dbh_do instead of ->dbh, so that the ->dbh "ping" + # will be replaced by a failure of begin_work itself (which will be + # then retried on reconnect) if ($self->{_in_dbh_do}) { $self->_dbh->begin_work; } else {