X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper%2FView%2FTT.pm;h=aa8ea0fa810c01db781f5417dd4486585ad865f7;hb=caa68319afbd7b8db59975b1e968766da6ac6bbc;hp=2d2c8d6f4c4dce6c72bb678780dbcb72f63842d6;hpb=c90b13293ca44b5e0824c10595f82643cf31d7f9;p=catagits%2FCatalyst-View-TT.git diff --git a/lib/Catalyst/Helper/View/TT.pm b/lib/Catalyst/Helper/View/TT.pm index 2d2c8d6..aa8ea0f 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.45'; +$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 @@ -22,54 +25,63 @@ Helper for TT Views. sub mk_compclass { my ( $self, $helper ) = @_; - my $file = $helper->{file}; - my $class = $helper->{class}; - $helper->mk_file( $file, <<"EOF"); -package $class; + my $file = $helper->{file}; + $helper->render_file( 'compclass', $file ); +} -use strict; -use base 'Catalyst::View::TT'; +=head1 SEE ALSO -=head1 NAME +L, L, L, +L, L -$class - TT View Component +=head1 AUTHOR -=head1 SYNOPSIS +Sebastian Riedel, C +Marcus Ramberg, C - Very simple to use +=head1 LICENSE -=head1 DESCRIPTION +This library is free software . You can redistribute it and/or modify +it under the same terms as perl itself. -Very nice component. +=cut -=head1 AUTHOR +1; -Clever guy +__DATA__ -=head1 LICENSE +__compclass__ +package [% class %]; +use Moose; +use namespace::autoclean; -This library is free software . You can redistribute it and/or modify it under -the same terms as perl itself. +extends 'Catalyst::View::TT'; -=cut +__PACKAGE__->config( + TEMPLATE_EXTENSION => '.tt', + render_die => 1, +); -1; -EOF -} +=head1 NAME + +[% class %] - TT View for [% app %] + +=head1 DESCRIPTION + +TT View for [% app %]. =head1 SEE ALSO -L, L, L, -L, L +L<[% app %]> =head1 AUTHOR -Sebastian Riedel, C +[% author %] =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