Branch Coverage

blib/lib/Graphics/Fig/Parameters.pm
Criterion Covered Total %
branch 138 248 55.6


line true false branch
228 0 53 unless ($value =~ /^\s*($RE_REAL)/)
248 0 7 if ($value =~ /^\d+$/)
252 6 1 if (defined($temp = $AreaFills{$value}))
255 0 1 if ($value =~ /^shade(\d+)$/)
257 0 0 if ($val < 1 or $val > 19)
263 1 0 if ($value =~ /^tint(\d+)$/)
265 0 1 if ($val < 1 or $val > 19)
287 1 30 if ($value eq 'none')
290 27 3 if ($value eq 'forw' or $value eq 'forward')
293 1 2 if ($value eq 'back' or $value eq 'backward')
296 2 0 if ($value eq 'both')
316 0 7 if (ref $value eq 'ARRAY' and scalar @{$value;} == 2)
319 7 0 if (defined($temp = $ArrowStyles{$value}))
338 0 5 if ($value eq 'false' or $value eq '0')
341 5 0 if ($value eq 'true' or $value eq '1')
361 0 1 if ($value =~ /^\d+$/)
365 1 0 if (defined($temp = $CapStyles{$value}))
387 0 42 if ($@)
407 0 12 if (not $value =~ /^$RE_INT$/ or $value < 0 or $value > 999)
426 0 0 if (ref $value ne 'ARRAY')
430 0 0 if (ref $value ne '')
451 0 1 if (defined do { $context }->{'fontFlags'})
460 1 2 if ($flag eq 'rigid') { }
1 1 elsif ($flag eq 'special') { }
0 1 elsif ($flag eq 'postscript') { }
1 0 elsif ($flag eq 'hidden') { }
471 2 1 if ($op eq '-') { }
478 0 1 if ($value ne '')
499 0 0 unless (defined($temp = $FontNames{$value}))
519 0 0 if (not $value =~ s/^\s*($RE_REAL)// and $value <= 0)
540 0 5 unless ($value =~ /^\s*($RE_INT)/)
560 0 0 if ($value =~ /^\d+$/)
564 0 0 if (defined($temp = $JoinStyles{$value}))
585 0 650 unless ($value =~ s/^\s*($RE_REAL)//)
590 638 12 if ($value eq '') { }
12 0 elsif (defined($temp = $Units{$value})) { }
614 0 5 if ($value =~ /^\d+$/)
618 5 0 if (defined($temp = $LineStyles{$value}))
637 0 0 if ($value =~ /^Single$/i)
640 0 0 if ($value =~ /^Multiple$/i)
659 0 1 if ($value =~ /^Landscape$/i)
662 1 0 if ($value =~ /^Portrait$/i)
682 0 0 if ($value =~ /^Center$/i)
685 0 0 if ($value =~ /^Flush\s*left$/i)
705 0 0 if (defined $PaperSizes{$value})
724 0 280 if (ref $value ne 'ARRAY' or scalar @{$value;} != 2 or not defined do { $value }->[0] or not defined do { $value }->[1])
747 0 82 if (ref $value ne 'ARRAY')
752 19 63 if (scalar @{$value;} == 2 and ref do { $value }->[0] eq '' and ref do { $value }->[1] eq '') { }
777 0 0 if ($value =~ s/^($RE_REAL)$// and $value > 0)
798 7 0 if (ref $value eq 'ARRAY') { }
799 0 7 if (scalar @{$value;} != 2 or not defined($u = do { $value }->[0]) or not defined($v = do { $value }->[1]) or not $u =~ /^$RE_REAL/ or not $v =~ /^\s*$RE_REAL/)
805 0 0 if (not defined $value or !ref($value) eq '' or not $value =~ /$RE_REAL/)
828 1 13 if ($value eq 'open-approximated')
831 1 12 if ($value eq 'closed-approximated')
834 3 9 if ($value eq 'open-interpolated')
837 1 8 if ($value eq 'closed-interpolated')
840 7 1 if ($value eq 'open-x')
843 1 0 if ($value eq 'closed-x')
846 0 0 if ($value =~ /^\s*($RE_INT)/)
847 0 0 if ($value < 0 or $value > 5)
873 0 12 if $n < 0 or $n > 255
874 0 12 if ($n < 32 or $n == 127)
896 0 1 if ($value eq 'left')
899 1 0 if ($value eq 'center')
902 0 0 if ($value eq 'right')
905 0 0 if (not $value =~ /^$RE_INT$/ or $value < 0 or $value > 2)
925 0 0 if ($value == -1 or $value == -2)
931 0 0 if ($@)
953 1 1 if ($value =~ s/^\s*($RE_REAL)//)
957 0 2 unless (defined($temp = $Units{$value}))
973 157 74 if ($type eq '') { }
0 74 elsif ($type eq 'SCALAR') { }
74 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'HASH') { }
0 0 elsif ($type eq 'CODE') { }
0 0 elsif ($type eq 'REF') { }
0 0 elsif ($type eq 'GLOB') { }
0 0 elsif ($type eq 'LVALUE') { }
1268 0 393 unless (defined $namedTemplate)
1279 200 193 if ($last >= 0 and ref $_[$last] eq 'HASH')
1289 182 211 if ($signature ne '')
1291 0 182 unless (defined $positionalParameterNames)
1297 0 231 if (defined $namedParameters{$name})
1321 8855 835 unless (defined $aliases)
1326 561 9964 if (defined $tempValue)
1327 0 561 if (defined $pname)
1336 561 9129 if (defined $value)
1337 478 83 if (defined $convert) { }
1345 6583 2546 if (defined $defaults)
1346 2711 3872 if (defined($value = do { $defaults }->{$name}))
1351 3664 2754 if (defined $default)
1374 0 23 unless defined $offset
1375 0 23 unless ref $offset eq 'ARRAY'
1395 18 6 unless (defined $center)
1398 0 24 unless defined $center
1399 0 24 unless defined $rotation
1427 8 0 unless (defined $center)
1430 0 8 unless defined $scale
1431 0 8 unless defined $center
1439 0 31 unless ref $point eq 'ARRAY'
1457 29 71 unless (defined $x_min)
1464 32 39 if (do { $point }->[0] < $x_min)
1467 21 50 if (do { $point }->[1] < $y_min)
1470 15 56 if (do { $point }->[0] > $x_max)
1473 23 48 if (do { $point }->[1] > $y_max)
1495 45 93 if ($arrowMode & 1 << $i)
1498 43 2 unless (defined($temp = ${$parameters;}{"${prefix}ArrowStyle"}))
1502 44 1 unless (defined($temp = ${$parameters;}{"${prefix}ArrowThickness"}))
1506 44 1 unless (defined($temp = ${$parameters;}{"${prefix}ArrowWidth"}))
1510 44 1 unless (defined($temp = ${$parameters;}{"${prefix}ArrowHeight"}))
1537 13 17 if ($arrowMode & 1 << $i) { }
0 17 elsif (defined ${$object;}{"${prefix}Arrow"}) { }
1538 0 13 unless (defined($value = ${$object;}{"${prefix}Arrow"}))
1542 13 0 unless (defined($temp = ${$parameters;}{"${prefix}arrowStyle"}))
1545 0 13 if (($result = do { $value }->[0] <=> do { $temp }->[0]) != 0)
1548 0 13 if (($result = do { $value }->[1] <=> do { $temp }->[1]) != 0)
1551 13 0 unless (defined($temp = ${$parameters;}{"${prefix}arrowThickness"}))
1554 0 13 if (($result = do { $value }->[2] <=> $temp) != 0)
1557 13 0 unless (defined($temp = ${$parameters;}{"${prefix}arrowWidth"}))
1560 0 13 if (($result = do { $value }->[3] <=> $temp) != 0)
1563 13 0 unless (defined($temp = ${$parameters;}{"${prefix}arrowHeight"}))
1566 0 13 if (($result = do { $value }->[4] <=> $temp) != 0)
1590 42 70 if (defined($fArrow = do { $object }->{'fArrow'}))
1596 3 109 if (defined($bArrow = do { $object }->{'bArrow'}))