# 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.
use lib 't/lib';
# 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.
use lib 't/lib';
- $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;
+ }
is_deeply [ context_info ], $exp0, 'main : context_info';
is_deeply [ context_info(HERE) ], $exp0, 'main : context_info HERE';
is_deeply [ context_info ], $exp0, 'main : context_info';
is_deeply [ context_info(HERE) ], $exp0, 'main : context_info HERE';
is_deeply [ context_info(-1) ], $exp0, 'main : context_info -1';
package Scope::Upper::TestPkg::A; BEGIN { ::setup }
is_deeply [ context_info(-1) ], $exp0, 'main : context_info -1';
package Scope::Upper::TestPkg::A; BEGIN { ::setup }