Branch Coverage

blib/lib/Image/Base/Text.pm
Criterion Covered Total %
branch 60 70 85.7


line true false branch
48 0 53 if (ref $class)
61 2 51 if (defined(my $filename = delete $param{'-file'}))
72 936 1060 if ($key eq '-height')
82 56 25 if (defined(my $width = delete $param{'-width'}))
84 20 40 if (length $row < $width) { }
94 41 40 if (defined(my $height = delete $param{'-height'}))
96 4 37 if (@$rows_array >= $height) { }
112 0 3 if (@_ == 1) { }
119 0 3 unless open my $fh, '<', $filename
121 0 3 unless close $fh
135 9 3 if (@lines and $lines[-1] eq '')
149 16 13 if ($width < length $row)
161 1 1 if (@_ == 2) { }
169 0 2 unless open $fh, '>', $filename and $self->save_fh($fh) and close $fh
180 2 0 @$rows_array ? :
185 17 0 @$rows_array ? :
197 8 5295 if $x < 0 or $x >= $$self{'-width'} or $y < 0 or $y >= @{$$self{'-rows_array'};}
200 5023 272 if (@_ == 3) { }
210 48 31 if ($y1 == $y2) { }
214 4 44 if $y1 < 0 or $y1 > $#$rows_array
216 9 35 if ($x1 > $x2)
218 2 42 if $x2 < 0 or $x1 > $xmax
240 0 363 unless ($x2 >= 0 and $y2 >= 0 and $x1 < $$self{'-width'} and $y1 <= $#$rows_array)
255 266 97 if ($fill) { }
262 91 6 if ($y1 >= 0)
267 53 44 if ($y2 >= $y1)
268 49 4 if ($y2 <= $#$rows_array)
275 32 21 if ($y2 >= $y1)
279 27 5 if ($x1 == $x1_clip)
284 28 4 if ($x2 == $x2_clip)
297 182 499 if (defined(my $char = $$self{'-colour_to_character'}{$colour}))
300 69 430 if (length $colour == 1)
303 430 0 if (defined(my $char = $$self{'-colour_to_character'}{'other'}))
310 0 5023 if (length $char == 0)
313 4988 35 if (defined(my $colour = $$self{'-character_to_colour'}{$char}))