1 package MooseX::MethodAttributes::Role::AttrContainer;
4 # ABSTRACT: capture code attributes in the class' metaclass
7 use Moose::Util qw/find_meta/;
9 use namespace::clean -except => 'meta';
12 sub MODIFY_CODE_ATTRIBUTES {
13 my ($class, $code, @attrs) = @_;
14 find_meta($class)->register_method_attributes($code, \@attrs);
26 MooseX::MethodAttributes::Role::AttrContainer - capture code attributes in the class' metaclass
34 =head2 MODIFY_CODE_ATTRIBUTES ($code, @attrs)
36 Accepts a list of attributes for a coderef and stores it the class' metaclass.
44 Florian Ragwitz <rafl@debian.org>
45 Tomas Doran <bobtfish@bobtfish.net>
47 =head1 COPYRIGHT AND LICENSE
49 This software is copyright (c) 2009 by Florian Ragwitz.
51 This is free software; you can redistribute it and/or modify it under
52 the same terms as perl itself.