lib/Perlmazing/Perlmazing/pl.pm

filter: Statementstmt 100% 28 / 28 Branchbran 65.0% 13 / 20 Conditioncond 66.6% 4 / 6 MC/DCmcdc 25.0% 1 / 4 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 79.6% 51 / 64 CC 16 SCAR 26.8
CC
16
Cov
83%
main
18.0
BEGIN
1.0
BEGIN
1.0
CRAP 14.6
« blib/lib/Perlmazing/Perlmazing/replace_accented_characters.pm ↑ Summary lib/Perlmazing/Perlmazing/Precompile/is_number.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use Perlmazing;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 10 ▶sub main {
Subroutine main: called CC=16 SCAR=28.9
Pod undocumented
6 10 my $offset = 0;
7 10 ▶ (@_) = ($_) if not @_ and defined $_;
Branch: 1 branch
BranchTrueFalseTotal
if not @_ and defined $_ 0 10 10
Condition66%2/3
not @_ and defined $_
!ll&&!rl&&r
910
MC/DC0%0/2
not @_ and defined $_
not @_ defined $_
Truth table66%2/3
not(A) and B
A= not @_B= defined $_
ABresult
0X0
100
111
8 10 ▶ if (not defined wantarray) {
Branch: 3 branches
BranchTrueFalseTotal
if (not defined wantarray) { } 4 6 10
elsif (defined wantarray and not wantarray) { } 3 3 6
elsif (wantarray) { } 3 0 3
9 4 foreach my $i (@_) {
10 1 ▶ no warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 13 ▶ defined($i) ? print "$i\n" : print "\n";
Branch: 1 branch
BranchTrueFalseTotal
defined $i ? : 13 0 13
12 }
13 4 ▶ print "\n" if not @_;
Branch: 1 branch
BranchTrueFalseTotal
if not @_ 1 3 4
14 ▶ } elsif (defined wantarray and not wantarray) {
Condition66%2/3
defined wantarray and not wantarray
!ll&&!rl&&r
033
MC/DC50%1/2
defined wantarray and not wantarray
defined wantarray not wantarray
Truth table66%2/3
A and not(B)
A= defined wantarrayB= not wantarray
ABresult
0X0
100
111
15 3 my $res;
16 3 foreach my $i (@_) {
17 13 ▶ $res .= defined($i) ? "$i\n" : "\n";
Branch: 1 branch
BranchTrueFalseTotal
defined $i ? : 13 0 13
18 }
19 3 ▶ return "\n" if not @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 3 3
20 3 return $res;
21 } elsif (wantarray) {
22 3 my @res;
23 3 foreach my $i (@_) {
24 13 ▶ push @res, defined($i) ? "$i\n" : "\n";
Branch: 1 branch
BranchTrueFalseTotal
defined $i ? : 13 0 13
25 }
26 3 ▶ return "\n" if not @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 3 3
27 3 return @res;
28 }
29 }
30  
31 1;
« blib/lib/Perlmazing/Perlmazing/replace_accented_characters.pm ↑ Summary lib/Perlmazing/Perlmazing/Precompile/is_number.pm »