diff options
author | Karl Williamson <khw@cpan.org> | 2015-07-28 20:52:57 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2015-07-28 22:15:58 -0600 |
commit | 349edad463362d3f89da80ded7af12dee6efdfec (patch) | |
tree | 5ae58d05d1360409d75d769e0622689d4f28f545 /lib/unicore | |
parent | 68c3923f2d6d71b86305fe9aaac75f9f08b5609b (diff) | |
download | perl-349edad463362d3f89da80ded7af12dee6efdfec.tar.gz |
mktables: Minimize use of version numbers for decisions
I found these places where file existence can be used instead of knowing
what version something happened in. Sometimes those numbers are wrong,
and one of these was. If it can be avoided, better not to use version
numbers
Diffstat (limited to 'lib/unicore')
-rw-r--r-- | lib/unicore/mktables | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 5f0643106f..27cb45ab9d 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -1524,7 +1524,7 @@ sub populate_char_info ($) { elsif ($gc-> table('Unassigned')->contains($i)) { $annotate_char_type[$i] = $UNASSIGNED_TYPE; $printable[$i] = 0; - if ($v_version lt v2.0.0) { # No blocks in earliest releases + if (defined $block) { # No blocks in earliest releases $viacode[$i] = 'Unassigned'; $end = $gc-> table('Unassigned')->containing_range($i)->end; } @@ -9851,7 +9851,7 @@ sub process_PropertyAliases($) { # This line is defective in early Perls. The property in Unihan.txt # is kRSUnicode. - if ($v_version lt v5.2.0 && $full eq 'Unicode_Radical_Stroke') { + if ($full eq 'Unicode_Radical_Stroke' && @data < 3) { push @data, qw(cjkRSUnicode kRSUnicode); } @@ -10001,7 +10001,7 @@ sub finish_property_setup { # for non-assigned code points; 'AL' for assigned. if (file_exists("${EXTRACTED}DLineBreak.txt") || -e 'LineBreak.txt') { my $lb = property_ref('Line_Break'); - if ($v_version gt 3.2.0) { + if (file_exists("${EXTRACTED}DLineBreak.txt")) { $lb->set_default_map('Unknown'); } else { |