This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/regcharclass.pl: Rename a variable
authorKarl Williamson <public@khwilliamson.com>
Wed, 5 Sep 2012 16:26:22 +0000 (10:26 -0600)
committerKarl Williamson <public@khwilliamson.com>
Fri, 14 Sep 2012 03:14:03 +0000 (21:14 -0600)
I find it confusing that the array element name is the same as the full array

regen/regcharclass.pl

index f337729..9b84bd1 100755 (executable)
@@ -562,10 +562,10 @@ sub _cond_as_str {
             }
         }
     };
-    for my $cond ( @$cond ) {
-        if ( !@ranges || $cond != $ranges[-1][1] + 1 ) {
+    for my $condition ( @$cond ) {
+        if ( !@ranges || $condition != $ranges[-1][1] + 1 ) {
             $Update->();
-            push @ranges, [ $cond, $cond ];
+            push @ranges, [ $condition, $condition ];
         } else {
             $ranges[-1][1]++;
         }