X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper%2FView%2FTTSite.pm;fp=lib%2FCatalyst%2FHelper%2FView%2FTTSite.pm;h=b73e436a0476887ae65a58e86a2a967f4f6e2c9b;hb=19ee577af75c8bdd9b41bf972bd76a69b6a822ea;hp=b3b301b86850cc2ec9ef1e952404be0598609865;hpb=c0eb0527d6a0940639d7d2fc5727c7629385f889;p=catagits%2FCatalyst-View-TT.git diff --git a/lib/Catalyst/Helper/View/TTSite.pm b/lib/Catalyst/Helper/View/TTSite.pm index b3b301b..b73e436 100644 --- a/lib/Catalyst/Helper/View/TTSite.pm +++ b/lib/Catalyst/Helper/View/TTSite.pm @@ -12,10 +12,9 @@ sub mk_compclass { sub mk_templates { my ( $self, $helper ) = @_; - my $base = $helper->{base}; - my $tdir = File::Spec->catfile( $base, 'root', 'templates' ); - my $ldir = File::Spec->catfile( $tdir, 'lib' ); - my $sdir = File::Spec->catfile( $tdir, 'src' ); + my $base = $helper->{base},; + my $ldir = File::Spec->catfile( $base, 'root', 'lib' ); + my $sdir = File::Spec->catfile( $base, 'root', 'src' ); $helper->mk_dir($ldir); $helper->mk_dir($sdir); @@ -57,7 +56,7 @@ Catalyst::Helper::View::TTSite - Helper for TT view which builds a skeleton web sub message : Global { my ( $self, $c ) = @_; $c->stash->{template} = 'message.tt2'; - $c->stash->{message} = $c->req->param('message') || 'Hello World'; + $c->stash->{message} ||= $c->req->param('message') || 'No message'; } sub default : Private { @@ -127,7 +126,7 @@ my $root = [% app %]->config->{root}; __PACKAGE__->config({ CATALYST_VAR => 'Catalyst', - INCLUDE_PATH => [ "$root/templates/src", "$root/templates/lib" ], + INCLUDE_PATH => [ "$root/src", "$root/lib" ], PRE_PROCESS => 'config/main', WRAPPER => 'site/wrapper', ERROR => 'error.tt2',