Hi

Before I learned about HTML::Template, I wrote something similar myself, for
my company. Ok, the "parser" sucked, but the functionality had a couple of
things I'd like to see in H::T as well:

- Most of all, it should be possible to compare a variable to some value
instead of it just being Boolean. Something like <TMPL_IF
NAME="PARAMETER_NAME" VALUE="PARAMETER_VALUE"> </TMPL_IF>.
  <TMPL_IF NAME="ERROR" VALUE="NO_FIRST_NAME">Please enter your first
name.</TMPL_IF>
  <TMPL_IF NAME="ERROR" VALUE="NO_LAST_NAME">Please enter your last
name.</TMPL_IF>

- Following this idea further, one should also be able to choose the
operator: LT, GT, LE, GE, EQ (default), NE  (if the value is a string, use
string comparison, otherwise numeric comparison):
  <TMPL_IF NAME="FIRST_NAME" VALUE="John">Hi, John!</TMPL_IF>
  <TMPL_IF NAME="NUMBER_OF_KIDS" VALUE="5" OPERATOR="GE">So, you have a lot
of children?</TMPL_IF>

- And while we're at it: Why not allow Regular Expressions? :-)
  <TMPL_IF NAME="STATE" VALUE="(CA|NY|TX)" OPERATOR="REGEX">Residents of
California, New York or Texas please add 5% tax.</TMPL_IF>
  (No, I have no clue about US taxes...)


With this, H::T would be a lot more powerful, and it would certainly satisfy
all my needs.

If this has been discussed before... sorry! But I didn't get any FAQs  :-)

Best regards,
Eric

_______________________________________

swissinfo Swiss Radio International
Eric Lewis
IT Engineering
Giacomettistrasse 1
CH-3000 Berne 15

Phone:  +41 31 350 95 42
Fax:    +41 31 350 99 40
E-Mail: [EMAIL PROTECTED]

Switzerland is everywhere. Stay connected!
http://www.swissinfo.org 
http://mobile.swissinfo.org
http://wap.swissinfo.org

SRG SSR id�e suisse
_______________________________________



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to