| 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 ($idx =~ /^-?\d+$/) |
|
83
|
0 |
0 |
if $numeric < 0 |
|
86
|
0 |
0 |
if $numeric < 0 or $numeric > $cursor->$#* |
|
88
|
0 |
0 |
if $is_last |
|
101
|
1 |
11 |
unless defined $value |
|
103
|
0 |
11 |
if (JSON::PP::is_bool($value)) |
|
104
|
0 |
0 |
$value ? : |
|
107
|
11 |
0 |
if &looks_like_number($value) |
|
115
|
0 |
15 |
unless defined $value_spec |
|
117
|
1 |
14 |
if ($value_spec->{'type'} and $value_spec->{'type'} eq "path") |
|
125
|
1 |
13 |
if ($value_spec->{'type'} and $value_spec->{'type'} eq "expression") |
|
129
|
1 |
0 |
if ($ok) |
|
130
|
1 |
0 |
@$values ? : |
|
133
|
0 |
0 |
if (defined $self and $self->can("run_query")) |
|
135
|
0 |
0 |
if @outputs |
|
147
|
0 |
14 |
unless defined $target |
|
150
|
0 |
14 |
unless @segments |
|
157
|
26 |
2 |
if ($segment->{'type'} eq "key") |
|
158
|
0 |
26 |
unless ref $cursor eq "HASH" |
|
161
|
14 |
12 |
if ($is_last) |
|
166
|
0 |
12 |
unless (exists $cursor->{$key} and defined $cursor->{$key}) |
|
168
|
0 |
0 |
$next->{'type'} eq 'index' ? : |
|
175
|
2 |
0 |
if ($segment->{'type'} eq "index") |
|
176
|
0 |
2 |
unless ref $cursor eq "ARRAY" |
|
180
|
2 |
0 |
if ($idx =~ /^-?\d+$/) |
|
181
|
0 |
2 |
if $numeric < 0 |
|
184
|
0 |
2 |
if $numeric < 0 |
|
186
|
0 |
2 |
if ($is_last) |
|
191
|
0 |
2 |
unless (defined $cursor->[$numeric]) |
|
193
|
0 |
0 |
$next->{'type'} eq 'index' ? : |
|
212
|
0 |
39 |
if $chunk eq "" |
|
215
|
2 |
38 |
if ($chunk =~ s/^\[(\-?\d+)\]//) |
|
220
|
38 |
0 |
if ($chunk =~ s/^([^\[]+)//) |
|
235
|
2 |
19 |
unless defined $value |
|
236
|
19 |
0 |
unless ref $value |
|
245
|
0 |
0 |
if (ref $data ne "ARRAY") |
|
261
|
5 |
1 |
if (ref $value eq "ARRAY") |
|
262
|
1 |
4 |
unless @$value |
|
265
|
4 |
5 |
if (defined $expr) { } |
|
267
|
0 |
4 |
unless @evaluated |
|
268
|
1 |
3 |
if grep {not _is_truthy($_);} @evaluated |
|
271
|
1 |
4 |
unless _is_truthy($item) |
|
278
|
0 |
1 |
if (defined $expr) |
|
280
|
0 |
0 |
unless @evaluated |
|
281
|
0 |
0 |
@evaluated ? : |
|
284
|
0 |
1 |
_is_truthy($value) ? : |
|
290
|
4 |
2 |
if (ref $value eq "ARRAY") |
|
291
|
0 |
4 |
unless @$value |
|
294
|
4 |
5 |
if (defined $expr) { } |
|
296
|
1 |
3 |
if grep {_is_truthy($_);} @evaluated |
|
299
|
1 |
4 |
if _is_truthy($item) |
|
306
|
0 |
2 |
if (defined $expr) |
|
308
|
0 |
0 |
@evaluated ? : |
|
311
|
1 |
1 |
_is_truthy($value) ? : |
|
317
|
4 |
41 |
unless defined $value |
|
319
|
33 |
8 |
if (JSON::PP::is_bool($value)) |
|
320
|
15 |
18 |
$value ? : |
|
323
|
2 |
6 |
if (ref $value eq "ARRAY") |
|
324
|
1 |
1 |
@$value ? : |
|
327
|
0 |
6 |
if (ref $value eq "HASH") |
|
328
|
0 |
0 |
scalar keys %$value ? : |
|
331
|
6 |
0 |
unless (ref $value) |
|
332
|
0 |
6 |
if $value eq "" |
|
333
|
4 |
2 |
if (&looks_like_number($value)) |
|
334
|
2 |
2 |
$value != 0 ? : |
|
345
|
0 |
36 |
unless (defined $value) |
|
349
|
6 |
30 |
if (ref $value eq "ARRAY") |
|
353
|
28 |
2 |
unless (ref $value) |
|
354
|
11 |
17 |
if $mode eq "upper" |
|
355
|
11 |
6 |
if $mode eq "lower" |
|
365
|
0 |
12 |
unless (defined $value) |
|
369
|
2 |
10 |
if (ref $value eq "ARRAY") |
|
373
|
10 |
0 |
unless (ref $value) |
|
375
|
5 |
5 |
if ($mode eq 'upper') { } |
|
|
5 |
0 |
elsif ($mode eq 'lower') { } |
|
398
|
1 |
18 |
unless (defined $value) |
|
402
|
13 |
5 |
unless (ref $value) |
|
409
|
4 |
1 |
if (ref $value eq "ARRAY") |
|
419
|
2 |
32 |
unless (defined $value) |
|
423
|
4 |
28 |
if (ref $value eq "ARRAY") |
|
427
|
5 |
23 |
if (ref $value) |
|
431
|
4 |
19 |
unless _is_string_scalar($value) |
|
433
|
0 |
19 |
unless defined $needle |
|
438
|
2 |
17 |
if $len == 0 |
|
440
|
9 |
8 |
if ($mode eq "left") |
|
441
|
4 |
5 |
if index($target, $pattern) != 0 |
|
445
|
8 |
0 |
if ($mode eq "right") |
|
446
|
2 |
6 |
if $len > length $target |
|
447
|
2 |
4 |
unless substr($target, -$len) eq $pattern |
|
457
|
2 |
3 |
if (not ref $value or JSON::PP::is_bool($value)) |
|
469
|
2 |
1 |
if _is_scalar_value($value) |
|
479
|
2 |
4 |
if (_is_leaf_value($value)) |
|
493
|
0 |
43 |
if ref $path ne "ARRAY" |
|
498
|
2 |
62 |
unless defined $segment |
|
499
|
2 |
60 |
if ref $segment and not $is_boolean |
|
508
|
0 |
14 |
unless defined $value |
|
512
|
0 |
14 |
if $expr eq "" |
|
517
|
13 |
1 |
if (not $@ and defined $decoded) |
|
518
|
12 |
1 |
if (ref $decoded eq 'ARRAY') { } |
|
519
|
1 |
11 |
if (@$decoded and ref $decoded->[0] eq 'ARRAY') { } |
|
533
|
1 |
12 |
unless (@paths) |
|
536
|
0 |
7 |
unless defined $output |
|
538
|
7 |
0 |
if (ref $output eq 'ARRAY') { } |
|
539
|
0 |
7 |
if (@$output and ref $output->[0] eq 'ARRAY') { } |
|
554
|
0 |
13 |
unless @paths |
|
557
|
11 |
2 |
@values == 1 ? : |
|
563
|
0 |
10 |
unless defined $value |
|
567
|
0 |
10 |
if $paths_expr eq "" |
|
570
|
0 |
7 |
unless @paths |
|
585
|
0 |
10 |
unless defined $expr |
|
589
|
0 |
10 |
if $clean eq "" |
|
594
|
9 |
1 |
if (not $@ and defined $decoded) |
|
595
|
8 |
1 |
if (ref $decoded eq 'ARRAY') { } |
|
596
|
0 |
8 |
if (@$decoded and ref $decoded->[0] eq 'ARRAY') { } |
|
608
|
1 |
6 |
unless (@paths) |
|
611
|
0 |
5 |
unless defined $output |
|
613
|
5 |
0 |
if (ref $output eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (not ref $output or JSON::PP::is_bool($output)) { } |
|
614
|
0 |
5 |
if (@$output and ref $output->[0] eq 'ARRAY') { } |
|
|
5 |
0 |
elsif (not @$output && ref $output->[0]) { } |
|
633
|
0 |
7 |
unless defined $expr |
|
637
|
0 |
7 |
if $clean eq "" |
|
640
|
6 |
1 |
unless ($@) |
|
644
|
0 |
1 |
if ($clean =~ /^'(.*)'$/) |
|
650
|
1 |
0 |
if ($clean =~ /^\.(.+)$/) |
|
653
|
1 |
0 |
@values ? : |
|
657
|
0 |
0 |
@outputs ? : |
|
663
|
0 |
26 |
unless @$path |
|
667
|
23 |
3 |
if (ref $current eq "HASH") |
|
669
|
0 |
23 |
unless defined $key |
|
672
|
12 |
11 |
if (@rest) { } |
|
673
|
12 |
0 |
exists $copy{$key} ? : |
|
683
|
1 |
2 |
if (ref $current eq "ARRAY") |
|
685
|
0 |
1 |
unless defined $index |
|
690
|
1 |
0 |
if (@rest) { } |
|
691
|
0 |
1 |
defined $copy[$index] ? : |
|
708
|
0 |
45 |
unless defined $segment |
|
710
|
4 |
41 |
if (JSON::PP::is_bool($segment)) |
|
711
|
2 |
2 |
$segment ? : |
|
714
|
0 |
41 |
if ref $segment |
|
722
|
0 |
3 |
if _is_numeric_segment($segment) |
|
729
|
0 |
7 |
unless defined $segment |
|
731
|
4 |
3 |
if (JSON::PP::is_bool($segment)) |
|
735
|
0 |
3 |
if ref $segment |
|
737
|
0 |
3 |
$segment =~ /^-?\d+$/ ? : |
|
743
|
0 |
1 |
unless defined $segment |
|
745
|
0 |
1 |
if (JSON::PP::is_bool($segment)) |
|
746
|
0 |
0 |
$segment ? : |
|
749
|
0 |
1 |
if ref $segment |
|
750
|
0 |
1 |
unless $segment =~ /^-?\d+$/ |
|
753
|
0 |
1 |
if $index < 0 |
|
755
|
0 |
1 |
if $index < 0 |
|
763
|
0 |
6 |
unless defined $segment |
|
765
|
2 |
4 |
if (JSON::PP::is_bool($segment)) |
|
766
|
1 |
1 |
$segment ? : |
|
769
|
0 |
6 |
if ref $segment |
|
770
|
0 |
6 |
unless $segment =~ /^-?\d+$/ |
|
773
|
1 |
5 |
if $index < 0 |
|
775
|
0 |
6 |
if $index < 0 |
|
783
|
0 |
1 |
unless ref $array_ref eq "ARRAY" |
|
793
|
6 |
2 |
if (ref $value eq "HASH") |
|
799
|
5 |
6 |
if (ref $child eq "HASH" or ref $child eq "ARRAY") |
|
806
|
2 |
0 |
if (ref $value eq "ARRAY") |
|
812
|
0 |
4 |
if (ref $child eq "HASH" or ref $child eq "ARRAY") |
|
825
|
2 |
1 |
if (ref $value eq "HASH") |
|
830
|
2 |
1 |
if (_is_scalar_value($child)) { } |
|
|
1 |
0 |
elsif (ref $child eq 'HASH' or ref $child eq 'ARRAY') { } |
|
840
|
1 |
0 |
if (ref $value eq "ARRAY") |
|
845
|
1 |
1 |
if (_is_scalar_value($child)) { } |
|
|
1 |
0 |
elsif (ref $child eq 'HASH' or ref $child eq 'ARRAY') { } |
|
859
|
0 |
20 |
unless defined $value |
|
860
|
0 |
20 |
unless defined $path |
|
861
|
0 |
20 |
if ref $path ne "ARRAY" |
|
865
|
0 |
25 |
unless defined $cursor |
|
867
|
18 |
7 |
if (ref $cursor eq "HASH") |
|
869
|
0 |
18 |
unless defined $key |
|
870
|
1 |
17 |
unless exists $cursor->{$key} |
|
875
|
6 |
1 |
if (ref $cursor eq "ARRAY") |
|
877
|
0 |
6 |
unless defined $index |
|
879
|
0 |
6 |
if $index > $cursor->$#* |
|
894
|
5 |
4 |
if (ref $value eq "HASH") |
|
899
|
3 |
4 |
if (_is_leaf_value($child)) { } |
|
909
|
4 |
0 |
if (ref $value eq "ARRAY") |
|
914
|
5 |
1 |
if (_is_leaf_value($child)) { } |
|
930
|
10 |
17 |
unless ref $value |
|
931
|
5 |
12 |
if JSON::PP::is_bool($value) |
|
932
|
5 |
7 |
if ref $value eq "ARRAY" |
|
933
|
7 |
0 |
if ref $value eq "HASH" |