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.
# 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) {
next LINE;
}
}
- }
}
if ($default_map eq $CODE_POINT && $map =~ / ^ $code_point_re $/x)