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;
}
=head1 SYNOPSIS
- BeerDB->config->{view} = "Maypole::View::TT"; # The default anyway
+ BeerDB->config->view("Maypole::View::TT"); # The default anyway
=head1 DESCRIPTION
Simon Cozens
=cut
+