diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-11-28 20:35:45 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-11-29 08:59:02 -0700 |
commit | 83adc448c422fb39103f1c69b2cd9cb91392f31b (patch) | |
tree | bf454eb546505b0809d5e1c043048f125a22924c /lib/_charnames.pm | |
parent | 8c6c6997cf2a8cd5e947a61f94ca02dd8b963334 (diff) | |
download | perl-83adc448c422fb39103f1c69b2cd9cb91392f31b.tar.gz |
charnames: Check for enabled warnings before warning
This message should be suppressed if non_unicode warnings are turned
off.
Diffstat (limited to 'lib/_charnames.pm')
-rw-r--r-- | lib/_charnames.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/_charnames.pm b/lib/_charnames.pm index bbb7378a36..c9bca48083 100644 --- a/lib/_charnames.pm +++ b/lib/_charnames.pm @@ -7,7 +7,7 @@ package _charnames; use strict; use warnings; use File::Spec; -our $VERSION = '1.33'; +our $VERSION = '1.34'; use unicore::Name; # mktables-generated algorithmically-defined names use bytes (); # for $bytes::hint_bits @@ -765,7 +765,9 @@ sub viacode { # Here there is no user-defined alias, return any official one. return $return if defined $return; - if (CORE::hex($hex) > 0x10FFFF) { + if (CORE::hex($hex) > 0x10FFFF + && warnings::enabled('non_unicode')) + { carp "Unicode characters only allocated up to U+10FFFF (you asked for U+$hex)"; } return; |