It changes depending on whether the test is called with -w or not, which
itself depends on the version of Test::Harness used. To add to the
confusion, perl 5.6.1 comes without Test::More, so installing it pulls a
recent version of Test::Harness that does no longer enforces -w.
}
if ($top) {
- $want = "$]" < 5.015_001 ? '' : undef;
- $hints &= ~HINT_BLOCK_SCOPE if $Config{usesitecustomize};
+ $want = "$]" < 5.015_001 ? '' : undef;
+ $hints &= ~HINT_BLOCK_SCOPE if $Config{usesitecustomize};
+ $warnings = sub { use warnings; (caller 0)[9] }->() if "$]" < 5.007
+ and not $^W;
}
my @exp = (