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);
if (--$self->{transaction_depth} == 0) {
$self->debugfh->print("COMMIT\n")
if ($self->debug);
- $self->dbh->commit;
+ $dbh->commit;
}
}
}
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);
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;