my ($initial_inc_contents, $expected_dbic_deps, $require_sites);
BEGIN {
- # these envvars *will* bring in more stuff than the baseline
- delete @ENV{qw(DBICTEST_SQLT_DEPLOY DBIC_TRACE)};
-
- # make sure extras do not load even when this is set
- $ENV{PERL_STRICTURES_EXTRA} = 1;
-
unshift @INC, 't/lib';
require DBICTest::Util::OverrideRequire;
CORE::require('Test/More.pm');
Test::More::fail ("Unexpected require of '$req' by $caller[0] ($caller[1] line $caller[2])");
- if ( $ENV{TEST_VERBOSE} or ! DBICTest::RunMode->is_plain ) {
- CORE::require('DBICTest/Util.pm');
- Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
- }
+ CORE::require('DBICTest/Util.pm');
+ Test::More::diag( 'Require invoked' . DBICTest::Util::stacktrace() );
}
return $res;
plan skip_all => 'A defined PERL5OPT may inject extra deps crashing this test'
if $ENV{PERL5OPT};
+ plan skip_all => 'Presence of sitecustomize.pl may inject extra deps crashing this test'
+ if grep { $_ =~ m| \/ sitecustomize\.pl $ |x } keys %INC;
+
plan skip_all => 'Dependency load patterns are radically different before perl 5.10'
if "$]" < 5.010;
+ # these envvars *will* bring in more stuff than the baseline
+ delete @ENV{qw(
+ DBIC_TRACE
+ DBICTEST_SQLT_DEPLOY
+ DBICTEST_VIA_REPLICATED
+ DBICTEST_DEBUG_CONCURRENCY_LOCKS
+ )};
+
+ $ENV{DBICTEST_ANFANG_DEFANG} = 1;
+
+ # make sure extras do not load even when this is set
+ $ENV{PERL_STRICTURES_EXTRA} = 1;
+
# add what we loaded so far
for (keys %INC) {
my $mod = $_;
}
}
-BEGIN { $ENV{DBICTEST_VIA_REPLICATED} = 0 }
#######
### This is where the test starts
my $nl;
for my $mod (keys %$expected_dbic_deps) {
(my $modfn = "$mod.pm") =~ s/::/\//g;
- unless ($INC{$modfn}) {
- my $err = sprintf "Expected DBIC core dependency '%s' never loaded - %s needs adjustment", $mod, __FILE__;
- if (DBICTest::RunMode->is_smoker or DBICTest::RunMode->is_author) {
- fail ($err)
- }
- else {
- diag "\n" unless $nl->{$mod}++;
- diag $err;
- }
- }
+ fail sprintf (
+ "Expected DBIC core dependency '%s' never loaded - %s needs adjustment",
+ $mod,
+ __FILE__
+ ) unless $INC{$modfn};
}
pass(sprintf 'All modules expected at %s line %s loaded by DBIC: %s',
__FILE__,