I was looking through H::T when I noticed that it splits the incoming =
split ( /(?<=3D)/ , $template)
This regex ends up splitting on every '<'.
I have modified my version to use:
split( m!(?=3D<(?:\!--\s*)?/?[Tt][Mm][Pp][Ll]_)! , $template)
which thus matches only on <TMPL_ and </TMPL_ tags.
As a result of trying to understand the output of the debug info, I have =
found this regex to generate chunks which are simpler to read, from a =
human point of view.
This may or may not be of benefit (eg I'm not sure if its faster or =
slower), but it has helped in debugging.