X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FTT.pm;h=f4d5762cf4164485d0566222b35936e06a6f0c10;hb=fe3df9dcf23365f7d3e685d128042393703a3ad7;hp=c66a8e2084ea62840c26b5e333d70756b7c70b3a;hpb=9300af5b2141fe8d2eca26f52b13fa59e11ef6e0;p=catagits%2FCatalyst-View-TT.git diff --git a/lib/Catalyst/View/TT.pm b/lib/Catalyst/View/TT.pm index c66a8e2..f4d5762 100644 --- a/lib/Catalyst/View/TT.pm +++ b/lib/Catalyst/View/TT.pm @@ -1,14 +1,23 @@ package Catalyst::View::TT; use strict; -use base qw/Catalyst::Base/; +use warnings; + +use base qw/Catalyst::View/; +use Data::Dump 'dump'; use Template; use Template::Timer; -use NEXT; +use MRO::Compat; +use Scalar::Util qw/blessed weaken/; -our $VERSION = '0.13'; +our $VERSION = '0.38'; +$VERSION = eval $VERSION; __PACKAGE__->mk_accessors('template'); +__PACKAGE__->mk_accessors('expose_methods'); +__PACKAGE__->mk_accessors('include_path'); + +*paths = \&include_path; =head1 NAME @@ -16,147 +25,209 @@ Catalyst::View::TT - Template View Class =head1 SYNOPSIS - # use the helper - myapp_create.pl view TT TT - - # lib/MyApp/View/TT.pm - package MyApp::View::TT; - - use base 'Catalyst::View::TT'; - - __PACKAGE__->config->{DEBUG} = 'all'; - - # in practice you'd probably set this from a config file; - # defaults to $c->config->root - __PACKAGE__->config->{INCLUDE_PATH} = - '/usr/local/generic/templates:/usr/local/myapp/templates'; - - 1; - - # Meanwhile, maybe in a private C action - $c->forward('MyApp::View::TT'); +# use the helper to create your View + myapp_create.pl view Web TT -=head1 DESCRIPTION +# add custom configration in View/Web.pm -This is the Catalyst view class for the L