package locale;
-our $VERSION = '1.02';
+our $VERSION = '1.03';
use Config;
$Carp::Internal{ (__PACKAGE__) } = 1;
See L<perllocale> for more detailed information on how Perl supports
locales.
-=head1 NOTE
-
-If your system does not support locales, then loading this module will
-cause the program to die with a message:
-
- "Your vendor does not support locales, you cannot use the locale
- module."
+On systems that don't have locales, this pragma will cause your operations
+to behave as if in the "C" locale; attempts to change the locale will fail.
=cut
sub import {
shift; # should be 'locale'; not checked
- if(!$Config{d_setlocale}) {
- ## No locale support found on this Perl, giving up:
- die('Your vendor does not support locales, you cannot use the locale module.');
- }
-
my $found_not_chars = 0;
while (defined (my $arg = shift)) {
if ($arg eq ":not_characters") {
enhancements. Particularly prominent performance optimisations could go
here, but most should go in the L</Performance Enhancements> section.
-[ List each enhancement as a =head2 entry ]
+=head2 C<S<use locale>> now compiles on systems without locale ability
+
+Previously doing this caused the program to not compile. Within its
+scope the program behaves as if in the "C" locale. Thus programs
+written for platforms that support locales can run on locale-less
+platforms without change. Attempts to change the locale away from the
+"C" locale will, of course, fail.
=head1 Security