| line |
true |
false |
branch |
|
12
|
0 |
16 |
unless defined $item |
|
13
|
1 |
15 |
unless defined $path and length $path |
|
19
|
6 |
9 |
if ($operator ne "=") |
|
24
|
0 |
6 |
unless defined $current_num and defined $value_num |
|
27
|
2 |
4 |
if ($operator eq '+=') { } |
|
|
1 |
3 |
elsif ($operator eq '-=') { } |
|
|
1 |
2 |
elsif ($operator eq '*=') { } |
|
|
2 |
0 |
elsif ($operator eq '/=') { } |
|
37
|
1 |
1 |
if $value_num == 0 |
|
55
|
0 |
6 |
unless defined $target |
|
56
|
0 |
6 |
unless defined $path and length $path |
|
59
|
0 |
6 |
unless @segments |
|
66
|
12 |
0 |
if ($segment->{'type'} eq "key") |
|
67
|
0 |
12 |
unless ref $cursor eq "HASH" |
|
70
|
6 |
6 |
if $is_last |
|
72
|
0 |
6 |
unless exists $cursor->{$key} |
|
77
|
0 |
0 |
if ($segment->{'type'} eq "index") |
|
78
|
0 |
0 |
unless ref $cursor eq "ARRAY" |
|
82
|
0 |
0 |
if $numeric < 0 or $numeric > $cursor->$#* |
|
84
|
0 |
0 |
if $is_last |
|
97
|
1 |
11 |
unless defined $value |
|
99
|
0 |
11 |
if (JSON::PP::is_bool($value)) |
|
100
|
0 |
0 |
$value ? : |
|
103
|
11 |
0 |
if &looks_like_number($value) |
|
111
|
0 |
15 |
unless defined $value_spec |
|
113
|
1 |
14 |
if ($value_spec->{'type'} and $value_spec->{'type'} eq "path") |
|
121
|
1 |
13 |
if ($value_spec->{'type'} and $value_spec->{'type'} eq "expression") |
|
125
|
1 |
0 |
if ($ok) |
|
126
|
1 |
0 |
@$values ? : |
|
129
|
0 |
0 |
if (defined $self and $self->can("run_query")) |
|
131
|
0 |
0 |
if @outputs |
|
143
|
0 |
14 |
unless defined $target |
|
146
|
0 |
14 |
unless @segments |
|
153
|
26 |
2 |
if ($segment->{'type'} eq "key") |
|
154
|
0 |
26 |
unless ref $cursor eq "HASH" |
|
157
|
14 |
12 |
if ($is_last) |
|
162
|
0 |
12 |
unless (exists $cursor->{$key} and defined $cursor->{$key}) |
|
164
|
0 |
0 |
$next->{'type'} eq 'index' ? : |
|
171
|
2 |
0 |
if ($segment->{'type'} eq "index") |
|
172
|
0 |
2 |
unless ref $cursor eq "ARRAY" |
|
176
|
0 |
2 |
if $numeric < 0 |
|
178
|
0 |
2 |
if ($is_last) |
|
183
|
0 |
2 |
unless (defined $cursor->[$numeric]) |
|
185
|
0 |
0 |
$next->{'type'} eq 'index' ? : |
|
200
|
2 |
0 |
if ($idx =~ /^-?\d+$/) |
|
201
|
0 |
2 |
if $numeric < 0 |
|
215
|
0 |
39 |
if $chunk eq "" |
|
218
|
2 |
38 |
if ($chunk =~ s/^\[(\-?\d+)\]//) |
|
223
|
38 |
0 |
if ($chunk =~ s/^([^\[]+)//) |
|
238
|
2 |
19 |
unless defined $value |
|
239
|
19 |
0 |
unless ref $value |
|
248
|
0 |
0 |
if (ref $data ne "ARRAY") |
|
264
|
5 |
1 |
if (ref $value eq "ARRAY") |
|
265
|
1 |
4 |
unless @$value |
|
268
|
4 |
5 |
if (defined $expr) { } |
|
270
|
0 |
4 |
unless @evaluated |
|
271
|
1 |
3 |
if grep {not _is_truthy($_);} @evaluated |
|
274
|
1 |
4 |
unless _is_truthy($item) |
|
281
|
0 |
1 |
if (defined $expr) |
|
283
|
0 |
0 |
unless @evaluated |
|
284
|
0 |
0 |
@evaluated ? : |
|
287
|
0 |
1 |
_is_truthy($value) ? : |
|
293
|
4 |
2 |
if (ref $value eq "ARRAY") |
|
294
|
0 |
4 |
unless @$value |
|
297
|
4 |
5 |
if (defined $expr) { } |
|
299
|
1 |
3 |
if grep {_is_truthy($_);} @evaluated |
|
302
|
1 |
4 |
if _is_truthy($item) |
|
309
|
0 |
2 |
if (defined $expr) |
|
311
|
0 |
0 |
@evaluated ? : |
|
314
|
1 |
1 |
_is_truthy($value) ? : |
|
320
|
4 |
41 |
unless defined $value |
|
322
|
33 |
8 |
if (JSON::PP::is_bool($value)) |
|
323
|
15 |
18 |
$value ? : |
|
326
|
2 |
6 |
if (ref $value eq "ARRAY") |
|
327
|
1 |
1 |
@$value ? : |
|
330
|
0 |
6 |
if (ref $value eq "HASH") |
|
331
|
0 |
0 |
scalar keys %$value ? : |
|
334
|
6 |
0 |
unless (ref $value) |
|
335
|
0 |
6 |
if $value eq "" |
|
336
|
4 |
2 |
if (&looks_like_number($value)) |
|
337
|
2 |
2 |
$value != 0 ? : |
|
348
|
0 |
36 |
unless (defined $value) |
|
352
|
6 |
30 |
if (ref $value eq "ARRAY") |
|
356
|
28 |
2 |
unless (ref $value) |
|
357
|
11 |
17 |
if $mode eq "upper" |
|
358
|
11 |
6 |
if $mode eq "lower" |
|
368
|
0 |
12 |
unless (defined $value) |
|
372
|
2 |
10 |
if (ref $value eq "ARRAY") |
|
376
|
10 |
0 |
unless (ref $value) |
|
378
|
5 |
5 |
if ($mode eq 'upper') { } |
|
|
5 |
0 |
elsif ($mode eq 'lower') { } |
|
401
|
1 |
18 |
unless (defined $value) |
|
405
|
13 |
5 |
unless (ref $value) |
|
412
|
4 |
1 |
if (ref $value eq "ARRAY") |
|
422
|
2 |
32 |
unless (defined $value) |
|
426
|
4 |
28 |
if (ref $value eq "ARRAY") |
|
430
|
5 |
23 |
if (ref $value) |
|
434
|
4 |
19 |
unless _is_string_scalar($value) |
|
436
|
0 |
19 |
unless defined $needle |
|
441
|
2 |
17 |
if $len == 0 |
|
443
|
9 |
8 |
if ($mode eq "left") |
|
444
|
4 |
5 |
if index($target, $pattern) != 0 |
|
448
|
8 |
0 |
if ($mode eq "right") |
|
449
|
2 |
6 |
if $len > length $target |
|
450
|
2 |
4 |
unless substr($target, -$len) eq $pattern |
|
460
|
2 |
3 |
if (not ref $value or JSON::PP::is_bool($value)) |
|
472
|
2 |
1 |
if _is_scalar_value($value) |
|
482
|
2 |
4 |
if (_is_leaf_value($value)) |
|
496
|
0 |
43 |
if ref $path ne "ARRAY" |
|
501
|
2 |
62 |
unless defined $segment |
|
502
|
2 |
60 |
if ref $segment and not $is_boolean |
|
511
|
0 |
14 |
unless defined $value |
|
515
|
0 |
14 |
if $expr eq "" |
|
520
|
13 |
1 |
if (not $@ and defined $decoded) |
|
521
|
12 |
1 |
if (ref $decoded eq 'ARRAY') { } |
|
522
|
1 |
11 |
if (@$decoded and ref $decoded->[0] eq 'ARRAY') { } |
|
536
|
1 |
12 |
unless (@paths) |
|
539
|
0 |
7 |
unless defined $output |
|
541
|
7 |
0 |
if (ref $output eq 'ARRAY') { } |
|
542
|
0 |
7 |
if (@$output and ref $output->[0] eq 'ARRAY') { } |
|
557
|
0 |
13 |
unless @paths |
|
560
|
11 |
2 |
@values == 1 ? : |
|
566
|
0 |
10 |
unless defined $value |
|
570
|
0 |
10 |
if $paths_expr eq "" |
|
573
|
0 |
7 |
unless @paths |
|
588
|
0 |
10 |
unless defined $expr |
|
592
|
0 |
10 |
if $clean eq "" |
|
597
|
9 |
1 |
if (not $@ and defined $decoded) |
|
598
|
8 |
1 |
if (ref $decoded eq 'ARRAY') { } |
|
599
|
0 |
8 |
if (@$decoded and ref $decoded->[0] eq 'ARRAY') { } |
|
611
|
1 |
6 |
unless (@paths) |
|
614
|
0 |
5 |
unless defined $output |
|
616
|
5 |
0 |
if (ref $output eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (not ref $output or JSON::PP::is_bool($output)) { } |
|
617
|
0 |
5 |
if (@$output and ref $output->[0] eq 'ARRAY') { } |
|
|
5 |
0 |
elsif (not @$output && ref $output->[0]) { } |
|
636
|
0 |
7 |
unless defined $expr |
|
640
|
0 |
7 |
if $clean eq "" |
|
643
|
6 |
1 |
unless ($@) |
|
647
|
0 |
1 |
if ($clean =~ /^'(.*)'$/) |
|
653
|
1 |
0 |
if ($clean =~ /^\.(.+)$/) |
|
656
|
1 |
0 |
@values ? : |
|
660
|
0 |
0 |
@outputs ? : |
|
666
|
0 |
26 |
unless @$path |
|
670
|
23 |
3 |
if (ref $current eq "HASH") |
|
672
|
0 |
23 |
unless defined $key |
|
675
|
12 |
11 |
if (@rest) { } |
|
676
|
12 |
0 |
exists $copy{$key} ? : |
|
686
|
1 |
2 |
if (ref $current eq "ARRAY") |
|
688
|
0 |
1 |
unless defined $index |
|
693
|
1 |
0 |
if (@rest) { } |
|
694
|
0 |
1 |
defined $copy[$index] ? : |
|
711
|
0 |
45 |
unless defined $segment |
|
713
|
4 |
41 |
if (JSON::PP::is_bool($segment)) |
|
714
|
2 |
2 |
$segment ? : |
|
717
|
0 |
41 |
if ref $segment |
|
725
|
0 |
3 |
if _is_numeric_segment($segment) |
|
732
|
0 |
7 |
unless defined $segment |
|
734
|
4 |
3 |
if (JSON::PP::is_bool($segment)) |
|
738
|
0 |
3 |
if ref $segment |
|
740
|
0 |
3 |
$segment =~ /^-?\d+$/ ? : |
|
746
|
0 |
1 |
unless defined $segment |
|
748
|
0 |
1 |
if (JSON::PP::is_bool($segment)) |
|
749
|
0 |
0 |
$segment ? : |
|
752
|
0 |
1 |
if ref $segment |
|
753
|
0 |
1 |
unless $segment =~ /^-?\d+$/ |
|
756
|
0 |
1 |
if $index < 0 |
|
758
|
0 |
1 |
if $index < 0 |
|
766
|
0 |
6 |
unless defined $segment |
|
768
|
2 |
4 |
if (JSON::PP::is_bool($segment)) |
|
769
|
1 |
1 |
$segment ? : |
|
772
|
0 |
6 |
if ref $segment |
|
773
|
0 |
6 |
unless $segment =~ /^-?\d+$/ |
|
776
|
1 |
5 |
if $index < 0 |
|
778
|
0 |
6 |
if $index < 0 |
|
786
|
0 |
1 |
unless ref $array_ref eq "ARRAY" |
|
796
|
6 |
2 |
if (ref $value eq "HASH") |
|
802
|
5 |
6 |
if (ref $child eq "HASH" or ref $child eq "ARRAY") |
|
809
|
2 |
0 |
if (ref $value eq "ARRAY") |
|
815
|
0 |
4 |
if (ref $child eq "HASH" or ref $child eq "ARRAY") |
|
828
|
2 |
1 |
if (ref $value eq "HASH") |
|
833
|
2 |
1 |
if (_is_scalar_value($child)) { } |
|
|
1 |
0 |
elsif (ref $child eq 'HASH' or ref $child eq 'ARRAY') { } |
|
843
|
1 |
0 |
if (ref $value eq "ARRAY") |
|
848
|
1 |
1 |
if (_is_scalar_value($child)) { } |
|
|
1 |
0 |
elsif (ref $child eq 'HASH' or ref $child eq 'ARRAY') { } |
|
862
|
0 |
20 |
unless defined $value |
|
863
|
0 |
20 |
unless defined $path |
|
864
|
0 |
20 |
if ref $path ne "ARRAY" |
|
868
|
0 |
25 |
unless defined $cursor |
|
870
|
18 |
7 |
if (ref $cursor eq "HASH") |
|
872
|
0 |
18 |
unless defined $key |
|
873
|
1 |
17 |
unless exists $cursor->{$key} |
|
878
|
6 |
1 |
if (ref $cursor eq "ARRAY") |
|
880
|
0 |
6 |
unless defined $index |
|
882
|
0 |
6 |
if $index > $cursor->$#* |
|
897
|
5 |
4 |
if (ref $value eq "HASH") |
|
902
|
3 |
4 |
if (_is_leaf_value($child)) { } |
|
912
|
4 |
0 |
if (ref $value eq "ARRAY") |
|
917
|
5 |
1 |
if (_is_leaf_value($child)) { } |
|
933
|
10 |
17 |
unless ref $value |
|
934
|
5 |
12 |
if JSON::PP::is_bool($value) |
|
935
|
5 |
7 |
if ref $value eq "ARRAY" |
|
936
|
7 |
0 |
if ref $value eq "HASH" |