[Templates] Re: Restricting access when RELATIVE is on
Perrin Harkins
perrin@elem.com
Sun, 14 Jan 2007 10:12:24 -0500
Mihai Bazon wrote:
> That's exactly what I wanted to avoid. :-) I want to process a template
> relative to the current one.
>
> With HTML::Mason, for instance, I can say: <& ./foo &> to process a
> component relative to the "current directory" (which is the directory of
> the template that's currently running). I can figure out an example
> where this might be useful, if you wish..
>
> I see no reason why TT wouldn't allow this, but it seems it doesn't for
> now.
Sure it does. You can just set the INCLUDE_PATH on each request. This
is allowed and common. You can change the INCLUDE_PATH for every
template if you want to, or generate it with a code ref. There's more
discussion of this kind of thing in the list archives.
- Perrin