Lose another dependency: Class::Inspector
[dbsrgits/DBIx-Class.git] / xt / extra / internals / namespaces_cleaned.t
index 92185ae..3f70262 100644 (file)
@@ -1,5 +1,7 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 BEGIN {
-  if ($] < 5.010) {
+  if ( "$]" < 5.010) {
 
     # Pre-5.10 perls pollute %INC on unsuccesfull module
     # require, making it appear as if the module is already
@@ -16,7 +18,7 @@ BEGIN {
     # we want to do this here, in the very beginning, before even
     # warnings/strict are loaded
 
-    unshift @INC, 't/lib';
+
     require DBICTest::Util::OverrideRequire;
 
     DBICTest::Util::OverrideRequire::override_global_require( sub {
@@ -35,8 +37,6 @@ use warnings;
 
 use Test::More;
 
-use lib 't/lib';
-
 use DBICTest;
 use File::Find;
 use File::Spec;
@@ -90,10 +90,6 @@ my $has_moose = eval { require Moose::Util };
 
 Sub::Defer::undefer_all();
 
-# can't use Class::Inspector for the mundane parts as it does not
-# distinguish imports from anything else, what a crock of...
-# Moose is not always available either - hence just do it ourselves
-
 my $seen; #inheritance means we will see the same method multiple times
 
 for my $mod (@modules) {