From: Yuval Kogman Date: Wed, 30 Jul 2008 03:52:22 +0000 (+0000) Subject: detab X-Git-Tag: v0.900201~85 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=794e01faf02a8152ef3a1e25cde42c049d8c92c2;p=dbsrgits%2FDBIx-Class-Journal.git detab --- diff --git a/lib/DBIx/Class/Schema/Journal.pm b/lib/DBIx/Class/Schema/Journal.pm index 5f56edb..d12fa93 100644 --- a/lib/DBIx/Class/Schema/Journal.pm +++ b/lib/DBIx/Class/Schema/Journal.pm @@ -187,19 +187,19 @@ sub txn_do # wrap the thunk with a new changeset creation $code = sub { - my $changeset = $jschema->journal_create_changeset( parent_id => $current_changeset ); - local $current_changeset_ref->{changeset} = $changeset->ID; - $user_code->(@_); - }; + my $changeset = $jschema->journal_create_changeset( parent_id => $current_changeset ); + local $current_changeset_ref->{changeset} = $changeset->id; + $user_code->(@_); + }; } - if ( $jschema != $self ) { - my $inner_code = $code; - $code = sub { $jschema->txn_do($inner_code, @_) }; - } + if ( $jschema->storage != $self->storage ) { + my $inner_code = $code; + $code = sub { $jschema->txn_do($inner_code, @_) }; + } - return $self->next::method($code, @args); + return $self->next::method($code, @args); } sub changeset_user