X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fdatetime_mssql.t;h=1c32f10dfe027e7ed2a71a4eace175491540427d;hb=65d351219882184861384aedac6f251b6797d0d7;hp=822cc8484ba95af4268694f9a5d9aafc0dacc5ea;hpb=9345b14c6c86aa8888bf5d47a569ee9bbde24f47;p=dbsrgits%2FDBIx-Class.git diff --git a/t/inflate/datetime_mssql.t b/t/inflate/datetime_mssql.t index 822cc84..1c32f10 100644 --- a/t/inflate/datetime_mssql.t +++ b/t/inflate/datetime_mssql.t @@ -73,7 +73,7 @@ for my $connect_info (@connect_info) { } } - my $guard = Scope::Guard->new(\&cleanup); + my $guard = Scope::Guard->new(sub{ cleanup($schema) }); # $^W because DBD::ADO is a piece of crap try { local $^W = 0; $schema->storage->dbh->do("DROP TABLE track") }; @@ -151,6 +151,7 @@ done_testing; # clean up our mess sub cleanup { + my $schema = shift; if (my $dbh = eval { $schema->storage->dbh }) { $dbh->do('DROP TABLE track'); $dbh->do('DROP TABLE event_small_dt');