> > I just started using Apache::Template. Is there a way to access the
> > Apache request object from inside a template? It sure
> would be useful.
>
> No there isn't. Yes it would. I must admit it's so obvious
> I'm puzzled as to
> why I didn't put it in from the start.
>
> > In Apache::Template::handler() we can add:
> >
> > $params->{r} = $r;
>
> I think a better approach would be to a 'request' option to TT2Params
> which would do the right thing in Template::Service::Apache::params().
> Make it optional for those who want it without getting in the
> way of those
> who don't.
That is an awfully big gun to be pointing at everybody's feet. =)
IMHO this is one of the "leave it obscure" features. If you are separating content and
code, you rarely need the Request object. And you are better off calling for it in
perl code rather than within the template.
--mark