diff options
author | Karl Williamson <khw@cpan.org> | 2016-01-05 15:58:07 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2016-01-08 14:17:11 -0700 |
commit | cbdbe9d466e0d26852ca1ace0825220c8ca7d215 (patch) | |
tree | e7930b8c6c8e02b9a708e276ed604f9a2b83aed6 /lib | |
parent | 4370fbb53fd58942db186cfe1b92689d37f2421e (diff) | |
download | perl-cbdbe9d466e0d26852ca1ace0825220c8ca7d215.tar.gz |
mktables: Add constructor parameter
This new parameter will be used in the next commit, adds a special case
for handling tables that the perl interpreter relies on when compiling
a Unicode version earlier than the property is defined by Unicode. This
will allow for tailoring the property to Perl's needs in the next commit
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 88d341f534..44f900b876 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -2284,6 +2284,11 @@ sub trace { return main::trace(@_); } # may not be the actual reality, but probably nobody cares anyway for # these obsolete characters.) # + # [3] if present must be the string 'ONLY_EARLY'. Normally, when + # compiling Unicode versions that don't invoke the early handling, the + # name in [1] is added as an alias to the property name used for these. + # This parameter says to not do this. + # # Not all files can be handled in the above way, and so the code ref # alternative is available. It can do whatever it needs to. The other # array elements are optional in this case, and the code is free to use or @@ -2404,6 +2409,11 @@ sub trace { return main::trace(@_); } my $progress; my $function_instead_of_file = 0; + if ($early{$addr}->@* > 3 && $early{$addr}[3] ne 'ONLY_EARLY') { + Carp::my_carp_bug("If present, element [3] in 'Early => [ ... ]'" + . " must be the string 'ONLY_EARLY'"); + } + # If we are compiling a Unicode release earlier than the file became # available, the constructor may have supplied a substitute if ($first_released{$addr} gt $v_version && $early{$addr}->@*) { @@ -2701,7 +2711,9 @@ END # will work regardless. if (! $early{$addr}[0] && $early{$addr}->@* > 2) { my $early_property_name = $early{$addr}[2]; - if ($property{$addr} ne $early_property_name) { + if ( $property{$addr} ne $early_property_name + && $early{$addr}->@* < 5) + { main::property_ref($property{$addr}) ->add_alias($early_property_name); } |