| blib/lib/Plack/Middleware/Negotiate.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 32 | 50 | 64.0 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 20 | 1 | 1 | 7 | $self->formats and %{$self->formats;} |
| 47 | 1 | 0 | 16 | $format and $format ne '_' |
| 1 | 0 | 16 | $format and $format ne '_' and $self->formats->{$format} | |
| 73 | 16 | 0 | 0 | $$format{'language'} and not $$fields{'Content-Language'} |
| 99 | 8 | 0 | 2 | $self->extension and $req->path =~ /\.([^.]+)$/ |
| 8 | 0 | 2 | $self->extension and $req->path =~ /\.([^.]+)$/ and $self->formats->{$1} | |
| 117 | 1 | 0 | 30 | defined $name and $name ne '_' |
| 133 | 7 | 2 | 13 | defined $name && $name ne '_' && exists $self->formats->{$name} |
| line | l | !l | condition |
|---|---|---|---|
| 22 | 3 | 4 | $self->formats->{'_'} //= {} |
| 63 | 16 | 1 | $self->about($name) || (return) |
| 120 | 30 | 0 | $self->formats->{$name} || (return) |
| 123 | 0 | 30 | ($$format{'quality'} // $$default{'quality'}) // 1 |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 50 | 7 | 10 | 0 | $app //= $self->app |
| 123 | 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 | 0 | 30 | $$format{'language'} // $$default{'language'} |