Hi all,
I often find myself writing code like this:
<TMPL_IF NAME=COUNT>
<TMPL_LOOP NAME=BEAVIS>
I am the great <TMPL_VAR NAME=CORNHOLIO>!
</TMPL_LOOP>
<TMPL_ELSE>
I need TP for my bunghole!
</TMPL_IF>
this causes me to have to write perl like this:
$t->param(CORNHOLIO=>\@holio);
$t->param(COUNT=>$#holio>=0);
Do other people end up having to do this? I was just pondering an alternate structure:
<TMPL_LOOP>
[ stuff omitted ]
<TMPL_LOOP_ELSE>
[ stuff to say when there was nothing to loop over]
</TMPL_LOOP>
Am I just too lazy? Is there a better way? Should I be working right now?
-Dave