Resolve $rsrc instance duality on metadata traversal
[dbsrgits/DBIx-Class.git] / t / cdbi / 04-lazy.t
index 51d6ad5..96d5743 100644 (file)
@@ -1,5 +1,9 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'cdbicompat';
+
 use strict;
 use warnings;
+
 use Test::More;
 use Test::Warn;
 
@@ -7,10 +11,8 @@ use Test::Warn;
 # Test lazy loading
 #----------------------------------------------------------------------
 
-INIT {
-  use lib 't/cdbi/testlib';
-  use Lazy;
-}
+use lib 't/cdbi/testlib';
+use Lazy;
 
 is_deeply [ Lazy->columns('Primary') ],        [qw/this/],      "Pri";
 is_deeply [ sort Lazy->columns('Essential') ], [qw/opop this/], "Essential";