> It doesn't look like you got all of your questions answered.  Listing all
> the features Template provides that Text::Template doesn't would take a long
> time since it's a very full-featured system, but here are some highlights:

<snip list>

Thanks for responding.  Your list is indeed helpful, though not in the way
I originally intended.

> Whatever you feel about these differences, I would not suggest trying to
> fold new capabilities into Text::Template.  It's beauty is it's simplicity,
> and if it doesn't do enough for you then you should be looking more
> seriously at tools like Template Toolkit.

I wasn't looking at additional capabilities as much as issues such as
being taint-friendly, inheritance, and strict-friendly.  I have pretty
much determined that any such magic is beyond my skills.

As such, I've been shopping around other template systems.  Once I
committed to using a template-system (as opposed to Text::Template's code
system, even though I was using it as a template), options such as Toolkit
reentered the ring.  The discussions you have sparked about templating vs
programming have made me reconsider my previous reluctance.

-=Begin long background discussion=-

My current Text::Template solution is in place on our internet pages, and
we are moving in to create (or rather, overhaul from the previous PHP
people) two intranet sites.  I've been looking into overhauling the
Text::Template solution to increase the code reuse and modularity, so it
seems a good time to make a fresh start with the new sites.

Perl.com had an article on CGI::Application that made an impression on me.
It's simple, but it does lay the foundation for a lot of what I was
looking to do (I find simplicity attractive.).  CGI::App, in turn, made me
look at and consider HTML::Template.  That is a very limited templating
solution however, so I'm torn between it's simplicity and Toolkit's raw
power.

The decision will probably be made by turn-around time, since both
solutions appear to be relatively stable and supported.

One critical issue that HTML::Template is lagging in is support for our
current templating mindset.  Our content templates look something like
this:  (<!! and !!> indicate Text::Template code)

<!! Load($Header) !!>
<!! $BeginText !!>
This is content here with a
<a href=<!!Lookup("Page Link")!!>>Link</a>
<!! $EndText !!>
<!! Load($Footer) !!>

The Header and Footer files are thus variables set by the calling program.
This lets us have multiple template sets, such as a text and graphic
version.  HTML::Template lets us support this with filters, but it's a bit
messy.  We also Lookup internal links from a database, and HTML::Template
really doesn't have support for code in the template.  (IT can be done,
but it isn't pretty)

Reply via email to