Branch Coverage

blib/lib/Plack/Middleware/Negotiate.pm
Criterion Covered Total %
branch 28 34 82.3


line true false branch
20 2 7 unless $self->formats and %{$self->formats;}
24 6 1 unless ($self->formats->{'_'}{'type'})
26 1 9 unless $self->formats->{$_}{'type'}
31 1 5 if (not $self->app)
47 16 0 if ($format and $format ne '_' and $self->formats->{$format})
66 16 0 unless ($$fields{'Content-Type'})
68 3 13 if $$format{'charset'}
73 0 16 if $$format{'language'} and not $$fields{'Content-Language'}
81 11 6 if (defined $self->parameter)
84 8 3 $$env{'QUERY_STRING'} =~ /(^|&)$param=([^&]+)/ ? :
86 5 6 unless ($self->known($format))
90 7 4 if ($self->known($format))
92 5 2 unless ($$env{'QUERY_STRING'} =~ s/&$param=([^&]+)//)
99 2 0 if ($self->extension and $req->path =~ /\.([^.]+)$/ and $self->formats->{$1})
101 2 0 if $self->extension eq 'strip'
107 8 0 if (not $self->explicit)
117 1 30 unless defined $name and $name ne '_'