You read me correctly: I was suggesting moving some things out of
plugins into the service module.
Douglas S. Sparling wrote:
> To be more specific, I'm not sure how to set up
> TT2ServiceModule to handle different URIs.
>
> I can get the sample code to work:
>
> PerlModule Apache::Template
> PerlModule My::Service::Module
> TT2ServiceModule My::Service::Module
> <Files *.html>
> SetHandler perl-script
> PerlHandler Apache::Template
> </Files>
>
> But I'd like to run different code depending on the
> URI.
I think you can just say something like this:
<Location /tom>
TT2ServiceModule Bombadil
</Location>
Alternatively, you could make your Service module examine the request
object and run different code appropriately.
Your plugin solution may work fine if your pages are not interactive.
However, if you find yourself writing a plugin that needs to change
which template is being run or discard previously generated HTML, that's
usually a sign that you're doing something in the wrong place.
- Perrin