summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/locale.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
committerKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
commit300c1eb6d37d46078d448d6d58938d5a80cd68ff (patch)
tree23a0a8b9f8f5460b405119c4d3c163d2d488ca5e /Master/tlpkg/tlperl/lib/locale.pm
parented55d86b7c5e18f6eccce80a1fb1423ca40a23b5 (diff)
(tl)perl 5.18.2 for windows from siep
git-svn-id: svn://tug.org/texlive/trunk@33648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/locale.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/locale.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/Master/tlpkg/tlperl/lib/locale.pm b/Master/tlpkg/tlperl/lib/locale.pm
index e57a5fded24..ed254cc5d0e 100644
--- a/Master/tlpkg/tlperl/lib/locale.pm
+++ b/Master/tlpkg/tlperl/lib/locale.pm
@@ -1,6 +1,7 @@
package locale;
-our $VERSION = '1.01';
+our $VERSION = '1.02';
+use Config;
$Carp::Internal{ (__PACKAGE__) } = 1;
@@ -46,6 +47,14 @@ Unicode and locales, including UTF-8 locales.
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."
+
=cut
# A separate bit is used for each of the two forms of the pragma, as they are
@@ -60,6 +69,12 @@ $locale::not_chars_hint_bits = 0x10;
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") {