summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-02-28 09:58:33 -0700
committerKarl Williamson <public@khwilliamson.com>2014-03-01 20:12:16 -0700
commitebdc9bc900a67a13b31e9c1e7f689bfc3becc19a (patch)
treecd09d4bf835055fbacffb3ce2ace5872d07e672d
parent212b6c86be666c7384a2e575c35f1dd968a1ddb4 (diff)
downloadperl-ebdc9bc900a67a13b31e9c1e7f689bfc3becc19a.tar.gz
mktables: Allow Unicode Unihan files to compile
Perl normally doesn't include the Unicode Unihan files, but someone is free to recompile Perl with these. However, starting with commit 9e65c3f47e483ee7e33b5d748a06f4addd830d60, mktables checks for the version number on the input files and refuses to compile if incorrect. (This is to catch Perl trying to compile from a DB with inconsistent files; I believe Perl used to be shipped with these synchronization errors.) However, the Unihan files in Unicode 6.3 do not have the same syntax as the rest of the files, so since that commit Perl refuses to compile Unihan. The files are being updated in 7.0 to use the same syntax as the rest, so rather than hard-code the current syntax as an exception into mktables, this just skips checking these files until 7.0.
-rw-r--r--lib/unicore/mktables7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index 5da1d7c0ef..88c9746905 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -2502,7 +2502,12 @@ END
}
$handle{$addr} = $file_handle; # Cache the open file handle
- if ($v_version ge v3.2.0 && lc($file) ne 'unicodedata.txt') {
+ if ($v_version ge v3.2.0
+ && lc($file) ne 'unicodedata.txt'
+
+ # Unihan files used another format until v7
+ && ($v_version ge v7.0.0 || $file !~ /^Unihan/i))
+ {
$_ = <$file_handle>;
if ($_ !~ / - $string_version \. /x) {
chomp;