This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix version's test scripts' $Verbose flag
authorSteve Hay <steve.m.hay@googlemail.com>
Mon, 19 Aug 2013 14:43:01 +0000 (15:43 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Mon, 19 Aug 2013 15:16:11 +0000 (16:16 +0100)
The four scripts that use it should declare it a package variable, not a
lexical, otherwise the typeglob used in coretests.pm won't affect it.
Also, we want to set $Verbose to 0, not to $0, if $ENV{PERL_CORE} is set.

These customizations are being pushed upstream in CPAN RT#87513.

Porting/Maintainers.pl
cpan/version/t/01base.t
cpan/version/t/02derived.t
cpan/version/t/03require.t
cpan/version/t/04strict_lax.t
cpan/version/t/07locale.t
cpan/version/t/coretests.pm
t/porting/customized.dat

index fe90ab9..4e6f620 100755 (executable)
@@ -1960,7 +1960,12 @@ use File::Glob qw(:case);
         # Waiting to be merged upstream: see CPAN RT#87513
         'CUSTOMIZED'   => [
             qw( lib/version.pm
+                t/01base.t
+                t/02derived.t
+                t/03require.t
+                t/04strict_lax.t
                 t/07locale.t
+                t/coretests.pm
                 ),
         ],
 
index a178ab5..e6df81a 100644 (file)
@@ -5,7 +5,7 @@
 #########################
 
 use Test::More qw/no_plan/;
-my $Verbose;
+our $Verbose;
 
 BEGIN {
     (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
index 849a45a..afdf531 100644 (file)
@@ -6,7 +6,7 @@
 
 use Test::More qw/no_plan/;
 use File::Temp qw/tempfile/;
-my $Verbose;
+our $Verbose;
 
 BEGIN {
     (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
index 7f3e26a..316ea24 100644 (file)
@@ -5,7 +5,7 @@
 #########################
 
 use Test::More qw/no_plan/;
-my $Verbose;
+our $Verbose;
 
 BEGIN {
     (my $coretests = $0) =~ s'[^/]+\.t'coretests.pm';
index 2c94448..24a7215 100644 (file)
@@ -5,7 +5,6 @@
 #########################
 
 use Test::More qw/no_plan/;
-my $Verbose;
 
 # do strict lax tests in a sub to isolate a package to test importing
 SKIP: {
index dcb0536..ab2affc 100644 (file)
@@ -9,7 +9,7 @@ use File::Temp qw/tempfile/;
 use POSIX qw/locale_h/;
 use Test::More tests => 7;
 use Config;
-my $Verbose;
+our $Verbose;
 
 BEGIN {
     use_ok('version', 0.9903);
index 92aeae2..df1984a 100644 (file)
@@ -2,7 +2,7 @@
 package main;
 require Test::Harness;
 *Verbose = \$Test::Harness::Verbose;
-*Verbose = 0 if $ENV{PERL_CORE};
+$Verbose = 0 if $ENV{PERL_CORE};
 use Data::Dumper;
 use File::Temp qw/tempfile/;
 use File::Basename;
index 4c995c1..6bf9ec7 100644 (file)
@@ -20,4 +20,9 @@ podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d
 podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69
 podlators pod/perlpodstyle.pod dcf4b8f67d963e215f0e2e1cd214246705163a79
 version cpan/version/lib/version.pm b85a5137501de9be734c475d3b0bcaba95f92b1f
-version cpan/version/t/07locale.t 95a8bc9f8e9e632f60e9679b193f59cd12a3b7c0
+version cpan/version/t/01base.t 10b3cee80d3028797fc5bd4fdbfaf582b791e8dc
+version cpan/version/t/02derived.t 304eca7c9ba2bcf4a2adc4a4713a80deda2d1a3f
+version cpan/version/t/03require.t 39c905bbb6ef69902655bf8c4cfab756cef17c27
+version cpan/version/t/04strict_lax.t 4bc2722e914d98a7cbd948704288d4be977a0e29
+version cpan/version/t/07locale.t 53a04fd4985e1f6f157523c9f470dceaa23400bd
+version cpan/version/t/coretests.pm 71efdf84f5011c045596fcc569a12850778e2317