source: for-distributions/trunk/bin/windows/perl/lib/locale.pm@ 14489

Last change on this file since 14489 was 14489, checked in by oranfry, 17 years ago

upgrading to perl 5.8

File size: 820 bytes
Line 
1package locale;
2
3our $VERSION = '1.00';
4
5=head1 NAME
6
7locale - Perl pragma to use and avoid POSIX locales for built-in operations
8
9=head1 SYNOPSIS
10
11 @x = sort @y; # ASCII sorting order
12 {
13 use locale;
14 @x = sort @y; # Locale-defined sorting order
15 }
16 @x = sort @y; # ASCII sorting order again
17
18=head1 DESCRIPTION
19
20This pragma tells the compiler to enable (or disable) the use of POSIX
21locales for built-in operations (LC_CTYPE for regular expressions, and
22LC_COLLATE for string comparison). Each "use locale" or "no locale"
23affects statements to the end of the enclosing BLOCK.
24
25See L<perllocale> for more detailed information on how Perl supports
26locales.
27
28=cut
29
30$locale::hint_bits = 0x4;
31
32sub import {
33 $^H |= $locale::hint_bits;
34}
35
36sub unimport {
37 $^H &= ~$locale::hint_bits;
38}
39
401;
Note: See TracBrowser for help on using the repository browser.