SYNOPSIS

    # 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');

DESCRIPTION

This is the \*(C`Petal\*(C' view class. Your subclass should inherit from this class.

\s-1METHODS\s0

process

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'.

config

This allows your view subclass to pass additional settings to the Petal config hash.

RELATED TO Catalyst::View::Petal…

Petal, Catalyst, Catalyst::Base.

AUTHOR

Christian Hansen, \*(C`[email protected]\*(C'

COPYRIGHT

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.