Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / MooseX / MethodAttributes / Role / AttrContainer.pm
CommitLineData
3fea05b9 1package MooseX::MethodAttributes::Role::AttrContainer;
2our $VERSION = '0.18';
3
4# ABSTRACT: capture code attributes in the class' metaclass
5
6use Moose::Role;
7use Moose::Util qw/find_meta/;
8
9use namespace::clean -except => 'meta';
10
11
12sub MODIFY_CODE_ATTRIBUTES {
13 my ($class, $code, @attrs) = @_;
14 find_meta($class)->register_method_attributes($code, \@attrs);
15 return ();
16}
17
181;
19
20__END__
21
22=pod
23
24=head1 NAME
25
26MooseX::MethodAttributes::Role::AttrContainer - capture code attributes in the class' metaclass
27
28=head1 VERSION
29
30version 0.18
31
32=head1 METHODS
33
34=head2 MODIFY_CODE_ATTRIBUTES ($code, @attrs)
35
36Accepts a list of attributes for a coderef and stores it the class' metaclass.
37
38See L<attributes>.
39
40
41
42=head1 AUTHORS
43
44 Florian Ragwitz <rafl@debian.org>
45 Tomas Doran <bobtfish@bobtfish.net>
46
47=head1 COPYRIGHT AND LICENSE
48
49This software is copyright (c) 2009 by Florian Ragwitz.
50
51This is free software; you can redistribute it and/or modify it under
52the same terms as perl itself.
53
54=cut
55
56