The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Catalyst::View::ClearSilver - ClearSilver View Class

SYNOPSIS

Use the helper:

    create.pl view ClearSilver ClearSilver

Which generates lib/MyApp/View/ClearSilver.pm:

    package MyApp::View::ClearSilver
    use base 'Catalyst::View::ClearSilver';
    1;

Configure it to your liking:

    MyApp->config->{View::ClearSilver} = {
        INCLUDE_PATH       => ['/path/to/loadpath', '/path/to/anotherpath'],
        TEMPLATE_EXTENSION => '.cs', # .cs is the default
        
        # optional:
        INCLUDE_HDF        => ['mydata1.hdf', 'mydata2.hdf'],
    };

Then use it:

    $c->forward('MyApp::View::ClearSilver');
    my $out = $c->view('ClearSilver')->render('template.cs');
    # etc.

DESCRIPTION

This is the ClearSilver view class. It works like Catalyst::View::Templated, so refer to that for more details on what config options and methods you can use.

CAVEATS

You can't call back into your application from ClearSilver, so most of the attributes in $c will be worthless. Be sure to pre-compute anything you need and put it in the stash before rendering.

$c will not be included in your HDF at all, and hence the CATALYST_VAR config option is ignored. Setting it is a fatal error.

METHODS

process

Renders the selected template and stores the result as the response body.

render($template)

Renders $template and returns the result

template([$template])

Sets the template to render, or returns the template that will be rendered.

new

Called by Catalyst. Sets up the config (mapping 0.01 config variables to 0.02 names).

CONFIG VARIABLES

INCLUDE_PATH

added to hdf.loadpaths. default is $c->config->{root} only.

INCLUDE_HDF

HDF Dataset files into the current HDF object.

TEMPLATE_EXTENSION

a sufix to add when looking for templates bases on the match method in Catalyst::Request.

AUTHOR

Jiro Nishiguchi <jiro@cpan.org>

Jonathan Rockway <jrockway@cpan.org>

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

SEE ALSO

Catalyst, Catalyst::View::Templated, ClearSilver

ClearSilver Documentation: http://www.clearsilver.net/docs/