Branch Coverage

blib/lib/Raisin/Middleware/Formatter.pm
Criterion Covered Total %
branch 34 36 94.4


line true false branch
32 20 30 if ($req->content)
37 1 19 unless ($format)
48 3 46 unless ($format)
69 46 0 if (ref $r->body and not _is_a_handle($r->body))
72 46 0 unless $r->content_type
113 12 50 if ($ext_format) { }
24 26 elsif (_accept_header_set($req->header('Accept'))) { }
127 201 3 if $format
135 1 67 unless $path
138 49 18 unless $ext
145 3 15 unless $format
152 1 33 unless $accept
164 11 38 unless my $format = $media_types_map_flat_hash{$media}
166 8 30 ($params // '') =~ /q=([\d\.]+)/ ? :
177 6 56 if $self->format
180 33 23 if ($self->raisin)
182 4 29 if $route->{'produces'}
187 43 9 if $self->default_format