| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MooseX::MethodAttributes::Role::Meta::Method; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: metamethod role allowing code attribute introspection |
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.30'; |
|
5
|
|
|
|
|
|
|
|
|
6
|
21
|
|
|
21
|
|
99168
|
use Moose::Role; |
|
|
21
|
|
|
|
|
51
|
|
|
|
21
|
|
|
|
|
165
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
21
|
|
|
21
|
|
106544
|
use namespace::autoclean; |
|
|
21
|
|
|
|
|
54
|
|
|
|
21
|
|
|
|
|
187
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#pod =attr attributes |
|
11
|
|
|
|
|
|
|
#pod |
|
12
|
|
|
|
|
|
|
#pod Gets the list of code attributes of the method represented by this meta method. |
|
13
|
|
|
|
|
|
|
#pod |
|
14
|
|
|
|
|
|
|
#pod =cut |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has attributes => ( |
|
17
|
|
|
|
|
|
|
is => 'ro', |
|
18
|
|
|
|
|
|
|
lazy => 1, |
|
19
|
|
|
|
|
|
|
builder => '_build_attributes', |
|
20
|
|
|
|
|
|
|
); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#pod =method _build_attributes |
|
23
|
|
|
|
|
|
|
#pod |
|
24
|
|
|
|
|
|
|
#pod Builds the value of the C<attributes> attribute based on the attributes |
|
25
|
|
|
|
|
|
|
#pod captured in the associated meta class. |
|
26
|
|
|
|
|
|
|
#pod |
|
27
|
|
|
|
|
|
|
#pod =cut |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _build_attributes { |
|
30
|
27
|
|
|
27
|
|
45
|
my ($self) = @_; |
|
31
|
27
|
|
|
|
|
129
|
return $self->associated_metaclass->get_method_attributes($self->_get_attributed_coderef); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _get_attributed_coderef { |
|
35
|
84
|
|
|
84
|
|
388
|
my ($self) = @_; |
|
36
|
84
|
|
|
|
|
409
|
return $self->body; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=pod |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=encoding UTF-8 |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 NAME |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
MooseX::MethodAttributes::Role::Meta::Method - metamethod role allowing code attribute introspection |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 VERSION |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
version 0.30 |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head2 attributes |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Gets the list of code attributes of the method represented by this meta method. |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 _build_attributes |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Builds the value of the C<attributes> attribute based on the attributes |
|
66
|
|
|
|
|
|
|
captured in the associated meta class. |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 AUTHORS |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over 4 |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item * |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item * |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Tomas Doran <bobtfish@bobtfish.net> |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This software is copyright (c) 2009 by Florian Ragwitz. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
87
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |