use Test::More;
use Test::Exception;
-use Scope::Guard ();
use Try::Tiny;
use DBIx::Class::Optional::Dependencies ();
+use DBIx::Class::_Util 'scope_guard';
use lib qw(t/lib);
use DBICTest;
auto_savepoint => 1
});
- my $guard = Scope::Guard->new(\&cleanup);
+ my $guard = scope_guard { cleanup($schema) };
my $dbh = $schema->storage->dbh;
ok($rs->find($id)->$type eq $binstr{$size}, "verified inserted $size $type" );
}
}
-
+
my @uuid_types = qw/uniqueidentifier uniqueidentifierstr/;
# test uniqueidentifiers (and the cursor_class).
done_testing;
sub cleanup {
+ my $schema = shift;
eval { $schema->storage->dbh->do("DROP TABLE $_") }
for qw/artist artist_guid bindtype_test/;
}