From: Peter Rabbitson Date: Fri, 9 Mar 2012 03:40:28 +0000 (+0100) Subject: Fix fallout from a807d012 (folks please run your podtests when hacking POD) X-Git-Tag: v0.08197~99 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=11544e1d2d3ef6c010616c061563996a3b10df37;hp=a807d01239319ad5be90dc7856657f819634a972;p=dbsrgits%2FDBIx-Class.git Fix fallout from a807d012 (folks please run your podtests when hacking POD) - Stray =end in DBIC/DB.pm - Inadvertently hidden documentation of txn_scope_guard (the =for comment never applied to the POD-block previously) --- diff --git a/lib/DBIx/Class/DB.pm b/lib/DBIx/Class/DB.pm index acdb5e6..93eec58 100644 --- a/lib/DBIx/Class/DB.pm +++ b/lib/DBIx/Class/DB.pm @@ -241,8 +241,6 @@ Alias for L =end hidden -=end HIDE_BECAUSE_THIS_CLASS_IS_DEPRECATED - =head1 AUTHORS Matt S. Trout diff --git a/lib/DBIx/Class/Storage.pm b/lib/DBIx/Class/Storage.pm index d72840f..0e162cf 100644 --- a/lib/DBIx/Class/Storage.pm +++ b/lib/DBIx/Class/Storage.pm @@ -460,29 +460,25 @@ sub svp_rollback { $exec->($self, $name); } -=begin comment +=head2 txn_scope_guard - =head2 txn_scope_guard +An alternative way of transaction handling based on +L: - An alternative way of transaction handling based on - L: + my $txn_guard = $storage->txn_scope_guard; - my $txn_guard = $storage->txn_scope_guard; + $row->col1("val1"); + $row->update; - $row->col1("val1"); - $row->update; + $txn_guard->commit; - $txn_guard->commit; - - If an exception occurs, or the guard object otherwise leaves the scope - before C<< $txn_guard->commit >> is called, the transaction will be rolled - back by an explicit L call. In essence this is akin to - using a L/L pair, without having to worry - about calling L at the right places. Note that since there - is no defined code closure, there will be no retries and other magic upon - database disconnection. If you need such functionality see L. - -=end comment +If an exception occurs, or the guard object otherwise leaves the scope +before C<< $txn_guard->commit >> is called, the transaction will be rolled +back by an explicit L call. In essence this is akin to +using a L/L pair, without having to worry +about calling L at the right places. Note that since there +is no defined code closure, there will be no retries and other magic upon +database disconnection. If you need such functionality see L. =cut