Catalyst::View::Petal(3pm)

Catalyst::View::Petal3pm

Petal view class

Usage

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

Overview

This is the "Petal" view class. Your subclass should inherit from this class.

Methods

process

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

config

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

Releases

7 releases since Debian 7 (Wheezy); the text changed 1 time.

  1. 7–10
  2. 11–13

Author

Christian Hansen, "[email protected]"

From libcatalyst-view-petal-perl 0.03-1.1 in Debian 13 (Trixie). Parsed by carta from the page's man source.