Catalyst::View::Petal - Petal View Class
# use the helper create.pl view Petal Petal # lib/MyApp/View/Petal.pm package MyApp::View::Petal; use base 'Catalyst::View::Petal'; __PACKAGE__->config( input => 'XML', output => 'XML', error_on_undef_var => 0 ); 1; # Meanwhile, maybe in an 'end' action $c->forward('MyApp::View::Petal');
This is the Petal view class. Your subclass should inherit from this class.
Petal
Renders the template specified in $c->stash->{template} or $c->request->match. Template variables are set up from the contents of $c->stash, augmented with base set to $c->req->base, c to $c and name to $c->config->{name}. Output is stored in $c->response->body.
$c->stash->{template}
$c->request->match
$c->stash
base
$c->req->base
c
$c
name
$c->config->{name}
$c->response->body
This allows your view subclass to pass additional settings to the Petal config hash.
Petal, Catalyst, Catalyst::Base.
Christian Hansen, ch@ngmedia.com
ch@ngmedia.com
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::View::Petal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::View::Petal
CPAN shell
perl -MCPAN -e shell install Catalyst::View::Petal
For more information on module installation, please visit the detailed CPAN module installation guide.