Branch Coverage

blib/lib/Catalyst/View/JSON.pm
Criterion Covered Total %
branch 36 40 90.0


line true false branch
25 2 4 if $field =~ /^catalyst/
28 0 4 if $field eq 'json_driver'
30 4 0 if ($self->can($field)) { }
37 1 1 if (my $method = $self->can('encode_json')) { }
44 1 0 unless $self->json_encoder_args
59 11 1 if (my $expose = $self->expose_stash)
60 9 2 if (ref $expose eq 'Regexp') { }
0 2 elsif (ref $expose eq 'ARRAY') { }
1 1 elsif (not ref $expose) { }
74 1 11 if ($single_key) { }
77 16 3 &$cond($_) ? :
81 11 1 $self->allow_callback ? :
83 11 1 $cb_param ? :
84 2 10 if $cb
91 1 10 if ($c->req->header('X-Prototype-Version') and not $self->no_x_json_header)
99 9 2 if ($self->use_force_bom and $encoding eq 'utf-8')
101 2 7 if ($self->user_agent_bom_test($user_agent))
106 1 10 if $cb
108 1 10 if $cb
132 1 1 unless $param =~ /^[a-zA-Z0-9\.\_\[\]]+$/