From: Steve Peters Date: Tue, 21 Nov 2006 03:59:34 +0000 (+0000) Subject: "This is going to be slow." This change switches OpenBSD locale X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=87e33296bf0538cd7a52dd3a42dce8c2210d7406;p=p5sagit%2Fp5-mst-13.2.git "This is going to be slow." This change switches OpenBSD locale tests from the spaghetti doneness test to specifically testing locales in its /usr/share/locale. Speeds up lib/locale.t to 13 minutes a run vs. the previous time of over two hours. p4raw-id: //depot/perl@29332 --- diff --git a/lib/locale.t b/lib/locale.t index 666b9a9..c3a9d94 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -399,6 +399,17 @@ if (-x "/usr/bin/locale" && open(LOCALES, "/usr/bin/locale -a 2>/dev/null|")) { trylocale($_); } close(LOCALES); +} elsif ($^O eq 'openbsd' && -e '/usr/share/locale') { + + # OpenBSD doesn't have a locale executable, so reading /usr/share/locale + # is much easier and faster than the last resort method. + + opendir(LOCALES, '/usr/share/locale'); + while ($_ = readdir(LOCALES)) { + chomp; + trylocale($_); + } + close(LOCALES); } else { # This is going to be slow.