add system locale testing for VMS
authorPeter Prymmer <PPrymmer@factset.com>
Mon, 20 Nov 2000 12:56:52 +0000 (04:56 -0800)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 20 Nov 2000 22:44:04 +0000 (22:44 +0000)
Message-ID: <Pine.OSF.4.10.10011201244390.376086-100000@aspara.forte.com>

p4raw-id: //depot/perl@7787

t/pragma/locale.t

index 0e11c95..a1ec7a1 100755 (executable)
@@ -367,6 +367,15 @@ if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a|")) {
        trylocale($_);
     }
     close(LOCALES);
+} elsif ($^O eq 'VMS' && defined($ENV{'SYS$I18N_LOCALE'}) && -d 'SYS$I18N_LOCALE') {
+# The SYS$I18N_LOCALE logical name search list was not present on 
+# VAX VMS V5.5-12, but was on AXP && VAX VMS V6.2 as well as later versions.
+    opendir(LOCALES, "SYS\$I18N_LOCALE:");
+    while ($_ = readdir(LOCALES)) {
+        chomp;
+        trylocale($_);
+    }
+    close(LOCALES);
 } else {
 
     # This is going to be slow.