From: Christian Walde Date: Sat, 16 Jul 2011 18:53:35 +0000 (+0200) Subject: the class used to create the TT object can now be customized X-Git-Tag: 0.38~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7bd88b6108e3a78197a7a6a436e4e3466eb38571;p=catagits%2FCatalyst-View-TT.git the class used to create the TT object can now be customized --- diff --git a/lib/Catalyst/View/TT.pm b/lib/Catalyst/View/TT.pm index 9dbb34c..f51331f 100644 --- a/lib/Catalyst/View/TT.pm +++ b/lib/Catalyst/View/TT.pm @@ -89,6 +89,7 @@ sub new { my $config = { EVAL_PERL => 0, TEMPLATE_EXTENSION => '', + CLASS => 'Template', %{ $class->config }, %{$arguments}, }; @@ -188,8 +189,8 @@ sub new { } $self->{template} = - Template->new($config) || do { - my $error = Template->error(); + $config->{CLASS}->new($config) || do { + my $error = $config->{CLASS}->error(); $c->log->error($error); $c->error($error); return undef; @@ -687,6 +688,26 @@ from the general config, into the config for the provider: This can prove useful when you want to use the additional_template_paths hack in your own provider, or if you need to use Template::Provider::Encoding +=head2 C + +Allows you to specify a custom class to use as the template class instead of +L