On Sat, 12 Oct 2002, Leon Brocard wrote:

> Chris Josephes sent the following bits through the ether:
> 
> > Given the high number of template systems out there, it is easy to
> > understand the reluctance or hesitation in adding another one to
> > CPAN.
> 
> Everyone seems to write their own template system with slightly
> different syntax / features and then upload it to the CPAN. Far be it
> from me to dissuade you doing the same.
> 
> Have you read http://www.perl.com/pub/a/2001/08/21/templating.html?

I read this article a long time ago, but forgot about it.  Thanks for the
reminder, though.

> Taking your own example, what does the UberText provide that the
> Template Toolkit does not?

The one noticeable advantage of UberText is the ability to nest commands
within command or option values.  Let's say I wanted to build a variable
that would contain the usual copyright disclaimer at the bottom of POD
documents, but I needed to insert the name and email address of the
author.  It could be written like so.

[uber.var name:(copyright) value:
( Copyright 2002, [userinfo name] < [userinfo email ]>
This module is free software.  It may be used, redistributed....)
]

Each value to an option, is actually ran through a copy of the parser
ohject, a seperate tree is created, and the output is returned.

Or, if I wanted to insert random values into a loop list....

[uber.loop var:(os)list:(solaris,att,dgux,hpux,
        [uber.rand choices:(digitalunix,ultrix)]) -> ]
My favorite operating system is [uber.var name:(os)].
[ <- uber.loop ]

> Wouldn't it be better to rely on a module
> that has had years of testing, complete documentation, an active
> support group and many users than roll your own?

If I were an outside coder, choosing between TT and UT, I would definately
look into documentation, testing, and support.  I would also look into
ease of use, customizability/expandability, how suitable each system is 
to my particular needs, and maybe even performance.


--------------------
Christopher Josephes 
[EMAIL PROTECTED]

Reply via email to