Branch Coverage

blib/lib/PDF/Builder/Util.pm
Criterion Covered Total %
branch 73 192 38.0


line true false branch
128 1977 953 if ($n) { }
139 953 1977 if abs $f < "1e-16"
141 2075 855 if (abs $f - int($f) < 10 ** (-$mxd)) { }
0 855 elsif ($ad > 0) { }
172 2 4 $n > $_ ? :
178 5 1 $n < $_ ? :
220 0 26 if ($s == 0)
233 5 21 if ($i < 1) { }
4 17 elsif ($i < 2) { }
3 14 elsif ($i < 3) { }
5 9 elsif ($i < 4) { }
3 6 elsif ($i < 5) { }
268 1 5 if ($h < 60) { }
2 3 elsif ($h < 180) { }
1 2 elsif ($h < 240) { }
290 2 0 if ($delta > 1e-09) { }
298 0 2 if ($rr == $max) { }
1 1 elsif ($gg == $max) { }
306 0 2 if ($h < 0)
322 0 0 if ($delta < 1e-11) { }
325 0 0 if ($l <= 0.5) { }
337 0 2 if ($l <= 0.5) { }
343 0 2 if ($s < 1e-13) { }
358 0 0 if ($ab > 0.45) { }
380 0 23 if (length $name < 5) { }
23 0 elsif (length $name < 8) { }
0 0 elsif (length $name < 11) { }
411 0 2 if (length $name < 6) { }
2 0 elsif (length $name < 10) { }
0 0 elsif (length $name < 14) { }
446 1 27 if (length $name < 5) { }
25 2 elsif (length $name < 8) { }
0 2 elsif (length $name < 11) { }
477 0 0 if (length $name < 5) { }
0 0 elsif (length $name < 8) { }
0 0 elsif (length $name < 11) { }
501 70 0 unless (ref $name)
506 21 49 if ($name =~ /^[a-z]/) { }
23 26 elsif ($name =~ /^#/) { }
0 26 elsif ($name =~ /^%/) { }
26 0 elsif ($name =~ /^!/) { }
0 0 elsif ($name =~ /^&/) { }
517 0 0 unless $name
524 2 0 unless (ref $name)
529 0 2 if ($name =~ /^[a-z]/) { }
0 2 elsif ($name =~ /^#/) { }
2 0 elsif ($name =~ /^%/) { }
0 0 elsif ($name =~ /^!/) { }
0 0 elsif ($name =~ /^&/) { }
540 0 0 unless $name
548 2 0 unless (ref $name)
553 0 2 if ($name =~ /^[a-z]/) { }
0 2 elsif ($name =~ /^\$/) { }
0 2 elsif ($name =~ /^#/) { }
0 2 elsif ($name =~ /^!/) { }
2 0 elsif ($name =~ /^&/) { }
578 0 0 unless $name
595 7 0 if (defined $filter)
598 0 7 unless (ref($filter) =~ /Array$/)
618 4 0 if (defined $filter)
621 0 4 unless (ref($filter) =~ /Array$/)
659 0 9525 if ($e =~ /^uni([0-9A-F]{4})$/)
675 0 0 if defined $PDF::Builder::Util::n2u{$name}
730 27 278 if (defined $x2) { }
13 265 elsif (defined $y1) { }
264 1 elsif (defined $PDF::Builder::Util::PaperSizes{lc $x1}) { }
0 1 elsif ($x1 =~ /^[\d\.]+$/) { }
846 0 0 if ($units[$defUnitIdx] eq $defUnit)
849 0 0 if ($defUnitIdx >= @units)
854 0 0 if ($string eq "")
856 0 0 if ($string =~ /^([.0-9-]+)$/i) { }
0 0 elsif ($string =~ /^([.0-9-]+)(.*)$/i) { }
866 0 0 if ($unit ne "")
868 0 0 if ($units[$unitIdx] eq $unit)
871 0 0 if ($unitIdx >= @units)
880 0 0 if ($value =~ /^-/)
884 0 0 if ($type =~ /^[fi]/) { }
889 0 0 if ($type =~ /^i/) { }
890 0 0 unless ($value =~ /^\d+$/)
894 0 0 unless ($value =~ /^\.\d+$/ or $value =~ /^\d+\.\d+$/ or $value =~ /^\d+\.?$/)
903 0 0 if ($unit eq '' or $unit eq $defUnit) { }
913 0 0 if ($type ne "")
921 0 0 if ($type =~ /^c/)
932 0 0 if ($type =~ /^([\[\(])([^,]+),([^\]\)]+)([\]\)])$/) { }
937 0 0 unless ($lbInf)
940 0 0 if ($lb =~ /^-?\.\d+$/ or $lb =~ /^-?\d+\.\d+/ or $lb =~ /^-?\d+\.?$/) { }
944 0 0 if ($lbInc and $value < $lb)
945 0 0 if ($clamp) { }
948 0 0 if (not $lbInc and $value <= $lb)
949 0 0 if ($clamp) { }
956 0 0 unless ($ubInf)
959 0 0 if ($ub =~ /^-?\.\d+$/ or $ub =~ /^-?\d+\.\d+/ or $ub =~ /^-?\d+\.?$/) { }
963 0 0 if ($ubInc and $value > $ub)
964 0 0 if ($clamp) { }
967 0 0 if (not $ubInc and $value >= $ub)
968 0 0 if ($clamp) { }