diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-01-26 21:01:33 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-02-04 16:29:30 -0700 |
commit | 83d931ee07168463e1a6251be818a0a822980a80 (patch) | |
tree | a04e760983bfc028ea5d116dd5ff84c596e7e9af /lib | |
parent | 66800fdc0e3e5392f604897d5d0e863a36d19c9f (diff) | |
download | perl-83d931ee07168463e1a6251be818a0a822980a80.tar.gz |
mktables: Refactor if-else series
This is a slight refactoring to avoid using 'next' in the loop, and to
surround things with a bare block. Future commits will want to
do common code at the bottom of the loop, including a redo of the bare
block.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicore/mktables | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 24cf411e5f..5755e0a795 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -5257,6 +5257,8 @@ END next RANGE if defined $suppress_value && $value eq $suppress_value; + { + # If there is a range and doesn't need a single point range # output if ($start != $end && ! $range_size_1) { @@ -5281,13 +5283,11 @@ END $count); $OUT[-1] = Text::Tabs::unexpand($OUT[-1]); } - next RANGE; } - # Here to output a single code point per line - - # If not to annotate, use the simple formats - if (! $annotate) { + # Here to output a single code point per line. + # If not to annotate, use the simple formats + elsif (! $annotate) { # Use any passed in subroutine to output. if (ref $range_size_1 eq 'CODE') { @@ -5302,8 +5302,8 @@ END push @OUT, sprintf "%04X\t\t%s\n", $i, $value; } } - next RANGE; } + else { # Here, wants annotation. for (my $i = $start; $i <= $end; $i++) { @@ -5442,6 +5442,8 @@ END $OUT[-1] .= "\n"; } } + } + } } # End of loop through all the table's ranges } |