summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-05-05 20:46:21 -0600
committerKarl Williamson <khw@cpan.org>2018-06-25 07:33:30 -0600
commita1c8344dcb15e1c52b83ca71795ec7c711bda53e (patch)
treeec1cdb33612911043ed5af7d2d3737ddc7d288dc /regen
parent46958d96a9f416988d92f9b2ef7da55b9752bd12 (diff)
downloadperl-a1c8344dcb15e1c52b83ca71795ec7c711bda53e.tar.gz
regen/mk_invlists.pl: Fix chicken and egg problem
The problem here is that it was using a regular expression pattern to determine if a code point is the integer 0. When a new Unicode release comes along and adds a new block of decimals, this routine should be run before the interpreter is compiled for real. And the pattern won't know about the new block, so this would fail. Solve the problem by using only Unicode::UCD to discover this info, and not a pattern.
Diffstat (limited to 'regen')
-rw-r--r--regen/mk_invlists.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl
index 7cf5d735e3..e38e9d78c9 100644
--- a/regen/mk_invlists.pl
+++ b/regen/mk_invlists.pl
@@ -8,6 +8,7 @@ use Unicode::UCD qw(prop_aliases
prop_invlist
prop_invmap search_invlist
charprop
+ num
);
require './regen/regen_lib.pl';
require './regen/charset_translations.pl';
@@ -628,7 +629,7 @@ sub output_invmap ($$$$$$$) {
# that.
for (my $i = 0; $i < @decimals_invlist; $i += 2) {
my $code_point = $decimals_invlist[$i];
- next if chr($code_point) !~ /\p{Nv=0}/;
+ next if num(chr($code_point)) ne '0';
# Turn the scripts this zero is in into a list.
my @scripts = split ",",