+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
# 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 {
use Test::More;
-use lib 't/lib';
-
use DBICTest;
use File::Find;
use File::Spec;
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) {
sub find_modules {
my @modules;
- find({
+ find( {
wanted => sub {
-f $_ or return;
s/\.pm$// or return;
push @modules, join ('::', File::Spec->splitdir($_));
},
no_chdir => 1,
- }, (-e 'blib' ? 'blib' : 'lib') );
+ }, (
+ # find them in both lib and blib, duplicates are fine, since
+ # @INC is preadjusted for us by the harness
+ 'lib',
+ ( -e 'blib' ? 'blib' : () ),
+ ));
return sort @modules;
}