Foreign/Meta/Role/Method/Destructor.pm

filter: Statementstmt 79.1% 19 / 24 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 74.2% 26 / 35 CC 4 SCAR 7.8
CC
4
Cov
73%
DESTROY
2.7
__ANON__
2.7
__ANON__
2.2
CRAP 2.2
« Foreign/Meta/Role/Method/Constructor.pm ↑ Summary NonMoose/Meta/Role/Method/Destructor.pm »
1 package MouseX::Foreign::Meta::Role::Method::Destructor;
2 4 ▶use Mouse::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 7 ▶around _generate_destructor => sub {
Subroutine __ANON__: called CC=2 SCAR=7.8
5 7 my($next, undef, $meta) = @_;
6  
7 7 my $foreign_superclass = $meta->foreign_superclass;
8  
9 7 my $super_destroy;
10 7 ▶ if(!$foreign_superclass->can('DEMOLISHALL')){
Branch: 1 branch
BranchTrueFalseTotal
unless ($foreign_superclass->can("DEMOLISHALL")) 6 1 7
11 6 $super_destroy = $foreign_superclass->can('DESTROY');
12 }
13  
14 6 ▶ return sub {
Subroutine DESTROY: called CC=2 SCAR=10.1
Subroutine __ANON__: not called CC=2 SCAR=10.1
15 0 my($self) = @_;
16 0 $self->DEMOLISHALL();
17  
18 0 ▶ if(defined $super_destroy) {
Branch: 2 branches
BranchTrueFalseTotal
if (defined $super_destroy) 6 0 6
if (defined $super_destroy) 0 0 0
19 0 $self->$super_destroy();
20 }
21 0 return;
22 7 };
23 3 };
24  
25 4 ▶no Mouse::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 3 1;
27 __END__
« Foreign/Meta/Role/Method/Constructor.pm ↑ Summary NonMoose/Meta/Role/Method/Destructor.pm »