Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / MooseX / MethodAttributes / Role / Meta / Method.pm
1 package MooseX::MethodAttributes::Role::Meta::Method;
2 our $VERSION = '0.18';
3
4 # ABSTRACT: metamethod role allowing code attribute introspection
5
6 use Moose::Role;
7
8 use namespace::clean -except => 'meta';
9
10
11 has attributes => (
12     is      => 'ro',
13     lazy    => 1,
14     builder => '_build_attributes',
15 );
16
17
18 sub _build_attributes {
19     my ($self) = @_;
20     return $self->associated_metaclass->get_method_attributes($self->_get_attributed_coderef);
21 }
22
23 sub _get_attributed_coderef {
24     my ($self) = @_;
25     return $self->body;
26 }
27
28 1;
29
30 __END__
31
32 =pod
33
34 =head1 NAME
35
36 MooseX::MethodAttributes::Role::Meta::Method - metamethod role allowing code attribute introspection
37
38 =head1 VERSION
39
40 version 0.18
41
42 =head1 ATTRIBUTES
43
44 =head2 attributes
45
46 Gets the list of code attributes of the method represented by this meta method.
47
48
49
50 =head1 METHODS
51
52 =head2 _build_attributes
53
54 Builds the value of the C<attributes> attribute based on the attributes
55 captured in the associated meta class.
56
57
58
59 =head1 AUTHORS
60
61   Florian Ragwitz <rafl@debian.org>
62   Tomas Doran <bobtfish@bobtfish.net>
63
64 =head1 COPYRIGHT AND LICENSE
65
66 This software is copyright (c) 2009 by Florian Ragwitz.
67
68 This is free software; you can redistribute it and/or modify it under
69 the same terms as perl itself.
70
71 =cut 
72
73