NAME

Catalyst::View::TT - Template View Class

SYNOPSIS

# use the helper
create.pl view TT TT

# lib/MyApp/View/TT.pm
package MyApp::View::TT;

use base 'Catalyst::View::TT';

__PACKAGE__->config->{DEBUG} = 'all';

1;

$c->forward('MyApp::View::TT');

DESCRIPTION

This is the Template view class. Your subclass should inherit from this class. If you want to override TT config settings, you can do it there by setting __PACKAGE__->config->{OPTION} as shown in the synopsis. Of interest might be EVAL_PERL, which is disabled by default, and LOAD_TEMPLATES, which is set to use the provider.

If you want to use EVAL perl, add something like this:

__PACKAGE__->config->{EVAL_PERL} = 1;
__PACKAGE__->config->{LOAD_TEMPLATES} = undef;

METHODS

process

Renders the template specified in $c->stash->{template} or $c->request->match to $c->response->output.

config

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

SEE ALSO

Catalyst.

AUTHOR

Sebastian Riedel, sri@cpan.org Marcus Ramberg

COPYRIGHT

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