1N/Apackage locale;
1N/A
1N/Aour $VERSION = '1.00';
1N/A
1N/A=head1 NAME
1N/A
1N/Alocale - Perl pragma to use and avoid POSIX locales for built-in operations
1N/A
1N/A=head1 SYNOPSIS
1N/A
1N/A @x = sort @y; # ASCII sorting order
1N/A {
1N/A use locale;
1N/A @x = sort @y; # Locale-defined sorting order
1N/A }
1N/A @x = sort @y; # ASCII sorting order again
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThis pragma tells the compiler to enable (or disable) the use of POSIX
1N/Alocales for built-in operations (LC_CTYPE for regular expressions, and
1N/ALC_COLLATE for string comparison). Each "use locale" or "no locale"
1N/Aaffects statements to the end of the enclosing BLOCK.
1N/A
1N/ASee L<perllocale> for more detailed information on how Perl supports
1N/Alocales.
1N/A
1N/A=cut
1N/A
1N/A$locale::hint_bits = 0x4;
1N/A
1N/Asub import {
1N/A $^H |= $locale::hint_bits;
1N/A}
1N/A
1N/Asub unimport {
1N/A $^H &= ~$locale::hint_bits;
1N/A}
1N/A
1N/A1;