X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;fp=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=afa07c518d519b4d0f381e252a458bed2d941cb2;hb=d4702d539ce9d9d19868a0709576264c3b72afdd;hp=b55672851946e8423d27232af6e97f2998843824;hpb=e01fd1cb593cf66ee6016ad6de89706f02d56ffe;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index b556728..afa07c5 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1550,9 +1550,8 @@ sub _exec_txn_begin { sub txn_commit { my $self = shift; - $self->_verify_pid unless DBIx::Class::_ENV_::BROKEN_FORK; $self->throw_exception("Unable to txn_commit() on a disconnected storage") - unless $self->_dbh; + unless $self->_seems_connected; # esoteric case for folks using external $dbh handles if (! $self->transaction_depth and ! $self->_dbh->FETCH('AutoCommit') ) { @@ -1581,9 +1580,8 @@ sub _exec_txn_commit { sub txn_rollback { my $self = shift; - $self->_verify_pid unless DBIx::Class::_ENV_::BROKEN_FORK; $self->throw_exception("Unable to txn_rollback() on a disconnected storage") - unless $self->_dbh; + unless $self->_seems_connected; # esoteric case for folks using external $dbh handles if (! $self->transaction_depth and ! $self->_dbh->FETCH('AutoCommit') ) { @@ -1611,9 +1609,8 @@ sub _exec_txn_rollback { # generate the DBI-specific stubs, which then fallback to ::Storage proper quote_sub __PACKAGE__ . "::$_" => sprintf (<<'EOS', $_) for qw(svp_begin svp_release svp_rollback); - $_[0]->_verify_pid unless DBIx::Class::_ENV_::BROKEN_FORK; $_[0]->throw_exception('Unable to %s() on a disconnected storage') - unless $_[0]->_dbh; + unless $_[0]->_seems_connected; shift->next::method(@_); EOS