Branch Coverage

blib/lib/Image/Xbm.pm
Criterion Covered Total %
branch 64 116 55.1


line true false branch
59 0 0 unless defined $val
79 0 1 if (@_ > 1) { }
95 0 6 if $line =~ /^\s*$/
96 1 5 unless (defined $width)
102 0 13 $c eq $sethotch ? :
17 13 $c eq $setch ? :
103 0 30 if $c eq $sethotch or $c eq $unsethotch
118 1 3 ref $self ? :
131 1 3 if (defined $obj)
139 5 35 if defined $arg{$field}
143 1 0 if defined $file and -r $file and not $$self{'-bits'}
145 0 4 if defined $file and not defined $self->get('-width')
150 0 8 unless defined $self->get($field)
172 1 0 $hotx > $width ? :
173 1 0 $hoty > $height ? :
205 7 104 if ($field =~ /^-(?:un)?set(?:hot)?ch$/o) { }
213 17 88 wantarray ? :
225 0 4 unless defined $val
226 0 4 if $field eq '-bits' or $field eq '-width' or $field eq '-height'
228 0 1 if $field eq '-hotx' and $val < $UNSET || $val >= $self->get('-width')
230 0 1 if $field eq '-hoty' and $val < $UNSET || $val >= $self->get('-height')
233 0 4 if ($field =~ /^-(?:un)?set(?:hot)?ch$/o) { }
252 30 30 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('Image::Xbm')
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 1 unless $file
378 1 0 if (not ref $file) { }
0 0 elsif (ref $file eq 'SCALAR') { }
379 0 1 unless open $fh, $file
386 0 0 unless seek $file, 0, 0
391 1 3 if /#define.*width\s+(\d+)/o
392 1 2 if /#define.*height\s+(\d+)/o
393 0 2 if /#define.*_x_hot\s+(\d+)/o
394 0 2 if /#define.*_y_hot\s+(\d+)/o
397 0 1 unless defined $width and defined $height
400 0 1 unless close $fh
404 0 1 defined $hotx ? :
405 0 1 defined $hoty ? :
414 17 13 $val[$i] & $bit ? :
416 6 24 if ($x == $width)
419 1 5 if $y == $height
436 0 1 unless $file
447 0 1 unless open $fh, ">$file"
454 0 1 if $hotx > $UNSET and $hoty > $UNSET
464 6 24 unless defined $char[$char]
465 17 13 if $self->xybit($x, $y)
466 0 30 if $mask == $MASK
468 6 0 if $padded
475 5 1 unless $i == $#char
476 0 6 if $i % $ROWS == $ROWSn1
481 0 1 unless close $fh