Commit | Line | Data |
fb1e11d5 |
1 | package Moose::Meta::Role::Application; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | use metaclass; |
6 | |
7 | our $VERSION = '0.01'; |
8 | our $AUTHORITY = 'cpan:STEVAN'; |
9 | |
10 | # no need to get fancy here ... |
1c9db35c |
11 | sub new { bless {} => (shift) } |
fb1e11d5 |
12 | |
13 | sub apply { |
1c9db35c |
14 | my $self = shift; |
fb1e11d5 |
15 | |
1c9db35c |
16 | $self->check_role_exclusions(@_); |
17 | $self->check_required_methods(@_); |
fb1e11d5 |
18 | |
1c9db35c |
19 | $self->apply_attributes(@_); |
20 | $self->apply_methods(@_); |
fb1e11d5 |
21 | |
1c9db35c |
22 | $self->apply_override_method_modifiers(@_); |
fb1e11d5 |
23 | |
1c9db35c |
24 | $self->apply_before_method_modifiers(@_); |
25 | $self->apply_around_method_modifiers(@_); |
26 | $self->apply_after_method_modifiers(@_); |
fb1e11d5 |
27 | } |
28 | |
29 | sub check_role_exclusions { die "Abstract Method" } |
30 | sub check_required_methods { die "Abstract Method" } |
31 | sub apply_attributes { die "Abstract Method" } |
32 | sub apply_methods { die "Abstract Method" } |
33 | sub apply_override_method_modifiers { die "Abstract Method" } |
34 | sub apply_method_modifiers { die "Abstract Method" } |
bca01282 |
35 | |
36 | sub apply_before_method_modifiers { (shift)->apply_method_modifiers('before' => @_) } |
37 | sub apply_around_method_modifiers { (shift)->apply_method_modifiers('around' => @_) } |
38 | sub apply_after_method_modifiers { (shift)->apply_method_modifiers('after' => @_) } |
fb1e11d5 |
39 | |
40 | 1; |
41 | |
42 | __END__ |
43 | |
44 | =pod |
45 | |
46 | =head1 NAME |
47 | |
48 | Moose::Meta::Role::Application |
49 | |
50 | =head1 DESCRIPTION |
51 | |
52 | This is the abstract base class for role applications. |
53 | |
54 | =head2 METHODS |
55 | |
56 | =over 4 |
57 | |
58 | =item B<new> |
59 | |
60 | =item B<meta> |
61 | |
62 | =item B<apply> |
63 | |
64 | =item B<check_required_methods> |
65 | |
66 | =item B<check_role_exclusions> |
67 | |
68 | =item B<apply_attributes> |
69 | |
70 | =item B<apply_methods> |
71 | |
72 | =item B<apply_method_modifiers> |
73 | |
74 | =item B<apply_before_method_modifiers> |
75 | |
76 | =item B<apply_after_method_modifiers> |
77 | |
78 | =item B<apply_around_method_modifiers> |
79 | |
80 | =item B<apply_override_method_modifiers> |
81 | |
82 | =back |
83 | |
84 | =head1 BUGS |
85 | |
86 | All complex software has bugs lurking in it, and this module is no |
87 | exception. If you find a bug please either email me, or add the bug |
88 | to cpan-RT. |
89 | |
90 | =head1 AUTHOR |
91 | |
92 | Stevan Little E<lt>stevan@iinteractive.comE<gt> |
93 | |
94 | =head1 COPYRIGHT AND LICENSE |
95 | |
778db3ac |
96 | Copyright 2006-2008 by Infinity Interactive, Inc. |
fb1e11d5 |
97 | |
98 | L<http://www.iinteractive.com> |
99 | |
100 | This library is free software; you can redistribute it and/or modify |
101 | it under the same terms as Perl itself. |
102 | |
103 | =cut |
104 | |