lib/Perlmazing/Perlmazing/Precompile/decimals.pm

filter: Statementstmt 37.5% 3 / 8 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 1 / 2 Podpod n/a totaltotal 26.6% 4 / 15 CC 3 SCAR 22.2
CC
3
Cov
25%
main
12.0
BEGIN
1.0
CRAP 9.2
« blib/lib/Perlmazing/Perlmazing/flatten.pm ↑ Summary lib/Perlmazing/Perlmazing/Precompile/is_integer.pm »
1 30 ▶use Perlmazing qw(croak is_number);
Subroutine BEGIN: called CC=1 SCAR=0.0
2 0 ▶sub main ($) {
Subroutine main: not called CC=3 SCAR=24.8
3 0 ▶ my $value = shift || 0;
Condition0%0/2
shift() || 0
l!l
00
MC/DC0%0/1
shift() || 0
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
4 0 ▶ unless (is_number $value) {
Branch: 1 branch
BranchTrueFalseTotal
unless (&is_number($value)) 0 0 0
5 0 croak "Use of non-numeric value in decimals()";
6 }
7 0 my $int = int $value;
8 0 return $value - $int;
9 }
10  
11 1;
« blib/lib/Perlmazing/Perlmazing/flatten.pm ↑ Summary lib/Perlmazing/Perlmazing/Precompile/is_integer.pm »