Branch Coverage

blib/lib/Plack/Middleware/JSON.pm
Criterion Covered Total %
branch 10 14 71.4


line true false branch
13 3 1 unless (defined $self->callback_key)
16 2 2 if (defined $self->json_key) { }
30 4 0 if (defined $$res[2])
34 4 0 if ($json_key and $$env{'QUERY_STRING'} =~ /(?:^|&)($json_key)=([^&]+)/ or $content_type =~ m[/(?:json|javascript)])
36 4 0 if (ref $$res[2][0] eq 'ARRAY' or ref $$res[2][0] eq 'HASH')
40 1 3 if (defined $self->callback_key and $1 and $1 eq $self->callback_key)
42 1 0 if ($cb =~ /^[\w\.\[\]]+$/)