From: Justin Guenther Date: Thu, 18 May 2006 21:55:45 +0000 (+0000) Subject: removed another couple extraneous $self->dbh calls X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7c5a8b6086ea00449a6c1a5f7415494c7b2c2bde;p=dbsrgits%2FDBIx-Class-Historic.git removed another couple extraneous $self->dbh calls --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 1b43dae..fd5e968 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -446,8 +446,8 @@ Issues a commit against the current dbh. sub txn_commit { my $self = shift; + my $dbh = $self->dbh; if ($self->{transaction_depth} == 0) { - my $dbh = $self->dbh; unless ($dbh->{AutoCommit}) { $self->debugfh->print("COMMIT\n") if ($self->debug); @@ -458,7 +458,7 @@ sub txn_commit { if (--$self->{transaction_depth} == 0) { $self->debugfh->print("COMMIT\n") if ($self->debug); - $self->dbh->commit; + $dbh->commit; } } } @@ -475,8 +475,8 @@ sub txn_rollback { my $self = shift; eval { + my $dbh = $self->dbh; if ($self->{transaction_depth} == 0) { - my $dbh = $self->dbh; unless ($dbh->{AutoCommit}) { $self->debugfh->print("ROLLBACK\n") if ($self->debug); @@ -487,7 +487,7 @@ sub txn_rollback { if (--$self->{transaction_depth} == 0) { $self->debugfh->print("ROLLBACK\n") if ($self->debug); - $self->dbh->rollback; + $dbh->rollback; } else { die DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION->new;