X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper%2FView%2FTT.pm;h=ecaa472edfc47e2ea5b5fb956c08eff527fd6528;hb=d318f193ec999438a07248436ba1866868fd089f;hp=d1a571279363b6a893d7b5a25162f3ff9fadb5c2;hpb=7ca0b4a923a3128e799275c55716209b43ac0694;p=catagits%2FCatalyst-View-TT.git diff --git a/lib/Catalyst/Helper/View/TT.pm b/lib/Catalyst/Helper/View/TT.pm index d1a5712..ecaa472 100644 --- a/lib/Catalyst/Helper/View/TT.pm +++ b/lib/Catalyst/Helper/View/TT.pm @@ -2,13 +2,16 @@ package Catalyst::Helper::View::TT; use strict; +our $VERSION = '0.44'; +$VERSION = eval $VERSION; + =head1 NAME Catalyst::Helper::View::TT - Helper for TT Views =head1 SYNOPSIS - script/create.pl view TT TT + script/create.pl view HTML TT =head1 DESCRIPTION @@ -23,7 +26,7 @@ Helper for TT Views. sub mk_compclass { my ( $self, $helper ) = @_; my $file = $helper->{file}; - $helper->mk_file( 'compclass', $file ); + $helper->render_file( 'compclass', $file ); } =head1 SEE ALSO @@ -34,11 +37,12 @@ L, L =head1 AUTHOR Sebastian Riedel, C +Marcus Ramberg, C =head1 LICENSE -This library is free software . You can redistribute it and/or modify it under -the same terms as perl itself. +This library is free software . You can redistribute it and/or modify +it under the same terms as perl itself. =cut @@ -48,21 +52,27 @@ __DATA__ __compclass__ package [% class %]; +use Moose; +use namespace::autoclean; -use strict; -use base 'Catalyst::View::TT'; +extends 'Catalyst::View::TT'; + +__PACKAGE__->config( + TEMPLATE_EXTENSION => '.tt', + render_die => 1, +); =head1 NAME -[% class %] - TT View Component +[% class %] - TT View for [% app %] -=head1 SYNOPSIS +=head1 DESCRIPTION - Very simple to use +TT View for [% app %]. -=head1 DESCRIPTION +=head1 SEE ALSO -Very nice component. +L<[% app %]> =head1 AUTHOR @@ -70,8 +80,8 @@ Very nice component. =head1 LICENSE -This library is free software . You can redistribute it and/or modify it -under the same terms as perl itself. +This library is free software. You can redistribute it and/or modify +it under the same terms as Perl itself. =cut