3 class CatalystX::Declare::Keyword::View
4 extends CatalystX::Declare::Keyword::Component {
6 method default_superclasses { 'Catalyst::View' }
13 CatalystX::Declare::Keyword::View - Declare Catalyst Views
17 use CatalystX::Declare;
19 view MyApp::Web::View::Example
20 extends Catalyst::View::TT
21 with MyApp::Web::ViewRole::Caching {
23 after process (Object $ctx) {
24 $ctx->log->debug('done processing at ' . time)
31 This handler is a direct extension of L<CatalystX::Declare::Keyword::Component>
32 and provides a C<view> keyword to declare a catalyst view. Currently, the only
33 things this declaration does is setting up a L<Moose> class like
34 L<MooseX::Declare> does, provide L<CLASS> to its scope and default the
35 superclass to L<Catalyst::View>.
37 See L<MooseX::Declare/class> for more information on this kind of keyword.
38 Since views do not take actions, no special handling of roles is required,
39 other than with controller roles. So if you want to write roles for views,
40 simply use the L<MooseX::Declare/role> syntax.
46 =item L<CatalystX::Declare::Keyword::Component>
52 These methods are implementation details. Unless you are extending or
53 developing L<CatalystX::Declare>, you should not be concerned with them.
55 =head2 default_superclasses
57 List[Str] Object->default_superclasses ()
59 Defaults to L<Catalyst::View>.
65 =item L<CatalystX::Declare>
67 =item L<CatalystX::Declare::Keyword::Component>
69 =item L<MooseX::Declare/class>
75 See L<CatalystX::Declare/AUTHOR> for author information.
79 This program is free software; you can redistribute it and/or modify it under
80 the same terms as perl itself.