X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FView%2FMason.pm;fp=lib%2FMaypole%2FView%2FMason.pm;h=0000000000000000000000000000000000000000;hb=eb2ca381fc15fa340c92c4a0c4ee2edee84ea9a1;hp=90b3b4ee8e7e57f8fca8007d029a6f7f58f917f5;hpb=f2be821dfc099277669e18ddcc37e6846111afdc;p=maypole.git diff --git a/lib/Maypole/View/Mason.pm b/lib/Maypole/View/Mason.pm deleted file mode 100644 index 90b3b4e..0000000 --- a/lib/Maypole/View/Mason.pm +++ /dev/null @@ -1,62 +0,0 @@ -package Maypole::View::Mason; -use base 'Maypole::View::Base'; -use HTML::Mason; -use Maypole::Constants; - -sub template { - my ($self, $r) = @_; - my $label = "path0"; - my $output; - my $mason = HTML::Mason::Interp->new( - comproot => [ map { [ $label++ => $_ ] } $self->paths($t) ], - output_method => \$output, - error_mode => "output" # Saves us having to handle them... - ); - $mason->exec($r->template, $self->vars($r)) - $r->{output} = $output; - return OK; -} - -1; - -=head1 NAME - -Maypole::View::Mason - A HTML::Mason view class for Maypole - -=head1 SYNOPSIS - - BeerDB->config->{view} = "Maypole::View::Mason"; - -And then: - - <%args> - @breweries - %args> - - % for my $brewery (@breweries) { - ... -