From: Nicholas Clark Date: Sun, 12 Jun 2011 10:46:18 +0000 (+0100) Subject: In regen/mg_vtable.pl, move $longest inside the only block that uses it. X-Git-Tag: accepted/trunk/20130322.191538~3772 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e972d31587e248817bac11667cbd2f6014c03454;p=platform%2Fupstream%2Fperl.git In regen/mg_vtable.pl, move $longest inside the only block that uses it. --- diff --git a/regen/mg_vtable.pl b/regen/mg_vtable.pl index 3d24211..bea64ed 100644 --- a/regen/mg_vtable.pl +++ b/regen/mg_vtable.pl @@ -155,11 +155,6 @@ print $vt <<'EOH'; EOH -my $longest = 0; -foreach (keys %mg) { - $longest = length $_ if length $_ > $longest; -} - # Of course, it would be *much* easier if we could output this table directly # here and now. However, for our sins, we try to support EBCDIC, which wouldn't # be *so* bad, except that there are (at least) 3 EBCDIC charset variants, and @@ -170,6 +165,11 @@ foreach (keys %mg) { # predictable) { + my $longest = 0; + foreach (keys %mg) { + $longest = length $_ if length $_ > $longest; + } + my $longest_p1 = $longest + 1; my %mg_order;