Branch Coverage

blib/lib/JSON/Pointer.pm
Criterion Covered Total %
branch 87 112 77.6


line true false branch
23 27 120 unless $opts
41 141 56 if ($type eq 'HASH') { }
56 0 elsif ($type eq 'ARRAY') { }
42 24 117 unless (exists $parent->{$token})
50 1 55 if ($token eq '-')
55 14 42 if $opts->{'inclusive'}
57 44 12 if (is_array_numeric_index($token) and $token <= $max_index) { }
76 30 3 unless defined $strict
82 3 30 if (my $e = $@)
86 28 2 $context->result ? :
91 10 2 unless defined $strict
106 1 11 unless (defined $steps)
111 1 10 if (@current_tokens == 0)
117 4 6 if ($use_index)
119 0 4 @relative_tokens > 0 ? :
127 0 6 if (my $e = $@)
131 6 0 $context->result ? :
149 21 13 if ($type eq 'HASH') { }
13 0 elsif ($type eq 'ARRAY') { }
150 2 19 if (not $context->result and @{$context->processed_tokens;} < @{$context->tokens;} - 1)
158 18 1 if (defined $context->last_token) { }
169 3 10 unless ($context->result)
176 10 0 if (defined $context->last_token) { }
178 1 9 $context->last_token eq '-' ? :
190 0 0 unless ($context->result)
210 8 5 if ($type eq 'HASH') { }
4 1 elsif ($type eq 'ARRAY') { }
212 7 1 if (defined $target_member) { }
214 7 0 wantarray ? :
218 1 0 wantarray ? :
223 3 1 if (defined $target_index) { }
225 0 3 if $target_index eq '-'
227 3 0 wantarray ? :
231 1 0 wantarray ? :
235 0 1 unless ($context->result)
242 1 0 wantarray ? :
254 4 8 if ($type eq 'HASH') { }
256 3 1 if (defined $target_member) { }
259 3 0 wantarray ? :
263 1 0 wantarray ? :
268 6 2 if (defined $target_index) { }
270 0 6 if $target_index eq '-'
273 6 0 wantarray ? :
277 2 0 wantarray ? :
303 1 22 unless $context->result
308 4 18 if ($target_type eq 'HASH' or $target_type eq 'ARRAY') { }
17 1 elsif (defined $target) { }
309 3 1 &encode_json($target) eq &encode_json($value) ? :
312 0 17 if (&JSON::is_bool($target)) { }
12 5 elsif (_is_iv_or_nv($target) and _is_iv_or_nv($value)) { }
4 1 elsif (_is_pv($target) and _is_pv($value)) { }
313 0 0 &JSON::is_bool($value) && $target == $value ? :
316 12 0 $target == $value ? :
319 3 1 $target eq $value ? :
327 1 0 !defined($value) ? :
334 6 32 if ($strict) { }