Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class-Historic.git] / t / icdt / engine_specific / mssql.t
index 523530a..2756858 100644 (file)
@@ -1,3 +1,4 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
 use DBIx::Class::Optional::Dependencies -skip_all_without => qw( ic_dt _rdbms_mssql_common );
 
 use strict;
@@ -5,9 +6,9 @@ use warnings;
 
 use Test::More;
 use Test::Exception;
-use Scope::Guard ();
 use Try::Tiny;
-use lib qw(t/lib);
+use DBIx::Class::_Util 'scope_guard';
+
 use DBICTest;
 
 my @tdeps = qw( test_rdbms_mssql_odbc test_rdbms_mssql_sybase test_rdbms_mssql_ado );
@@ -52,7 +53,7 @@ for my $connect_info (@connect_info) {
     }
   }
 
-  my $guard = Scope::Guard->new(sub{ cleanup($schema) });
+  my $guard = scope_guard { cleanup($schema) };
 
   # $^W because DBD::ADO is a piece of crap
   try { local $^W = 0; $schema->storage->dbh->do("DROP TABLE track") };