In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bdba2fe9e3256f8806a5facb73d1f427775783ba?hp=548c8afce3d3a412eff8c2d28778adbc3186fdc1>

- Log -----------------------------------------------------------------
commit bdba2fe9e3256f8806a5facb73d1f427775783ba
Author: Craig A. Berry <[email protected]>
Date:   Fri Sep 2 15:43:52 2016 -0500

    Don't pollute $ENV{LC_ALL} in pod/perlmodlib.PL.
    
    Because on VMS, DYNAMIC_ENV_FETCH makes environment settings
    persist after program exit, and running a program (e.g. Perl)
    does not normally start a separate process.  This was confusing
    the inadequate attempt in t/run/locale.t to clear the locale-related
    environment variables.

M       pod/perlmodlib.PL

commit f7d258b8c0e33bddf8cb44e2e54d9d244602e2b4
Author: Craig A. Berry <[email protected]>
Date:   Fri Sep 2 14:59:25 2016 -0500

    Delete localized %ENV entries in t/run/locale.t.
    
    Localizing %ENV entries actually instantiates them with an undef
    value, which, at least on VMS, gets propagated to the various
    runperl subprocesses where it can trigger locale warnings at start-up
    time.  Deleting the localized entries, though, actually removes
    them from the localized %ENV:
    
    $ perl -E '{ local $ENV{FOO}; say exists $ENV{FOO} ? 'Y' : 'N'; }'
    Y
    $ perl -E '{ delete local $ENV{FOO}; say exists $ENV{FOO} ? 'Y' : 'N'; }'
    N
    
    but any pre-existing values in outer scope are safely restored when
    the local scope exits.
    
    This gets this test passing on VMS again for the first time in a
    very long time.  It turns out pod/perlmodlib.PL has been polluting
    LC_ALL and this test has not been adequately defending itself.

M       t/run/locale.t

commit cd0b934ecc0e9cc495ce66477e4d6721815940e9
Author: Craig A. Berry <[email protected]>
Date:   Fri Sep 2 14:17:45 2016 -0500

    More stderr suppression in t/run/locale.t.
    
    Closing stderr in the parent process doesn't have any effect on
    Perl in the subprocess on VMS, so use the facility in the test
    infrastructure to suppress stderr there as well.

M       t/run/locale.t
-----------------------------------------------------------------------

Summary of changes:
 pod/perlmodlib.PL |  2 +-
 t/run/locale.t    | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/pod/perlmodlib.PL b/pod/perlmodlib.PL
index 484d906..615ae4c 100644
--- a/pod/perlmodlib.PL
+++ b/pod/perlmodlib.PL
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-$ENV{LC_ALL} = 'C';
+local $ENV{LC_ALL} = 'C';
 
 my $Quiet;
 @ARGV = grep { not($_ eq '-q' and $Quiet = 1) } @ARGV;
diff --git a/t/run/locale.t b/t/run/locale.t
index 09e76f8..33c16b2 100644
--- a/t/run/locale.t
+++ b/t/run/locale.t
@@ -28,7 +28,7 @@ my @locales = eval { find_locales( [ &LC_ALL, &LC_CTYPE, 
&LC_NUMERIC ],
 skip_all("no locales available") unless @locales;
 
 # reset the locale environment
-local @ENV{'LANG', (grep /^LC_/, keys %ENV)};
+delete local @ENV{'LANG', (grep /^LC_/, keys %ENV)};
 
 plan tests => &last;
 
@@ -358,7 +358,7 @@ EOF
             use 5.008;
             print setlocale(LC_NUMERIC);
 EOF
-        "C", { },
+        "C", { stderr => 'devnull' },
          "No compile error on v-strings when setting the locale to non-dot 
radix at compile time when default environment has non-dot radix");
     }
 
@@ -377,7 +377,7 @@ EOF
             }
             print \$i, "\n";
 EOF
-            "1,5\n1.5", {}, "Radix print properly in locale scope, and 
without");
+            "1,5\n1.5", { stderr => 'devnull' }, "Radix print properly in 
locale scope, and without");
 
         fresh_perl_is(<<"EOF",
             my \$i = 1.5;   # Should be exactly representable as a base 2
@@ -389,7 +389,7 @@ EOF
             \$i += 1;
             print \$i, "\n";
 EOF
-            "1,5\n2,5", {}, "Can do math when radix is a comma"); # [perl 
115800]
+            "1,5\n2,5", { stderr => 'devnull' }, "Can do math when radix is a 
comma"); # [perl 115800]
 
         unless ($have_strtod) {
             skip("no strtod()", 1);
@@ -402,7 +402,7 @@ EOF
                 \$one_point_5 =~ s/0+\$//;  # Remove any trailing zeros
                 print \$one_point_5, "\n";
 EOF
-            "1.5", {}, "POSIX::strtod() uses underlying locale");
+            "1.5", { stderr => 'devnull' }, "POSIX::strtod() uses underlying 
locale");
         }
     }
 } # SKIP
@@ -415,7 +415,7 @@ EOF
                 print "h" =~ /[g\\w]/i || 0;
                 print "\\n";
 EOF
-            1, {}, "/il matching of [bracketed] doesn't skip POSIX class if 
fails individ char");
+            1, { stderr => 'devnull' }, "/il matching of [bracketed] doesn't 
skip POSIX class if fails individ char");
     }
 
     {
@@ -426,7 +426,7 @@ EOF
                 print "0" =~ /[\\d[:punct:]]/l || 0;
                 print "\\n";
 EOF
-            1, {}, "/l matching of [bracketed] doesn't skip non-first POSIX 
class");
+            1, { stderr => 'devnull' }, "/l matching of [bracketed] doesn't 
skip non-first POSIX class");
 
     }
 

--
Perl5 Master Repository

Reply via email to