| 1 | package MooseX::MethodAttributes::Role::AttrContainer; | ||
| 2 | # ABSTRACT: capture code attributes in the class' metaclass | ||
| 3 | |||
| 4 | 20 | our $VERSION = '0.32'; | |
| 5 | |||
| 6 | 20 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 20 | ▶ | use Moose::Util qw/find_meta/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 20 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | 62 | ▶ | sub MODIFY_CODE_ATTRIBUTES { |
|
Subroutine
MODIFY_CODE_ATTRIBUTES: called CC=1 SCAR=0.0
| |||
| 20 | 62 | my ($class, $code, @attrs) = @_; | |
| 21 | 62 | find_meta($class)->register_method_attributes($code, \@attrs); | |
| 22 | 62 | return (); | |
| 23 | } | ||
| 24 | |||
| 25 | 20 | 1; | |
| 26 | |||
| 27 | __END__ | ||