| CatalystX-Declare documentation | Contained in the CatalystX-Declare distribution. |
CatalystX::Declare::Keyword::View - Declare Catalyst Views
use CatalystX::Declare;
view MyApp::Web::View::Example
extends Catalyst::View::TT
with MyApp::Web::ViewRole::Caching {
after process (Object $ctx) {
$ctx->log->debug('done processing at ' . time)
if $ctx->debug;
}
}
This handler is a direct extension of CatalystX::Declare::Keyword::Component
and provides a view keyword to declare a catalyst view. Currently, the only
things this declaration does is setting up a Moose class like
MooseX::Declare does, provide CLASS to its scope and default the
superclass to Catalyst::View.
See class in MooseX::Declare for more information on this kind of keyword. Since views do not take actions, no special handling of roles is required, other than with controller roles. So if you want to write roles for views, simply use the role in MooseX::Declare syntax.
These methods are implementation details. Unless you are extending or developing CatalystX::Declare, you should not be concerned with them.
List[Str] Object->default_superclasses ()
Defaults to Catalyst::View.
See AUTHOR in CatalystX::Declare for author information.
This program is free software; you can redistribute it and/or modify it under the same terms as perl itself.
| CatalystX-Declare documentation | Contained in the CatalystX-Declare distribution. |
use MooseX::Declare; class CatalystX::Declare::Keyword::View extends CatalystX::Declare::Keyword::Component { method default_superclasses { 'Catalyst::View' } } __END__