From: David Kamholz Date: Sat, 10 Dec 2005 17:19:50 +0000 (+0000) Subject: fix last patch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=480c6e79278a6ce76bd4db7269f561c60a4d4c5e;p=dbsrgits%2FDBIx-Class-Historic.git fix last patch --- diff --git a/lib/DBIx/Class.pm b/lib/DBIx/Class.pm index f1fa595..463e4fb 100644 --- a/lib/DBIx/Class.pm +++ b/lib/DBIx/Class.pm @@ -82,15 +82,11 @@ manual below. =head1 SEE ALSO -=over 4 +=head2 L - DBIC Core Classes -=item L - DBIC Core Classes +=head2 L - L Compat layer. -=item L - L Compat layer. - -=item L - User's manual. - -=back +=head2 L - User's manual. =head1 AUTHOR diff --git a/lib/DBIx/Class/DB.pm b/lib/DBIx/Class/DB.pm index 08282df..e9ff08a 100644 --- a/lib/DBIx/Class/DB.pm +++ b/lib/DBIx/Class/DB.pm @@ -72,7 +72,7 @@ Begins a transaction (does nothing if AutoCommit is off). =cut -sub tx_commit { $_[0]->storage->tx_begin } +sub tx_begin { $_[0]->storage->tx_begin } =head2 tx_commit diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 8b68667..7615adb 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -154,7 +154,12 @@ Issues a commit against the current dbh. =cut sub tx_commit { - $_[0]->dbh->commit if --$TRANSACTION == 0; + if ($TRANSACTION == 0) { + $_[0]->dbh->commit; + } + else { + $_[0]->dbh->commit if --$TRANSACTION == 0; + } } =head2 tx_rollback @@ -164,7 +169,12 @@ Issues a rollback against the current dbh. =cut sub tx_rollback { - --$TRANSACTION == 0 ? $_[0]->dbh->rollback : die $@; + if ($TRANSACTION == 0) { + $_[0]->dbh->rollback; + } + else { + --$TRANSACTION == 0 ? $_[0]->dbh->rollback : die $@; + } } sub _execute {