Branch Coverage

blib/lib/JSON/Pointer.pm
Criterion Covered Total %
branch 73 100 73.0


line true false branch
20 0 140 unless defined $strict
37 129 52 if ($type eq 'HASH') { }
52 0 elsif ($type eq 'ARRAY') { }
38 24 105 unless (exists $$parent{$token})
48 40 12 if (is_array_numeric_index($token) and $token <= $elements_length) { }
1 11 elsif ($token eq '-') { }
71 30 3 unless defined $strict
77 3 30 if (my $e = $@)
81 28 2 $context->result ? :
99 21 13 if ($type eq 'HASH') { }
13 0 elsif ($type eq 'ARRAY') { }
100 2 19 if (not $context->result and @{$context->processed_tokens;} < @{$context->tokens;} - 1)
108 18 1 if (defined $context->last_token) { }
119 3 10 unless ($context->result)
126 10 0 if (defined $context->last_token) { }
128 1 9 $context->last_token eq '-' ? :
140 0 0 unless ($context->result)
160 8 5 if ($type eq 'HASH') { }
4 1 elsif ($type eq 'ARRAY') { }
162 7 1 if (defined $target_member) { }
164 7 0 wantarray ? :
168 1 0 wantarray ? :
173 3 1 if (defined $target_index) { }
175 0 3 if $target_index eq '-'
177 3 0 wantarray ? :
181 1 0 wantarray ? :
185 0 1 unless ($context->result)
192 1 0 wantarray ? :
204 4 8 if ($type eq 'HASH') { }
206 3 1 if (defined $target_member) { }
209 3 0 wantarray ? :
213 1 0 wantarray ? :
218 6 2 if (defined $target_index) { }
220 0 6 if $target_index eq '-'
223 6 0 wantarray ? :
227 2 0 wantarray ? :
253 1 22 unless $context->result
258 4 18 if ($target_type eq 'HASH' or $target_type eq 'ARRAY') { }
17 1 elsif (defined $target) { }
259 3 1 encode_json $target eq encode_json $value ? :
262 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)) { }
263 0 0 &JSON::is_bool($value) && $target == $value ? :
266 12 0 $target == $value ? :
269 3 1 $target eq $value ? :
277 1 0 !defined($value) ? :
284 3 32 if ($strict) { }
299 0 0 if return $flags & 12288
305 0 0 if return !($flags & 12288)