Egg::View::Mason - HTML::Mason for Egg View.
__PACKAGE__->egg_startup( ... ..... VIEW=> [ [ 'Mason' => { comp_root=> [ [ main => '/path/to/root' ], [ private=> '/path/to/comp' ], ], data_dir=> '/path/to/temp', ... other HTML::Mason option. } ], ], ); # The VIEW object is acquired. my $view= $e->view('Mason'); # It outputs it specifying the template. my $content= $view->render('hoge.tt', \%option);
It is VIEW to use HTML::Mason.
Please add the setting of VIEW to the project to use it.
VIEW => [ [ Mason => { ... HTML::Mason option. (HASH) } ], ],
* Please refer to the document of HTML::Mason for the option to set.
It accesses the object and data by using following variable from the template.
$e ... Object of project. $s ... $e->stash. $p ... $e->view('Mason')->params.
When $e->view('Mason') is called, this constructor is called.
Please set %Egg::View::PARAMS directly from the controller to the parameter that wants to be set globally.
%Egg::View::PARAMS= %NewPARAM;
The parameter that wants to be passed to HTML::Mason must use these methods.
TEMPLATE is evaluated and the output result (SCALAR reference) is returned.
It is given priority more than set of default when OPTION is passed.
my $body= $view->render( 'foo.tt', [OPTION_HASH] );
The output result of the receipt from 'render' method is set in $e->response-> body.
When TEMPLATE is omitted, acquisition is tried from $view->template. see Egg::View.
If this VIEW operates as default_view, this method is called from '_dispatch_action' etc. by Egg.
$view->output;
HTML::Mason, Egg::View, Egg::Release,
Masatoshi Mizuno <lushe@cpan.org>
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.