From eb2ca381fc15fa340c92c4a0c4ee2edee84ea9a1 Mon Sep 17 00:00:00 2001 From: Marcus Ramberg Date: Thu, 16 Sep 2004 19:52:11 +0000 Subject: [PATCH] Obsolete. See separate distribution on CPAN. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@191 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole/View/Mason.pm | 62 --------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 lib/Maypole/View/Mason.pm 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 - - - % for my $brewery (@breweries) { - ... - <% $brewery->name %> - % } - ... - -=head1 DESCRIPTION - -This class allows you to use C components for your Maypole -templates. It provides precisely the same path searching and template -variables as the Template Toolkit view class, although you will need -to produce your own set of templates as the factory-supplied templates -are, of course, Template Toolkit ones. - -Please see the Maypole manual, and in particular, the C chapter, -for the template variables available and for a refresher on how template -components are resolved. - -=head1 AUTHOR - -Simon Cozens - -=head1 THANKS - -This module was made possible thanks to a Perl Foundation grant. - -=cut -- 2.39.2