blib/lib/Acme/Onion.pm

filter: Statementstmt 100% 18 / 18 Branchbran 50.0% 2 / 4 Conditioncond 66.6% 4 / 6 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 82.8% 29 / 35 SCAR 18.1
CC
6
Cov
86%
__ANON__
6.3
BEGIN
1.0
BEGIN
1.0
CRAP 6.1
↑ Summary Build »
1 package Acme::Onion;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = "0.03";
6  
7 BEGIN {
8 push @INC, sub {
9 3 ▶ my ($coderef, $file) = @_;
Subroutine __ANON__: called CC=6 SCAR=18.5
10  
11 3 (my $onion = $file) =~ s/\.pm$/.🧅/;
12  
13 3 for my $dir (@INC) {
14 17 my $filepath = $dir . '/' . $onion;
15  
16 17 ▶ next if ! -e $filepath || -d _ || -b _;
Branch: 1 branch
BranchTrueFalseTotal
if not -e $filepath or -d _ or -b _ 0 1 1
Condition66%4/6
not -e $filepath or -d _ or -b _
l!l&&r!l&&!r
1601
not -e $filepath or -d _
l!l&&r!l&&!r
1601
MC/DC33%1/3
not -e $filepath or -d _ or -b _
not -e $filepath -d _ -b _
Truth table50%2/4
not(A) or B or C
A= not -e $filepathB= -d _C= -b _
ABCresult
1XX1
01X1
0011
0000
17  
18 1 ▶ if (open my $fh, '<', $filepath) {
Branch: 1 branch
BranchTrueFalseTotal
if (open my $fh, "<", $filepath) 1 0 1
19 1 $INC{$file} = $filepath;
20 1 return $fh;
21 }
22 }
23 2 return;
24 }
25 1 ▶};
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 1 1;
28 __END__
↑ Summary Build »