Subject: | Will not work in 5.32 going forward |
This module reads lib/unicore/Name.pl. That file is an core-perl-internal file, and its format has changed, so the module now fails. Since Perl v5.16, there has been an alternative method for getting this information. And the recipe to do so is already written out for you.,
perldoc Unicode::UCD
look for the "Getting every available name" description. Here it is for your convenience
my (%name, %cp, %cps, $n);
# All codepoints
foreach my $cat (qw( Name Name_Alias )) {
my ($codepoints, $names, $format, $default) = prop_invmap($cat);
# $format => "n", $default => ""
foreach my $i (0 .. @$codepoints - 2) {
my ($cp, $n) = ($codepoints->[$i], $names->[$i]);
# If $n is a ref, the same codepoint has multiple names
foreach my $name (ref $n ? @$n : $n) {
$name{$cp} //= $name;
$cp{$name} //= $cp;
}
}
}
# Named sequences
{ my %ns = namedseq();
foreach my $name (sort { $ns{$a} cmp $ns{$b} } keys %ns) {
$cp{$name} //= [ map { ord } split "" => $ns{$name} ];
}
}
It may be there are bugs in the earlier versions of Unicode::UCD. Or there might not be. But you could do the Name.pl thing on versions 5.30 and earlier, and the above recipe for later.