X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F749sqlanywhere.t;h=396e103223fe080d8109f573430a41de3cb2ff2b;hb=859b7922ff43f671aa6bf2f00d7c8b05ec0cedbb;hp=a0e55f9b32783d78a7c6448b7437b19940f6121a;hpb=8273e845426f0187b4ad6c4a1b42286fa09a648f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/749sqlanywhere.t b/t/749sqlanywhere.t index a0e55f9..396e103 100644 --- a/t/749sqlanywhere.t +++ b/t/749sqlanywhere.t @@ -48,7 +48,7 @@ foreach my $info (@info) { auto_savepoint => 1 }); - my $guard = Scope::Guard->new(\&cleanup); + my $guard = Scope::Guard->new(sub{ cleanup($schema) }); my $dbh = $schema->storage->dbh; @@ -259,6 +259,7 @@ SQL done_testing; sub cleanup { + my $schema = shift; eval { $schema->storage->dbh->do("DROP TABLE $_") } for qw/artist artist_guid bindtype_test/; }