liamlrb has asked for the wisdom of the Perl Monks concerning the following question:

Hey ho, I am using HTML::Template::Expr to generate KML files :) I want to create folders on Google Earth using a "group by" SQL call to put things in different Google earth folders based on the distinct group by values. The group by field is user selectable, hence the need for a "variable" param field in the template. I need a template that looks something like this
<TMPL_LOOP NAME = ALL_FRUIT_LOOPS> <TMPL_LOOP NAME = USER_FRUIT_LOOPS> <TMPL_IF EXPR="(<TMPL_VAR NAME=USER_FRUIT_FIELD> eq <TMPL_VAR NA +ME=ALL_FRUIT_FIELD>)" > blah blah blah </TMPL_IF> </TMPL_LOOP> </TMPL_LOOP>
So with 100 kinds of fruit and 3 kinds of user fruits GE would end up with 3 folders each named apple, orange and banana. I am wondering if expressions are evaluated prior to the substitution but want to make sure before I move to another module ( Text::Template ) thanks

Replies are listed 'Best First'.
Re: html::template question
by GrandFather (Saint) on Jan 28, 2011 at 02:06 UTC

    TITS (Try It To See)! Surely you can fudge up enough data to test what will happen?

    True laziness is hard work