Hi,
Apparently there is a later release of perl, beyond 7595 that
addresses the delete($ENV{PATH}); problem of the 7595 [.t.pragma]locale.t
test. Nevertheless there are at least two possible approaches to
fixing the test, with the first of this being the fix that was probably
put in most recently:
--- perl/t/pragma/locale.t.orig Mon Nov 6 12:59:29 2000
+++ perl/t/pragma/locale.t Wed Nov 8 12:12:29 2000
@@ -354,8 +354,9 @@
# Sanitize the environment so that we can run the external 'locale'
# program without the taint mode getting grumpy.
-delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
+delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)} unless ($^O eq 'VMS');
if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
while (<LOCALES>) {
chomp;
End of Patch 0
The other is a bit more extensive but appears to work on some of my
systems. It does on VMS the analog of looking for /usr/locale on unix,
like so:
--- perl/t/pragma/locale.t.orig Mon Nov 6 12:59:29 2000
+++ perl/t/pragma/locale.t Wed Nov 8 14:02:04 2000
@@ -354,13 +354,21 @@
# Sanitize the environment so that we can run the external 'locale'
# program without the taint mode getting grumpy.
-delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
+delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)} unless ($^O eq 'VMS');
+# check SYS$I18N_LOCALE logical name search list on VMS
if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
while (<LOCALES>) {
chomp;
trylocale($_);
}
+ close(LOCALES);
+} elsif ($^O eq 'VMS' && $ENV{'SYS$I18N_LOCALE'} && -d 'SYS$I18N_LOCALE') {
+ opendir(LOCALES, "SYS\$I18N_LOCALE:");
+ while ($_ = readdir(LOCALES)) {
+ chomp;
+ trylocale($_);
+ }
close(LOCALES);
} else {
End of Patch 1.
I note that the former appears to do more testing on VMS since the
locale.t test tries "both" of 'Locale = en_US.ISO8859-1' and
'Locale = en_us.ISO8859-1', however the newer readdir() code does seem
to progress faster on my test system.
Does anyone out there have a preference for either approach? I am leaning
toward the latter (Patch 1) unless I hear an objection.... Thank you.
Peter Prymmer