Branch Coverage

blib/lib/Catalyst/View/JSON.pm
Criterion Covered Total %
branch 32 42 76.2


line true false branch
18 0 3 if $field eq 'json_driver'
19 3 0 if ($self->can($field)) { }
27 0 1 if ($driver eq 'JSON::Syck') { }
1 0 elsif ($driver eq 'JSON') { }
35 8 1 ref $data ? :
52 10 0 if (my $expose = $self->expose_stash)
53 9 1 if (ref $expose eq 'Regexp') { }
0 1 elsif (ref $expose eq 'ARRAY') { }
1 0 elsif (not ref $expose) { }
66 1 9 if ($single_key) { }
69 12 3 &$cond($_) ? :
73 10 0 $self->allow_callback ? :
75 10 0 $cb_param ? :
76 2 8 if $cb
86 6 3 if (&Encode::is_utf8($json))
90 0 9 if (($c->req->user_agent || '') =~ /Opera/) { }
96 1 8 if ($c->req->header('X-Prototype-Version') and not $self->no_x_json_header)
103 2 7 if (($c->req->user_agent || '') =~ /Safari/ and $encoding eq 'utf-8')
107 1 8 if $cb
109 1 8 if $cb
116 1 1 unless $param =~ /^[a-zA-Z0-9\._\[\]]+$/