]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/07-context_info.t
Correct the top warnings mask for 5.6 in t/07-context_info.t
[perl/modules/Scope-Upper.git] / t / 07-context_info.t
index 58ea97b6d579d7c6735178170fa22e73963f0029..32a943be64652ef3e40d85956a30f5cc84727862 100644 (file)
@@ -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 = (