diff options
author | Karl Williamson <khw@cpan.org> | 2019-04-13 12:04:29 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-04-13 12:16:11 -0600 |
commit | e41845ea721b5da4e3e404cf1a32b9641d3955a8 (patch) | |
tree | feafb39341f3abcb72d828ec7b9f1ca5b368eeee /t | |
parent | d373bd46faf465c035c57e089175139afb75d0b3 (diff) | |
download | perl-e41845ea721b5da4e3e404cf1a32b9641d3955a8.tar.gz |
t/loc_tools.pl: No setlocale when no locales
Don't call this function unconditionally. There may be no locale
handling available, so check that first.
Diffstat (limited to 't')
-rw-r--r-- | t/loc_tools.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl index 2d35c59ceb..c76e29388a 100644 --- a/t/loc_tools.pl +++ b/t/loc_tools.pl @@ -569,6 +569,8 @@ sub find_utf8_turkic_locales (;$) { my @return; + return unless locales_enabled('LC_CTYPE'); + my $save_locale = setlocale(&POSIX::LC_CTYPE()); foreach my $locale (find_utf8_ctype_locales(shift)) { use locale; |