| CatalystX::Declare::Keyword::View - Declare Catalyst Views |
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 the CatalystX::Declare::Keyword::Component manpage
and provides a view keyword to declare a catalyst view. Currently, the only
things this declaration does is setting up a Moose class like
the MooseX::Declare manpage does, provide CLASS to its scope and default the
superclass to the Catalyst::View manpage.
See class in the MooseX::Declare manpage 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 the MooseX::Declare manpage syntax.
These methods are implementation details. Unless you are extending or developing the CatalystX::Declare manpage, you should not be concerned with them.
List[Str] Object->default_superclasses ()
Defaults to the Catalyst::View manpage.
See AUTHOR in the CatalystX::Declare manpage 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::Keyword::View - Declare Catalyst Views |