X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FInformix.pm;h=e8c123d4cb62d39af0b678ec142a6d3f6689580a;hb=ab7c6418e3ea4fde7d58df897b5609fa41829161;hp=cab66da990b7dc8d6bba95b810ea944eb27948d2;hpb=28916ecdc2d6c5d420bfb1bd5987df4953f31e28;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/Informix.pm b/lib/DBIx/Class/Storage/DBI/Informix.pm index cab66da..e8c123d 100644 --- a/lib/DBIx/Class/Storage/DBI/Informix.pm +++ b/lib/DBIx/Class/Storage/DBI/Informix.pm @@ -66,13 +66,11 @@ sub with_deferred_fk_checks { $self->_do_query('SET CONSTRAINTS ALL DEFERRED'); - return preserve_context { - my $inner_self = $self; # avoid nested closure leak on 5.8 - my $sg = Scope::Guard->new(sub { - $inner_self->_do_query('SET CONSTRAINTS ALL IMMEDIATE'); - }); - $sub->() - } after => sub { $txn_scope_guard->commit }; + my $sg = Scope::Guard->new(sub { + $self->_do_query('SET CONSTRAINTS ALL IMMEDIATE'); + }); + + return preserve_context { $sub->() } after => sub { $txn_scope_guard->commit }; } =head2 connect_call_datetime_setup