X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F98savepoints.t;fp=t%2F98savepoints.t;h=53d5d627a5b1ed7a5bfb226a6a3834e729323afb;hb=65d351219882184861384aedac6f251b6797d0d7;hp=03365ec150f82d5272e7299cfc2c17614b122432;hpb=9345b14c6c86aa8888bf5d47a569ee9bbde24f47;p=dbsrgits%2FDBIx-Class.git diff --git a/t/98savepoints.t b/t/98savepoints.t index 03365ec..53d5d62 100644 --- a/t/98savepoints.t +++ b/t/98savepoints.t @@ -129,17 +129,19 @@ for my $prefix (keys %$env2optdep) { SKIP: { # And now to see if txn_do will behave correctly $schema->txn_do (sub { + my $artycp = $arty; + $schema->txn_do (sub { - $arty->name ('Muff'); - $arty->update; + $artycp->name ('Muff'); + $artycp->update; }); eval { $schema->txn_do (sub { - $arty->name ('Moff'); - $arty->update; - $arty->discard_changes; - is($arty->name,'Moff','Value updated in nested transaction'); + $artycp->name ('Moff'); + $artycp->update; + $artycp->discard_changes; + is($artycp->name,'Moff','Value updated in nested transaction'); $schema->storage->dbh->do ("GUARANTEED TO PHAIL"); }); }; @@ -170,5 +172,7 @@ for my $prefix (keys %$env2optdep) { SKIP: { done_testing; -END { eval { $schema->storage->dbh->do ("DROP TABLE artist") } if defined $schema } - +END { + eval { $schema->storage->dbh->do ("DROP TABLE artist") } if defined $schema; + undef $schema; +}