This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: remove unneeded test
authorKarl Williamson <public@khwilliamson.com>
Tue, 4 Jan 2011 23:56:55 +0000 (16:56 -0700)
committerKarl Williamson <public@khwilliamson.com>
Wed, 5 Jan 2011 00:04:38 +0000 (17:04 -0700)
When I was originally writing this code, I thought it was faster to do
an extra substr to avoid a regex match.  I have since found out that is
not true.

lib/unicore/mktables

index 6e12d48..081314d 100644 (file)
@@ -9346,7 +9346,6 @@ END
 
                 # If the map begins with a special command to us (enclosed in
                 # delimiters), extract the command(s).
-                if (substr($map, 0, 1) eq $CMD_DELIM) {
                     while ($map =~ s/ ^ $CMD_DELIM (.*?) $CMD_DELIM //x) {
                         my $command = $1;
                         if ($command =~  / ^ $REPLACE_CMD= (.*) /x) {
@@ -9360,7 +9359,6 @@ END
                            next LINE;
                         }
                     }
-                }
             }
 
             if ($default_map eq $CODE_POINT && $map =~ / ^ $code_point_re $/x)