| Next | Making Programs Faster | 70 |
My first cut at a special case for C<simple> was:
## Look for an entire simple sequence 20030420 mjd@plover.com
if ( /^([A-Z])<([^<>]*)>$/ ) {
$seq = Pod::InteriorSequence->new(
-name => $1,
-ldelim => "<", -rdelim => ">",
-file => $file, -line => $line
);
$seq->append($2);
$seq_stack[-1]->append($expand_seq
? &$xseq_sub($self, $seq)
: $seq);
}
... the rest as before ...
I just cribbed most of this from further down
I chopped out the parts that seemed unnecessary
Filled in -rdelim since it was known immediately
The ->append($2) code is simple because I know that $2 is a plain string
(The original version was more like the second append call)
I don't have to put C<... on the stack while I go looking for ...>.
| Next | ![]() |
Copyright © 2003 M. J. Dominus |