Branch Coverage

blib/lib/Number/Denominal.pm
Criterion Covered Total %
branch 43 46 93.4


line true false branch
45 10265 39371 if (@bits and $$args{'precision'} and ++$step > $$args{'precision'})
48 1409 8856 unless $$bit{'num'}
52 586 8270 if defined $pre_bit
57 12562 4661 if $bits[$_]{'num'} * $bits[$_]{'divisor'} / $bits[$_ - 1]{'divisor'} >= 0.5
61 51 17172 if $bits[$_]{'num'} * $bits[$_]{'divisor'} / $bits[$_ - 1]{'divisor'} == 1
67 8856 8367 if $_ == 0 or $bits[$_ - 1]{'num'} * $bits[$_ - 1]{'divisor'} < $bits[$_ - 2]{'divisor'}
80 7144 53971 unless $$bit{'num'}
81 7144 53971 unless $$bit{'num'}
89 3193 50728 $$_{'num'} == 1 ? :
25 53921 $mode eq 'list' ? :
22 53946 $mode eq 'hashref' ? :
94 13 20291 if ($mode eq 'list')
102 25 18 exists $bits_in_result{$_} ? :
107 13 20279 $mode eq 'list' ? :
12 20292 $mode eq 'hashref' ? :
119 101433 21 unless (ref $den[$_])
140 1 20303 if (@$den == 1 and ref $$den[0] eq 'ARRAY') { }
20271 64 elsif (@$den == 1 and ref $$den[0] eq 'SCALAR') { }
150 0 20271 unless $values_for_unit
161 10034 10271 unless ref $$den[-1] eq 'HASH'
165 10271 0 if (exists $extra_args{'precision'})
167 1 0 defined $p ? :
1 10270 unless $p and $p =~ /\A\d+\z/