Hi,
I know PHP has Smarty a template engine, and Perl has FastTemplate.pm:
http://search.cpan.org/author/JMOORE/CGI-FastTemplate-1.09/FastTemplate.pm
I haven't a clue what you mean by 'infirm', but they do mention "greediness"??
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When the a template is being scanned for variables, pattern matching is greedy. (For more info on "greediness" of regexps see perlre.) This is important, because if there are valid variable characters after your variable, FastTemplate will consider them to be part of the variable. As of version 1.07 you can use curly brackets as delimiters for your variable names. e.g. ${VARIABLE} You do not need to use curly brackets if the character immediately after your variable name is not an uppercase letter, digit or underscore.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Probably I'm talking about something else, but I still prefer [VARIABLE]
Pete
However, I feel that the fix is infirm, and I'm inclined to think that
the format of the template variables should be changed. I'm
considering a change from [VARIABLE] to %VARIABLE%. Please let me know
about any doubts that you may have. What's important is that the
variable format is easy to distinguish from anything else that
typically appears on HTML pages.
|