Condition Coverage

blib/lib/Plack/Middleware/Negotiate.pm
Criterion Covered Total %
condition 32 47 68.0


and 3 conditions

line !l l&&!r l&&r condition
21 1 1 7 $self->formats and %{$self->formats;}
48 1 0 16 $format and $format ne '_'
1 0 16 $format and $format ne '_' and $self->known($format)
104 8 0 2 $self->extension and $req->path =~ /\.([^.]+)$/
8 0 2 $self->extension and $req->path =~ /\.([^.]+)$/ and $self->known($1)
122 1 0 30 defined $name and $name ne '_'
138 7 2 31 defined $name && $name ne '_' && exists $self->formats->{$name}

or 2 conditions

line l !l condition
23 3 4 $self->formats->{'_'} //= {}
64 16 1 $self->about($name) || (return)
125 30 0 $self->formats->{$name} || (return)
128 0 30 ($$format{'quality'} // $$default{'quality'}) // 1

or 3 conditions

line l !l&&r !l&&!r condition
51 7 10 0 $app //= $self->app
128 0 0 30 $$format{'quality'} // $$default{'quality'}
21 9 0 $$format{'type'} // $$default{'type'}
0 0 30 $$format{'encoding'} // $$default{'encoding'}
9 0 21 $$format{'charset'} // $$default{'charset'}
0 9 21 $$format{'language'} // $$default{'language'}