Promiser/LeakDetector.pm

filter: Statementstmt 70.0% 7 / 10 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 66.6% 2 / 3 Podpod n/a totaltotal 37.5% 9 / 24 CC 4 SCAR 26.1
CC
4
Cov
39%
DESTROY
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 13.7
« Promiser/Backend.pm ↑ Summary Promiser/Backend/LoopBase.pm »
1 package Net::Curl::Promiser::LeakDetector;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub DESTROY {
Subroutine DESTROY: not called CC=4 SCAR=30.0
7 0 my ($self) = @_;
8  
9 0 ▶ if (!$self->{'ignore_leaks'} && ${^GLOBAL_PHASE} && ${^GLOBAL_PHASE} eq 'DESTRUCT' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $self->{"ignore_leaks"} and ${^GLOBAL_PHASE} and ${^GLOBAL_PHASE} eq "DESTRUCT") 0 0 0
Condition0%0/6
not $self->{"ignore_leaks"} and ${^GLOBAL_PHASE} and ${^GLOBAL_PHASE} eq "DESTRUCT"
!ll&&!rl&&r
000
not $self->{"ignore_leaks"} and ${^GLOBAL_PHASE}
!ll&&!rl&&r
000
MC/DC0%0/3
not $self->{"ignore_leaks"} and ${^GLOBAL_PHASE} and ${^GLOBAL_PHASE} eq "DESTRUCT"
not $self->{"ignore_leaks"} ${^GLOBAL_PHASE} ${^GLOBAL_PHASE} eq "DESTRUCT"
Truth table0%0/4
not(A) and B and C
A= not $self->{"ignore_leaks"}B= ${^GLOBAL_PHASE}C= ${^GLOBAL_PHASE} eq "DESTRUCT"
ABCresult
0XX0
10X0
1100
1111
10 0 warn "$self: destroyed at global destruction; memory leak likely!";
11 }
12 }
13  
14 1 1;
« Promiser/Backend.pm ↑ Summary Promiser/Backend/LoopBase.pm »