APM: Looking for a good HTML templating system

Wayne Walker wwalker at bybent.com
Thu Oct 27 07:44:25 PDT 2005


On Thu, Oct 27, 2005 at 06:25:47AM -0700, Brent LaVelle wrote:
> Warning: dated material
> 
> I started using HTML::Template a while ago for simple projects like 
> http://portfolio.cunninghamarchitects.com/cgi-bin/projects found it to
> be annoying.  A good example is that inside a loop if I wanted to
> access variable outside the loop I had put them on each hash element I
> was looping over.  I got real sick of HTML::Template fast.
> Also think of tables where rowspan and colspan are >1.

I love HTML::Template.  For the problem above, one ca do as Brent says and
"drag" your "global variables" into the loop "rows", or you can just
turn on global_vars in new().  In nested loops, there used to be some
problem I had with globals, but I can't remember it and haven't seen it
in a long time.  They may have fixed the problem I saw.

> --- Bob Apthorpe <apthorpe+pm at cynistar.net> wrote:
> 
> > Hi,
> > 
> > Not having any previous experience with HTML::Template aside from
> > perldoc and some trivial examples, how do the two tools (Smarty) compare?
I recommend sticking with HTML::Template.  When you decide you just
can't do it in HTML::Template (which means you probably are putting
business logic in the .html files), look into Catalyst and
Template::Toolkit.

Anything in particular you want to knhow how to do in HTML::Template?

-- 

Wayne Walker

wwalker at bybent.com                    Do you use Linux?!
http://www.bybent.com                 Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/           Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.gnumber.com   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net


More information about the Austin mailing list