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.
$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
}
# 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;
}