Hi,

you can use plugins for other template modules and it is not that hard
to wirte your own plugin for C::A. Have a look at
CGI::Application::Plugin::HTCompiled that enables the use of
HTML::Template::Compiled. It's just a "few" lines to make your own
plugin for any other template module...

Cheers,
ReneeB

Am 13.12.2006 um 14:02 Uhr haben Sie geschrieben:
> Hi, all
>
> There are number of HTML::Template compatible modules in CPAN
nowadays.
> There are, perhaps, even more their homebrew subclasses.
>
> However in C:A->load_tmpl name 'HTML::Template' is hardcoded.
> So to use another H:T-compatible module one need to override load_tmpl
in
> C:A subclasses with only one string changed.
>
> I propose to have some CGI::App object variable with template module
> name and change load_tmpl sub like this:
>
> - require HTML::Template;
>
> + my $tmpl_module = $self->{__CURRENT_TMPL_MODULE} ||
'HTML::Template';
> + eval "require $tmpl_module";
> + die "Can't load template module: ' . $@ if $@;
>
> so on...
>
> wbr
> Viacheslav Sheveliov
>
>
>
>
> ---------------------------------------------------------------------
> Web Archive:  http://www.mail-archive.com/[email protected]/
>               http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---

9. Deutscher Perl-Workshop 21.-23.02.2007 in München
Mehr Infos unter http://www.perl-workshop.de/de/2007/




---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to