> Instead of using EvalPerl, I'm creating plugins for
> each type of functionality I may need for my various
> templates...a ViewFeature plugin for displaying
> content, a Login plugin for the login page, etc.

I once did a project this way in another templating system, and although
it worked okay for read-only stuff it got very messy for things
involving user interaction, like a login.  This is because it puts the
control flow logic right into the template and you end up having
templates that don't actually output HTML and lots of jumping from one
template to another.

The best way to use Apache::Template is the way described in the docs
under TT2ServiceModule.  Basically, you just write some code that will
run before the template is called and it does the work.  It's very
similar to using something like Apache::Registry and having it call
templates.

I think your plugins approach is already better than in-line code
though, since it makes it easier for non-programmers to work on the
templates.

- Perrin



Reply via email to