[Templates] trying to leave HTML::Mason for TT2
Andy Wardley
abw@cre.canon.co.uk
Sat, 5 Aug 2000 11:10:43 +0100 (BST)
> > Can I open a file and include it arbitrarily, rather than have it
> > examined via INCLUDE for template codes? I suppose I could set the
> > template triggers to be something very unlikely, but is there a way of
> > just saying "put this file here"?
>
> Not built in. It might be nice to steal a feature from Mason and handle
> purely static templates as a special case. When you INCLUDE (actually I
> always use PROCESS, since it's faster and I don't need to preserve
> variables) a template that has no special codes in it, that file could be
> left on disk and sucked in dynamically each time.
I've been planning on adding the [% INSERT template %] directive which
does just that: grabs the file from the INCLUDE_PATH but doesn't
compile, or process it in any way. I need to work around a few minor
issues in the Template::Provider code to make it work, but it shouldn't
be too hard.
A