On Mon, 3 Feb 2003, Timothy Appnel wrote:

> I have also, but this time that is not the case.
> This app I have lined up needs a template engine
> that a virtual novice can use to customize the
> output of content long after I'm out of the
> picture. Think of a publishing tool like a weblog.

Ok.  You should realize that HTML::Template was not designed to support
this type of application.  Your users probably need more control over the
functionality of the application than HTML::Template is willing to give
them in the template.

When I added HTML::Template support for the Bricolage CMS
(http://bricolage.cc), I did so by supporting two files per object.  The
.pl file contains optional Perl code to feed the template.  If not
available, some default code is used.  The non-optional .tmpl contains the
HTML, variables and loops.  This replaced a single-file Mason system where
each object has a single .mc file.

> On a related note, it seems to me that adding a
> post_filter=> \&post_filter_processing option
> would be nice for the sake of clarity and
> cohesion. Not looking at the code first, it seems
> like it would only add a few lines of code to the
> module. Am I correct Sam?

Are you correct that it could be done with a few lines of code?  Yes.  Are
you correct that it would be nice?  No.  ;)

In my opinion there's nothing unclear about passing the result of output()
to a function for processing before output.  It looks like exactly what it
is, no extra code or documentation required!

> Nevertheless, let me restate what I meant.
> Since I'm executing a routine outside of the
> HTML::Template module after processing am I
> defeating or negating the advantages of the
> caching system?

No.  The caching system saves HTML::Template from having to load and parse
a .tmpl file everytime you call HTML::Template->new().  It has nothing to
do with the return value from output(), which must be generated fresh on
every call.

-sam



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to