Branch Coverage

blib/lib/Image/Xbm.pm
Criterion Covered Total %
branch 69 118 58.4


line true false branch
57 0 0 unless defined $val
77 0 4 if (@_ > 1) { }
93 0 24 if $line =~ /^\s*$/
94 4 20 unless (defined $width)
100 0 52 $c eq $sethotch ? :
68 52 $c eq $setch ? :
101 0 120 if $c eq $sethotch or $c eq $unsethotch
116 1 11 ref $self ? :
129 1 11 if (defined $obj)
137 16 104 if defined $arg{$field}
141 6 6 if (defined $file and not $self->{'-bits'})
142 6 0 if ref $file or -r $file
145 0 12 if defined $file and not defined $self->get("-width")
150 0 24 unless defined $self->get($field)
172 1 0 $hotx > $width ? :
173 1 0 $hoty > $height ? :
205 16 348 if ($field =~ /^-(?:un)?set(?:hot)?ch$/o) { }
213 23 320 wantarray ? :
225 0 22 unless defined $val
226 0 22 if $field eq "-bits" or $field eq "-width" or $field eq "-height"
228 0 6 if $field eq "-hotx" and $val < $UNSET || $val >= $self->get('-width')
230 0 6 if $field eq "-hoty" and $val < $UNSET || $val >= $self->get('-height')
233 0 22 if ($field =~ /^-(?:un)?set(?:hot)?ch$/o) { }
252 120 120 if (defined $val) { }
270 0 0 if (defined $val) { }
271 0 0 if $val =~ /^\d+$/ and $val >= 1 or lc $val eq "black" or $val =~ /^#(\d+)$/ and hex $1
277 0 0 CORE::vec($self->{'-bits'}, $offset, 1) ? :
289 0 0 if (defined $val) { }
303 0 1 unless ref $obj and $obj->isa(__PACKAGE__)
307 0 1 if $self->get("-width") != $obj->get("-width") or $self->get("-height") != $obj->get("-height") or $self->get("-bits") ne $obj->get("-bits")
338 0 0 if ($hotch and $x == $hotx and $y == $hoty) { }
339 0 0 CORE::vec($bits, $bitindex, 1) ? :
343 0 0 CORE::vec($bits, $bitindex, 1) ? :
370 0 6 unless $file
378 4 2 if (not ref $file) { }
0 2 elsif (ref $file eq 'SCALAR') { }
379 0 4 unless open $fh, $file
386 0 2 unless seek $file, 0, 0
391 6 18 if /#define.*width\s+(\d+)/o
392 6 12 if /#define.*height\s+(\d+)/o
393 0 12 if /#define.*_x_hot\s+(\d+)/o
394 0 12 if /#define.*_y_hot\s+(\d+)/o
397 0 6 unless defined $width and defined $height
400 0 6 unless close $fh
404 0 6 defined $hotx ? :
405 0 6 defined $hoty ? :
414 102 78 $val[$i] & $bit ? :
416 36 144 if ($x == $width)
419 6 30 if $y == $height
436 0 4 unless $file
447 0 4 unless open $fh, ">$file"
454 0 4 if $hotx > $UNSET and $hoty > $UNSET
464 24 96 unless defined $char[$char]
465 68 52 if $self->xybit($x, $y)
466 0 120 if $mask == $MASK
468 24 0 if $padded
475 20 4 unless $i == $#char
476 0 24 if $i % $ROWS == $ROWSn1
481 0 4 unless close $fh