On Tue, 2005-01-04 at 17:18 -0500, Cees Hek wrote:
> I usually set the INCLUDE_PATH on a per class basis, so I haven't
> found a need for it.  Do you have any ideas on how to cleanly
> implement that?

The mail I pointed to showed a couple of options.  You can also put a
code ref or object into the INCLUDE_PATH and have it generate a list of
directories.  This is described in Template::Manual::Config.

> This works well for me.  But then again, I am not caching these
> objects across requests

Caching the object is very important.  It makes a big difference in
performance.  Please change that.

(Hmm... maybe CPAN needs some kind of Template::Toolkit::Singleton
module to make this more obvious to people.)

> I mostly use PersistentPerl instead of mod_perl

They are the same in this regard.

> I'll have to look back at your example from the other day, but from
> what I remember, it looks like changing the INCLUDE_PATH would change
> it for all subsequent calls to 'process'.  Is that correct?

Yes.

> Would
> that be an acceptable behaviour?

I think so, since I assume that people will either not change it or
change it on every request.

- Perrin


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to