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 \*(C`Petal\*(C' view class. Your subclass should inherit from this class.
Renders the template specified in \*(C`$c->stash->{template}\*(C' or \*(C`$c->request->match\*(C'. Template variables are set up from the contents of \*(C`$c->stash\*(C', augmented with \*(C`base\*(C' set to \*(C`$c->req->base\*(C', \*(C`c\*(C' to $c and \*(C`name\*(C' to \*(C`$c->config->{name}\*(C'. Output is stored in \*(C`$c->response->body\*(C'.
This allows your view subclass to pass additional settings to the Petal config hash.
Petal, Catalyst, Catalyst::Base.
Christian Hansen, \*(C`[email protected]\*(C'
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.