X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FView%2FTT.pm;h=dc3307dbcdc5c92007b3d84a6a319d54e4f68f94;hb=226c1dd33479e2c231b70634ce32b99bb2939446;hp=58b247649fb758d0960f9877701549c8d86532e4;hpb=11cbb896c891a569d77e20307224361707acc0d8;p=catagits%2FCatalyst-View-TT.git diff --git a/lib/Catalyst/View/TT.pm b/lib/Catalyst/View/TT.pm index 58b2476..dc3307d 100644 --- a/lib/Catalyst/View/TT.pm +++ b/lib/Catalyst/View/TT.pm @@ -25,28 +25,23 @@ Catalyst::View::TT - Template View Class # use the helper to create your View - myapp_create.pl view TT TT + myapp_create.pl view Web TT -# configure in lib/MyApp.pm (Could be set from configfile instead) +# add custom configration in View/Web.pm __PACKAGE__->config( - name => 'MyApp', - root => MyApp->path_to('root'), - default_view => 'TT', - 'View::TT' => { - # any TT configurations items go here - INCLUDE_PATH => [ - MyApp->path_to( 'root', 'src' ), - MyApp->path_to( 'root', 'lib' ), - ], - TEMPLATE_EXTENSION => '.tt', - CATALYST_VAR => 'c', - TIMER => 0, - # Not set by default - PRE_PROCESS => 'config/main', - WRAPPER => 'site/wrapper', - render_die => 1, # Default for new apps, see render method docs - }, + # any TT configuration items go here + INCLUDE_PATH => [ + MyApp->path_to( 'root', 'src' ), + MyApp->path_to( 'root', 'lib' ), + ], + TEMPLATE_EXTENSION => '.tt', + CATALYST_VAR => 'c', + TIMER => 0, + # Not set by default + PRE_PROCESS => 'config/main', + WRAPPER => 'site/wrapper', + render_die => 1, # Default for new apps, see render method docs ); # render view from lib/MyApp.pm or lib/MyApp::Controller::SomeController.pm @@ -55,7 +50,7 @@ Catalyst::View::TT - Template View Class my ( $self, $c ) = @_; $c->stash->{template} = 'message.tt2'; $c->stash->{message} = 'Hello World!'; - $c->forward( $c->view('TT') ); + $c->forward( $c->view('Web') ); } # access variables from template @@ -287,18 +282,20 @@ __END__ This is the Catalyst view class for the L