MethodAttributes/Role/AttrContainer/Inheritable.pm

filter: Statementstmt 100% 16 / 16 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 95.4% 21 / 22 CC 2 SCAR 3.5
CC
2
Cov
94%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« MethodAttributes/Role/Meta/Role/Application.pm ↑ Summary MethodAttributes/Role/Meta/Map.pm »
1 package MooseX::MethodAttributes::Role::AttrContainer::Inheritable;
2 # ABSTRACT: capture code attributes in the automatically initialized metaclass instance
3  
4 10 our $VERSION = '0.32';
5  
6 #pod =head1 DESCRIPTION
7 #pod
8 #pod This role extends C<MooseX::MethodAttributes::Role::AttrContainer> with the
9 #pod functionality of automatically initializing a metaclass for the caller and
10 #pod applying the meta roles relevant for capturing method attributes.
11 #pod
12 #pod =cut
13  
14 10 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 10 ▶use MooseX::MethodAttributes ();
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 10 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 10 with 'MooseX::MethodAttributes::Role::AttrContainer';
20  
21 24 ▶before MODIFY_CODE_ATTRIBUTES => sub {
Subroutine __ANON__: called CC=2 SCAR=7.1
22 24 my ($class, $code, @attrs) = @_;
23 24 ▶ return unless @attrs;
Branch: 1 branch
BranchTrueFalseTotal
unless @attrs 0 24 24
24 24 MooseX::MethodAttributes->init_meta( for_class => $class );
25 10 };
26  
27 10 1;
28  
29 __END__
« MethodAttributes/Role/Meta/Role/Application.pm ↑ Summary MethodAttributes/Role/Meta/Map.pm »