* Douglas S. Sparling <[EMAIL PROTECTED]> [2002-06-18 00:08]:
> > I looked at TT2ServiceModule but I'm not totally sure how to use it.
> > How do I vary the code (by URI or Location) that is run before the
> > template is called?
>
> 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.
The idea is that the different code you need to run would be in the
different templates themselves, and and that the Service module is a
generic, mod_perl-specific but not application-specific, interface to
TT. Different templates would use different Plugins and so on,
depending on what had to be done, but if you need really different
processing for each URI, then Apache::Template is not the way to go. In
that case you'll need to write your own handlers, which is straight
forward enough once you grok mod_perl.
(darren)
--
If you think you know what the hell is going on you're probably
full of shit.
-- Robert Anton Wilson