Branch Coverage

blib/lib/Plack/App/DummyBox.pm
Criterion Covered Total %
branch 22 38 57.8


line true false branch
30 3 1 unless $self->max_width
31 3 1 unless $self->max_height
36 0 4 if ($self->font)
37 0 0 unless my $font = 'Imager::Font'->new('file', $self->font->{'file'}, 'type', $self->font->{'type'}, 'size', $self->font->{'size'} || 15, 'color', $self->font->{'color'} || 'darkgray')
55 0 7 if $w > $self->max_width
57 0 7 if $h > $self->max_height
59 0 7 unless $ext =~ /^(?:gif|png)$/
61 5 2 $ext eq 'gif' ? :
63 2 5 if ($w == 1 and $h == 1) { }
83 0 5 if $line > $w and $line > $h
85 2 3 if ($self->cache)
90 1 1 if (my $cache = $self->cache->get($self->cache_key))
107 0 4 if ($self->font)
108 0 0 unless $img->string('font', $self->font, 'x', 5, 'y', $self->font->{'size'} + 5, 'string', "$w x $h", 'aa', 1)
116 0 0 if ($self->text)
117 0 0 unless $img->string('font', $self->font, 'x', 5, 'y', $self->font->{'size'} * 2 + 5 + 5, 'string', $self->text, 'aa', 1)
127 1 3 if (ref $self->filter eq 'CODE')
146 1 3 if ($self->cache)
158 0 0 if ($self->stderr)