line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooseX::MethodAttributes::Role::AttrContainer; |
2
|
|
|
|
|
|
|
# ABSTRACT: capture code attributes in the class' metaclass |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.32'; |
5
|
|
|
|
|
|
|
|
6
|
20
|
|
|
20
|
|
40454
|
use Moose::Role; |
|
20
|
|
|
|
|
58
|
|
|
20
|
|
|
|
|
205
|
|
7
|
20
|
|
|
20
|
|
109121
|
use Moose::Util qw/find_meta/; |
|
20
|
|
|
|
|
56
|
|
|
20
|
|
|
|
|
166
|
|
8
|
|
|
|
|
|
|
|
9
|
20
|
|
|
20
|
|
4630
|
use namespace::autoclean; |
|
20
|
|
|
|
|
66
|
|
|
20
|
|
|
|
|
246
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#pod =method MODIFY_CODE_ATTRIBUTES ($code, @attrs) |
12
|
|
|
|
|
|
|
#pod |
13
|
|
|
|
|
|
|
#pod Accepts a list of attributes for a coderef and stores it the class' metaclass. |
14
|
|
|
|
|
|
|
#pod |
15
|
|
|
|
|
|
|
#pod See L<attributes>. |
16
|
|
|
|
|
|
|
#pod |
17
|
|
|
|
|
|
|
#pod =cut |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub MODIFY_CODE_ATTRIBUTES { |
20
|
62
|
|
|
62
|
|
209657
|
my ($class, $code, @attrs) = @_; |
21
|
62
|
|
|
|
|
287
|
find_meta($class)->register_method_attributes($code, \@attrs); |
22
|
62
|
|
|
|
|
231
|
return (); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding UTF-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
MooseX::MethodAttributes::Role::AttrContainer - capture code attributes in the class' metaclass |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 VERSION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
version 0.32 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 METHODS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 MODIFY_CODE_ATTRIBUTES ($code, @attrs) |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Accepts a list of attributes for a coderef and stores it the class' metaclass. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
See L<attributes>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SUPPORT |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Bugs may be submitted through L<the RT bug tracker|https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-MethodAttributes> |
52
|
|
|
|
|
|
|
(or L<bug-MooseX-MethodAttributes@rt.cpan.org|mailto:bug-MooseX-MethodAttributes@rt.cpan.org>). |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
There is also a mailing list available for users of this distribution, at |
55
|
|
|
|
|
|
|
L<http://lists.perl.org/list/moose.html>. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
There is also an irc channel available for users of this distribution, at |
58
|
|
|
|
|
|
|
L<C<#moose> on C<irc.perl.org>|irc://irc.perl.org/#moose>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHORS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=over 4 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item * |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item * |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Tomas Doran <bobtfish@bobtfish.net> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This software is copyright (c) 2009 by Florian Ragwitz. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
79
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |