This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
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.