Branch Coverage

blib/lib/CGI/Imagemap.pm
Criterion Covered Total %
branch 25 40 62.5


line true false branch
16 0 3 if ($_[0] eq '-file')
17 0 0 unless open my $map, $_[1]
30 0 8 unless defined $$self{'ISMAP'}
34 2 29 if $shape =~ /default/i
35 7 24 if $shape =~ /rect/i
36 3 27 if $shape =~ /poly/i
37 5 24 if $shape =~ /circle/i
38 6 21 if $shape =~ /oval/i
39 8 18 if $shape =~ /point/i
54 7 1 if ($$self{'MINDIST'} == -1 or $dist2 < $$self{'MINDIST'})
109 0 3 if $pn < 3
127 4 5 if $x1 > 0 and $x2 > 0
130 4 0 if ($y1 <=> 0) == ($y2 <=> 0) and ($y1 != 0 and $y2 != 0)
134 0 1 if ($y2 > $y1) { }
1 0 elsif ($y1 > $y2) { }
135 0 0 if $y2 == 0
138 0 1 if $y1 == 0
143 0 0 if $x1 < 0 or $x2 < 0
151 0 1 unless ($dx)
159 0 1 if (0 - $b) / $m > 0