Mine
public text v1 · immutable// template
<tpl:foo>
<tpl:if test="12">
...
</tpl:if>
<bar foo="{blah}"/>
<lala>
...
</lala>
</tpl:foo>
// processed template
foo {
if(12){
$self->out( <<'EOTT' );
...
EOTT
}
$self->out( <<'EOTT' );
<bar foo=$self->varsubst($self->getvar('blah'));'' />
EOTT
$self->out( <<'EOTT' );
<lala>
EOTT
$self->out( <<'EOTT' );
...
EOTT
</lala>
EOTT
}
You'll notice some errors, like foo=..., I need to fix the varsubst stuff, as well as the missing $self->out before the </lala> tag.