blib/lib/Acme/Onion.pm

filter: Statementstmt 100% 18 / 18 Branchbran 75.0% 3 / 4 Conditioncond 66.6% 4 / 6 MC/DCmcdc 33.3% 1 / 3 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 85.7% 30 / 35 CC 6 SCAR 14.9
CC
6
Cov
89%
__ANON__
6.1
BEGIN
1.0
BEGIN
1.0
CRAP 4.4
↑ Summary
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.04";
6  
7 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 ▶ push @INC, sub {
Subroutine __ANON__: called CC=6 SCAR=18.2
9 3 my ($coderef, $file) = @_;
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 _ 16 1 17
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 };
26  
27 1 1;
28 __END__
↑ Summary