Branch Coverage

blib/lib/Image/VisualConfirmation.pm
Criterion Covered Total %
branch 12 38 31.5


line true false branch
46 1 1 if $options and ref $options ne 'HASH'
51 0 1 if ($^O =~ /Win/msx)
57 0 1 if (exists $$options{'font_file'}) { }
1 0 elsif (not $^O =~ /Win/msx) { }
74 0 1 unless -e $font_file
84 0 1 if (defined $$options{'code'}) { }
85 0 0 ref $$options{'code'} eq 'CODE' ? :
95 0 1 if (exists $$options{'width'} and exists $$options{'height'}) { }
107 0 1 unless $$self{'image'} = 'Imager'->new('xsize', $width, 'ysize', $height)
121 0 0 unless $$self{'image'} = $$self{'image'}->rotate('degrees', $degrees, 'back', $$self{'bgcolor'})
125 0 0 unless $$self{'image'}->filter('type', 'gaussian', 'stddev', 1)
127 0 0 unless $$self{'image'}->filter('type', 'noise', 'amount', 50, 'subtype', 0)
150 0 0 if $options and ref $options ne 'HASH'
159 0 0 unless $image->write('data', \$image_data, %$options)
201 1 0 if (exists $$self{'font_file'}) { }
205 1 0 if (defined $$self{'font_type'})
209 1 0 unless $font = 'Imager::Font'->new(%imager_params)
214 0 0 unless $font = 'Imager::Font'->new('face', $$self{'font_face'})
237 0 0 unless $image->align_string('font', $font, 'text', $code_chars[$i], 'x', $pos_x, 'y', 10, 'valign', 'top', 'size', $font_size, 'color', $color, 'aa', 1)