Branch Coverage

blib/lib/Plack/Middleware/FormatOutput.pm
Criterion Covered Total %
branch 14 30 46.6


line true false branch
21 0 2 eval "use $mod; 1" ? :
50 0 1 if ref $self->{'mime_type'}{$par} ne 'CODE'
55 8 0 unless exists $self->{'mime_type'}{$par}
59 0 2 if (_try_load('Rest::HtmlVis'))
60 0 0 if exists $self->{'htmlvis'}
81 0 7 unless $accept
86 6 1 if (not Plack::Util::status_with_no_entity_body($res->[0]) and defined $res->[2]) { }
1 0 elsif (not defined $res->[2]) { }
89 0 6 if ($res->[1] and @{$res->[1];}) { }
111 0 7 if ($query_string =~ m[format=([\w/\+]*)])
112 0 0 if (exists $self->mime_type->{$1})
118 7 0 if (not $accept and $env->{'HTTP_ACCEPT'})
120 0 7 if ($_ eq '*/*')
121 0 0 exists $self->mime_type->{'text/html'} ? :
124 1 6 unless exists $self->mime_type->{$_}