summaryrefslogtreecommitdiff
path: root/lib/locale.t
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-01-15 17:10:35 -0700
committerKarl Williamson <public@khwilliamson.com>2012-01-21 10:02:52 -0700
commit0b9f254b1f58917687924277b52705f52f90a43d (patch)
tree7c64cfe53409351bbd95b6edcf65f1b9bd0195df /lib/locale.t
parent6cf0b5678c6f2ad5dad993e844b20fde2f63bb83 (diff)
downloadperl-0b9f254b1f58917687924277b52705f52f90a43d.tar.gz
locale.t: Don't test a locale twice
Don't add it to the list if already there.
Diffstat (limited to 'lib/locale.t')
-rw-r--r--lib/locale.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/locale.t b/lib/locale.t
index d181f256a6..99b3a15a15 100644
--- a/lib/locale.t
+++ b/lib/locale.t
@@ -346,6 +346,7 @@ sub getalnum_ {
sub trylocale {
my $locale = shift;
+ return if grep { $locale eq $_ } @Locale;
if (setlocale(LC_ALL, $locale)) {
push @Locale, $locale;
}