[Bast-commits] r4467 -
DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI
jnapiorkowski at dev.catalyst.perl.org
jnapiorkowski at dev.catalyst.perl.org
Wed Jun 4 18:49:15 BST 2008
Author: jnapiorkowski
Date: 2008-06-04 18:49:15 +0100 (Wed, 04 Jun 2008)
New Revision: 4467
Modified:
DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm
Log:
fixed boneheaded failure to properly propogate txn_do
Modified: DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm
===================================================================
--- DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm 2008-06-04 17:12:45 UTC (rev 4466)
+++ DBIx-Class/0.08/branches/replication_dedux/lib/DBIx/Class/Storage/DBI/Replicated.pm 2008-06-04 17:49:15 UTC (rev 4467)
@@ -224,6 +224,7 @@
update
delete
dbh
+ txn_do
txn_commit
txn_rollback
sth
@@ -470,7 +471,7 @@
$schema->storage->read_handler($write_handler);
}
-=head2 txn_do ($coderef)
+=head2 around: txn_do ($coderef)
Overload to the txn_do method, which is delegated to whatever the
L<write_handler> is set to. We overload this in order to wrap in inside a
@@ -478,10 +479,10 @@
=cut
-sub txn_do {
- my($self, $coderef, @args) = @_;
- $self->execute_reliably($coderef, @args);
-}
+around 'txn_do' => sub {
+ my($txn_do, $self, $coderef, @args) = @_;
+ $self->execute_reliably(sub {$self->$txn_do($coderef, @args)});
+};
=head2 reload_row ($row)
More information about the Bast-commits
mailing list