use Template::Timer;
use NEXT;
-our $VERSION = '0.15';
+our $VERSION = '0.20';
__PACKAGE__->mk_accessors('template');
'V::TT' => {
# any TT configurations items go here
INCLUDE_PATH => [
- MyApp->path_to( 'root', 'templates', 'src' ),
- MyApp->path_to( 'root', 'templates', 'lib' ),
+ MyApp->path_to( 'root', 'src' ),
+ MyApp->path_to( 'root', 'lib' ),
],
- PRE_PROCESS => 'config/main',
- WRAPPER => 'site/wrapper',
- TEMPLATE_SUFFIX => '.tt',
+ PRE_PROCESS => 'config/main',
+ WRAPPER => 'site/wrapper',
+ TEMPLATE_EXTENSION => '.tt',
# two optional config items
CATALYST_VAR => 'Catalyst',
$c->log->debug( "TT Config: ", Dumper($config) );
}
- return $class->NEXT::new(
+ my $self = $class->NEXT::new(
$c,
{
template => Template->new($config) || do {
$c->log->error($error);
$c->error($error);
return undef;
- }
- }
+ },
+ %{$config},
+ },
);
+ $self->config($config);
+
+ return $self;
}
=item process
<!-- TIMER END: process mainmenu/footer.tt (0.003016 seconds) -->
-=item C<TEMPLATE_SUFFIX>
+=item C<TEMPLATE_EXTENSION>
a sufix to add when looking for templates bases on the C<match> method in L<Catalyst::Request>.