Commit | Line | Data |
8e5d9092 |
1 | use MooseX::Declare; |
2 | |
3 | class CatalystX::Declare::Keyword::Model |
4 | extends CatalystX::Declare::Keyword::Component { |
5 | |
6 | method default_superclasses { 'Catalyst::Model' } |
7 | } |
8 | |
9 | __END__ |
10 | |
11 | =head1 NAME |
12 | |
13 | CatalystX::Declare::Keyword::Model - Declare Catalyst Models |
14 | |
15 | =head1 SYNOPSIS |
16 | |
17 | use CatalystX::Declare; |
18 | |
19 | model MyApp::Web::Model::Random { |
20 | |
21 | method upto (Int $n) { int(rand $n) } |
22 | } |
23 | |
24 | =head1 DESCRIPTION |
25 | |
26 | This handler is a simple extension of L<CatalystX::Declare::Keyword::Component> |
27 | and defaults to L<Catalyst::Model> as superclass. Additionally, L<CLASS> will |
28 | be imported. See L<MooseX::Declare/class> for more information on usage, since |
29 | this keyword is subclass extending its parent's features. |
30 | |
31 | =head1 SUPERCLASSES |
32 | |
33 | =over |
34 | |
35 | =item L<CatalystX::Declare::Keyword::Component> |
36 | |
37 | =back |
38 | |
39 | =head1 METHODS |
40 | |
41 | These methods are implementation details. Unless you are extending or |
42 | developing L<CatalystX::Declare>, you should not be concerned with them. |
43 | |
44 | =head2 default_superclasses |
45 | |
46 | List[Str] Object->default_superclasses () |
47 | |
48 | Defaults to L<Catalyst::View>. |
49 | |
50 | =head1 SEE ALSO |
51 | |
52 | =over |
53 | |
54 | =item L<CatalystX::Declare> |
55 | |
56 | =item L<CatalystX::Declare::Keyword::Component> |
57 | |
58 | =item L<MooseX::Declare/class> |
59 | |
60 | =back |
61 | |
62 | =head1 AUTHOR |
63 | |
64 | See L<CatalystX::Declare/AUTHOR> for author information. |
65 | |
66 | =head1 LICENSE |
67 | |
68 | This program is free software; you can redistribute it and/or modify it under |
69 | the same terms as perl itself. |
70 | |
71 | =cut |