If you want to adjust the INCLUDE_PATH before calling process() I don't
think you'd have any problems.  

There is a object method Template::Provider::include_path that will do
this.

If you attempt to call this method after doing some processing (ie.
calling process(); ), then I could see where the results might be
"interesting", especially if you have caching enabled.

If you have a small set of possible INCLUDE_PATH variations, then 
you might consider creating seperate template objects, each with a 
specific INCLUDE_PATH variation, and just use the right flavor of
template object at runtime.

Quoting Stas Bekman ([EMAIL PROTECTED]):
> Perrin Harkins wrote:
> 
> >>Talking about re-use of the tt object, what if the object needs to be
> >>adjusted after it was created? e.g. I want to use the same object many
> >>times, but need to adjust the INCLUDE_PATH config before process().
> >>
> > Any
> > 
> >>reason for not providing a method for setting/changing the config of
> >>
> > the
> > 
> >>object post-new()? Or does it exist and I didn't have enough coffee
> >>
> > yet?
> > 
> > It's not very obvious how to do it, but it is perfectly legal.  Check
> > the archives for it.  (This really belongs in a FAQ.)
> 
> I know, that's why I've suggested that there will be an API for this and 
> not a hack in an archive.
> 
> Something like,
> 
> $self->set(INCLUDE_PATH => ...);
> 
> is there any reason for not doing this a public API?
> 
> _____________________________________________________________________
> Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
> http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
> mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
> http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
> 
> 
> _______________________________________________
> templates mailing list
> [EMAIL PROTECTED]
> http://www.template-toolkit.org/mailman/listinfo/templates


Reply via email to