Re: [htmltmpl] Nested templates
Brought to you by:
samtregar
From: Brad B. <bm...@ma...> - 2009-11-30 16:42:15
|
Yes, that's better. It replaces a copy and compare (and extra loop) as you say with a regx match. I still have a copy, object creation, and repeated param settings that bother me, but I suspect this is the best I'm going to get without a significant change to H::T. Thanks, Brad On Tue, Nov 24, 2009 at 9:48 PM, Mathew Robertson <mat...@ne...> wrote: > <snip> > > that seems somewhat complicated - you could use a regex in the while loop, > as in: > > while ($text =~ /<TMPL_/) { ... } > > instead of using a loop variable or breaking out of the loop. In particular > it would save you having to do any string comparisons and would avoid the > extra loop iteration. > > Mathew Robertson > > -- Brad Baxter ---------------------------------------------------------------------- |