]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/View/TT.pm
Test::MockObject isn't a dependency, add helper for dynamic prereq_pm (which may...
[maypole.git] / lib / Maypole / View / TT.pm
index 0e8d89fbc1b2476f992c7aee9c57a1f7eafd3ea3..21e2485b794a7d3a3fe6f5b694b4aa58a7b1de14 100644 (file)
@@ -4,13 +4,14 @@ use Maypole::Constants;
 use Template;
 
 sub template {
-    my ($self, $r) = @_;
-    my $template = Template->new({ INCLUDE_PATH => [ $self->paths($r) ]});
+    my ( $self, $r ) = @_;
+    my $template = Template->new( { INCLUDE_PATH => [ $self->paths($r) ] } );
     my $output;
-    if ($template->process($r->template, { $self->vars($r) }, \$output)) {
+    if ( $template->process( $r->template, { $self->vars($r) }, \$output ) ) {
         $r->{output} = $output;
         return OK;
-    } else {
+    }
+    else {
         $r->{error} = $template->error;
         return ERROR;
     }
@@ -24,7 +25,7 @@ Maypole::View::TT - A Template Toolkit view class for Maypole
 
 =head1 SYNOPSIS
 
-    BeerDB->config->{view} = "Maypole::View::TT"; # The default anyway
+    BeerDB->config->view("Maypole::View::TT"); # The default anyway
 
 =head1 DESCRIPTION
 
@@ -34,8 +35,19 @@ Please see the Maypole manual, and in particular, the C<View> chapter,
 for the template variables available and for a refresher on how template
 components are resolved.
 
+=over 4
+
+=item template
+
+
+Processes the template and sets the output. See L<Maypole::View::Base>
+
+=back
+
+
 =head1 AUTHOR
 
 Simon Cozens
 
 =cut
+