# We're using Test::Leaner here because Test::More loads overload, which itself
# uses warning::register, which may cause the "all warnings on" bitmask to
# change ; and that doesn't fit well with how we're testing things.
# We're using Test::Leaner here because Test::More loads overload, which itself
# uses warning::register, which may cause the "all warnings on" bitmask to
# change ; and that doesn't fit well with how we're testing things.
- $want = "$]" < 5.015_001 ? '' : undef if $top;
+ if ($top) {
+ $want = "$]" < 5.015_001 ? '' : undef;
+ $hints &= ~HINT_BLOCK_SCOPE if $Config{usesitecustomize};
+ $hints |= HINT_BLOCK_SCOPE if "$]" >= 5.019003;
+ $warnings = sub { use warnings; (caller 0)[9] }->() if "$]" < 5.007
+ and not $^W;
+ }