Hi,

One of the things that bugged me while developing using HTML::Template over the past 
year was that the <TMPL_CMD> tags never showed up in Dreamweaver, making editing 
tricky. Also embedding tags inside, say, a <input name="field" value="<TMPL_VAR 
NAME="field">"> looked awful. Hence, I modified version of HTML::Template 1.8 to use 
{TMPL_CMD} tags instead since I was confident I would not be using { and } in any of 
my layouts. Having done that, I got even lazier with my tags and, today, all my tags 
look like {var fieldname} and {loop options} etc. The former looks better inside those 
INPUT tags and both are nice to be visible inside Dreamweaver. I have found this 
format more useful than using the full <TMPL_VAR name="fieldname">.

Last week, I decided I needed to upgrade to the newest version of HTML::Template. 
Rather than bastardising/patching up the code all over again, I have properly patched 
Template.pm to allow extra options to the "new" method. There is open_bracket and 
close_bracket, to allow different tag opening and closing characters instead of < and 
>. There is also a tmpl_prefix option that allows the user to change the tag prefixes 
to something other than TMPL_. Thus setting these 3 options to '{', '}' and '' 
respectively, would give the behaviour I mentioned in the first paragraph.

So my questions are:
- Is there any good reason for me sticking to the standard <TMPL_...> format?
- Would the patch be of interest to the author or other users? The patch includes 
documentation, test code in test.pl (and passes all regression tests). If so, let me 
know what to do with it
Otherwise, well done to the authors for a well made module

Kevin Tam

Reply via email to