Institute a central "load this first in testing" package
[dbsrgits/DBIx-Class.git] / t / cdbi / early_column_heisenbug.t
index 09ea6d9..8ecea27 100644 (file)
@@ -1,14 +1,11 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
 use strict;
+use warnings;
 
 use Test::More;
 
-BEGIN {
-  eval "use DBIx::Class::CDBICompat;";
-  plan $@ ? (skip_all => "Class::Trigger and DBIx::ContextualFetch required: $@")
-          : ('no_plan');
-}
-
-
 {
     package Thing;
     use base qw(DBIx::Class::CDBICompat);
@@ -25,4 +22,4 @@ is_deeply [Stuff->columns("Essential")], [];
 Thing->columns(Essential => qw(foo bar baz));
 is_deeply [Stuff->columns("Essential")], [];
 
-1;
+done_testing;