summaryrefslogtreecommitdiff
path: root/lib/charnames.pm
diff options
context:
space:
mode:
authorKarl Williamson <khw@khw-desktop.(none)>2010-06-30 15:19:39 -0600
committerJesse Vincent <jesse@bestpractical.com>2010-07-04 21:43:43 +0100
commitb342e77e748bf7cae399ffbf26e9dc582ccbe9ae (patch)
tree959c1b9504c19c62d5a1d811749feb188cc6e66c /lib/charnames.pm
parent0320cda07264be63db1ffb5e9512ee11cad682e8 (diff)
downloadperl-b342e77e748bf7cae399ffbf26e9dc582ccbe9ae.tar.gz
charnames: add CORE:: to hex()
Other programs do this; I don't know why just hex() needs to be protected from user override, but I'm just copying prior art.
Diffstat (limited to 'lib/charnames.pm')
-rw-r--r--lib/charnames.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/charnames.pm b/lib/charnames.pm
index 3ef3711116..5cd9e4002f 100644
--- a/lib/charnames.pm
+++ b/lib/charnames.pm
@@ -438,7 +438,7 @@ sub alias (@)
$inverse_user_aliases{sprintf("%04X", $value)} = $name;
}
elsif ($value =~ $hex_qr) {
- my $decimal = hex $1;
+ my $decimal = CORE::hex $1;
$user_numeric_aliases{$name} = $decimal;
# Must convert to decimal and back to guarantee canonical form
@@ -668,7 +668,7 @@ sub viacode
}
# checking the length first is slightly faster
- if (length($hex) > 5 && hex($hex) > 0x10FFFF) {
+ if (length($hex) > 5 && CORE::hex($hex) > 0x10FFFF) {
carp "Unicode characters only allocated up to U+10FFFF (you asked for U+$hex)";
return;
}