diff options
author | Karl Williamson <khw@cpan.org> | 2022-08-10 09:06:25 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-08-18 07:57:30 -0600 |
commit | 11154ad96a3efb326e4c10d698b28727c65e5768 (patch) | |
tree | c4ac9eb69075d363cf19e5f1214978ae2e88dfb3 | |
parent | 0f81abe0dfe47bc7cfc1030ba8c1ddfb00f8e085 (diff) | |
download | perl-11154ad96a3efb326e4c10d698b28727c65e5768.tar.gz |
loc_tools.pl: Move code in file
This is for future commits to call after it is defined
-rw-r--r-- | t/loc_tools.pl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl index a3212f843b..2d083d6e84 100644 --- a/t/loc_tools.pl +++ b/t/loc_tools.pl @@ -96,6 +96,19 @@ sub _my_fail($) { my $ctype_excluded = category_excluded('LC_CTYPE'); +sub valid_locale_categories() { + # Returns a list of the locale categories (expressed as strings, like + # "LC_ALL) known to this program that are available on this platform. + + return grep { ! category_excluded($_) } @platform_categories; +} + +sub is_category_valid($) { + my $name = shift; + $name = 'LC_' . $name =~ s/^LC_//r; + return grep { $name eq $_ } valid_locale_categories(); +} + sub _trylocale ($$$$) { # For use only by other functions in this file! # Adds the locale given by the first parameter to the list given by the @@ -210,19 +223,6 @@ sub _decode_encodings { # For use only by other functions in this file! return @enc; } -sub valid_locale_categories() { - # Returns a list of the locale categories (expressed as strings, like - # "LC_ALL) known to this program that are available on this platform. - - return grep { ! category_excluded($_) } @platform_categories; -} - -sub is_category_valid($) { - my $name = shift; - $name = 'LC_' . $name =~ s/^LC_//r; - return grep { $name eq $_ } valid_locale_categories(); -} - sub locales_enabled(;$) { # If no parameter is specified, the function returns 1 if there is any # "safe" locale handling available to the caller; otherwise 0. Safeness |