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.30'; |
5
|
|
|
|
|
|
|
|
6
|
21
|
|
|
21
|
|
40484
|
use Moose::Role; |
|
21
|
|
|
|
|
50
|
|
|
21
|
|
|
|
|
199
|
|
7
|
21
|
|
|
21
|
|
108396
|
use Moose::Util qw/find_meta/; |
|
21
|
|
|
|
|
55
|
|
|
21
|
|
|
|
|
191
|
|
8
|
|
|
|
|
|
|
|
9
|
21
|
|
|
21
|
|
4010
|
use namespace::autoclean; |
|
21
|
|
|
|
|
47
|
|
|
21
|
|
|
|
|
202
|
|
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
|
67
|
|
|
67
|
|
197585
|
my ($class, $code, @attrs) = @_; |
21
|
67
|
|
|
|
|
255
|
find_meta($class)->register_method_attributes($code, \@attrs); |
22
|
67
|
|
|
|
|
239
|
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.30 |
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 AUTHORS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=over 4 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item * |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item * |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Tomas Doran <bobtfish@bobtfish.net> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This software is copyright (c) 2009 by Florian Ragwitz. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
68
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=cut |