[Templates] Apache::Template and persistant pnotes across internal_redirects
Perrin Harkins
perrin@elem.com
Sun, 17 Mar 2002 12:53:44 -0500
> Call me lazy. I don't want to replicate this stuff over 10
> or 20 registry scripts then have to be sure later that they
> all work exactly the same way. One typo here, one custom
> change there. *sigh*
I would put it in a tiny module or make it a base class and use
inheritance to make it available to all my other classes.
> > However, if you're keen on using Apache::Template, the way you're
> > supposed to do it is to subclass Template::Service::Apache and
override
> > the params() method to do all of your processing. See the
> > Apache::Template docs for an example.
>
> If I do that I've got to basically replicate
> Apache::Registry to get my cgi's eval'ed.
You'd need to move the code that generates the data out of your CGI
scripts and into the params() method.
> Let Apache::Registry do its thing, then let TT2 have its go
> with stuff-ins from pnotes. Simple, eh?
It sounds like a lot of unnecessary overhead to me, but if you don't
want to modify your legacy stuff that might be the easiest way to go. I
don't think it makes sense to make a change to Apache::Template for this
though. You can just subclass Apache::Template and override the
params() method to look at the previous pnotes.
- Perrin