>>>>> "Andrey" == Andrey Brindeew <[EMAIL PROTECTED]> writes:
Andrey> Can anyone help me with subclassing Template::Provider when mod_perl
Andrey> (Apache::Template) is used?
[...]
Andrey> When using CGI enviroment all seems to be ok:
Template-> new({LOAD_TEMPLATES => [My::Provider->new()]})
Andrey> But can I do the same it when using Apache::Template to handle my utf-8
Andrey> templates without modifying sources of Template::* and Apache::Template
Andrey> modules?
Define your own service class that derives from Template::Service::Apache,
then override the _init method to define an appropriate ROOT_PROVIDER
and PROVIDER. See the source code for Template::Service::Apache for details.
(And understand why there are two providers, and how you'll handle that.)
Then define TT2Service as your class.
Or at least, this is the strategy I would start following until Andy
told me "no wait, there's a simple hook FOO to do that...". :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates