From: Vincent Pit Date: Fri, 4 Jan 2013 12:25:03 +0000 (+0100) Subject: Correct the top warnings mask for 5.6 in t/07-context_info.t X-Git-Tag: v0.22~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=d5220346a9c7076bca46b2bb61e313750c683a7b;p=perl%2Fmodules%2FScope-Upper.git Correct the top warnings mask for 5.6 in t/07-context_info.t 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. --- diff --git a/t/07-context_info.t b/t/07-context_info.t index 58ea97b..32a943b 100644 --- a/t/07-context_info.t +++ b/t/07-context_info.t @@ -45,8 +45,10 @@ sub expected { } 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 = (