line |
true |
false |
branch |
238
|
2 |
106 |
unless $doc and ref $doc and ref $doc eq 'HASH' |
240
|
2 |
103 |
if $query and !ref($query) || ref $query ne 'HASH' |
242
|
0 |
19 |
if $defs and !ref($defs) || ref $defs ne 'ARRAY' || scalar @$defs % 2 != 0 |
247
|
19 |
85 |
if ($defs) |
257
|
13 |
107 |
if ($key eq '$or' and ref $value eq 'ARRAY') { } |
|
3 |
104 |
elsif ($key eq '$and' and ref $value eq 'ARRAY') { } |
260
|
0 |
21 |
unless ref $_ eq 'HASH' |
264
|
12 |
10 |
unless (&_attribute_matches($doc, $k, $v)) |
270
|
9 |
12 |
if ($ok) |
275
|
4 |
9 |
unless $found |
278
|
1 |
5 |
unless &doc_matches($doc, $_, $defs) |
281
|
26 |
78 |
unless &_attribute_matches($doc, $key, $value) |
307
|
17 |
109 |
if ($key =~ /\./) { } |
312
|
13 |
4 |
if defined $v |
315
|
103 |
6 |
if exists $$doc{$key} |
319
|
32 |
94 |
if (not ref $value) { } |
|
0 |
94 |
elsif (blessed $value and blessed $value eq 'MongoDB::OID' || blessed $value eq 'MorboDB::OID') { } |
|
2 |
92 |
elsif (ref $value eq 'Regexp') { } |
|
91 |
1 |
elsif (ref $value eq 'HASH') { } |
|
1 |
0 |
elsif (ref $value eq 'ARRAY') { } |
322
|
2 |
30 |
unless defined $virt{$key} |
323
|
0 |
30 |
if (ref $virt{$key} eq 'ARRAY') { } |
|
30 |
0 |
elsif (not ref $virt{$key}) { } |
324
|
0 |
0 |
unless &_array_has_eq($value, $virt{$key}) |
326
|
9 |
21 |
unless $virt{$key} eq $value |
333
|
0 |
0 |
unless defined $virt{$key} |
334
|
0 |
0 |
if (blessed($virt{$key}) and blessed($virt{$key}) eq 'MongoDB::OID' || blessed($virt{$key}) eq 'MorboDB::OID') { } |
335
|
0 |
0 |
unless $virt{$key}->value eq $value->value |
343
|
0 |
2 |
unless defined $virt{$key} |
344
|
0 |
2 |
if (ref $virt{$key} eq 'ARRAY') { } |
|
2 |
0 |
elsif (not ref $virt{$key}) { } |
345
|
0 |
0 |
unless &_array_has_re($value, $virt{$key}) |
347
|
1 |
1 |
unless $virt{$key} =~ /$value/ |
354
|
2 |
89 |
if (not &_has_adv_que($value)) { } |
359
|
0 |
2 |
unless Compare($value, $virt{$key}) |
367
|
14 |
83 |
if ($q eq '$gt') { } |
|
7 |
76 |
elsif ($q eq '$gte') { } |
|
7 |
69 |
elsif ($q eq '$lt') { } |
|
5 |
64 |
elsif ($q eq '$lte') { } |
|
1 |
63 |
elsif ($q eq '$eq') { } |
|
2 |
61 |
elsif ($q eq '$ne') { } |
|
15 |
46 |
elsif ($q eq '$exists') { } |
|
4 |
42 |
elsif ($q eq '$mod' and ref $term eq 'ARRAY' and scalar @$term == 2) { } |
|
4 |
38 |
elsif ($q eq '$in' and ref $term eq 'ARRAY') { } |
|
3 |
35 |
elsif ($q eq '$nin' and ref $term eq 'ARRAY') { } |
|
4 |
31 |
elsif ($q eq '$size' and is_int $term) { } |
|
3 |
28 |
elsif ($q eq '$all' and ref $term eq 'ARRAY') { } |
|
28 |
0 |
elsif ($q eq '$type' and not ref $term) { } |
368
|
0 |
14 |
unless defined $virt{$key} and not ref $virt{$key} |
369
|
14 |
0 |
if (is_float($virt{$key})) { } |
370
|
7 |
7 |
unless $virt{$key} > $term |
372
|
0 |
0 |
unless $virt{$key} gt $term |
375
|
0 |
7 |
unless defined $virt{$key} and not ref $virt{$key} |
376
|
7 |
0 |
if (is_float($virt{$key})) { } |
377
|
1 |
6 |
unless $virt{$key} >= $term |
379
|
0 |
0 |
unless $virt{$key} ge $term |
382
|
0 |
7 |
unless defined $virt{$key} and not ref $virt{$key} |
383
|
6 |
1 |
if (is_float($virt{$key})) { } |
384
|
1 |
5 |
unless $virt{$key} < $term |
386
|
0 |
1 |
unless $virt{$key} lt $term |
389
|
0 |
5 |
unless defined $virt{$key} and not ref $virt{$key} |
390
|
5 |
0 |
if (is_float($virt{$key})) { } |
391
|
1 |
4 |
unless $virt{$key} <= $term |
393
|
0 |
0 |
unless $virt{$key} le $term |
396
|
0 |
1 |
unless defined $virt{$key} and not ref $virt{$key} |
397
|
0 |
1 |
if (is_float($virt{$key})) { } |
398
|
0 |
0 |
unless $virt{$key} == $term |
400
|
0 |
1 |
unless $virt{$key} eq $term |
403
|
0 |
2 |
unless defined $virt{$key} and not ref $virt{$key} |
404
|
1 |
1 |
if (is_float($virt{$key})) { } |
405
|
0 |
1 |
unless $virt{$key} != $term |
407
|
0 |
1 |
unless $virt{$key} ne $term |
410
|
10 |
5 |
if ($term) { } |
411
|
5 |
5 |
unless exists $virt{$key} |
413
|
1 |
4 |
if exists $virt{$key} |
416
|
1 |
3 |
unless defined $virt{$key} and is_float($virt{$key}) and $virt{$key} % $$term[0] == $$term[1] |
418
|
1 |
3 |
unless defined $virt{$key} and &_value_in($virt{$key}, $term) |
420
|
1 |
2 |
unless defined $virt{$key} and not &_value_in($virt{$key}, $term) |
422
|
1 |
1 |
unless defined $virt{$key} and ref $virt{$key} eq 'ARRAY' && scalar @{$virt{$key};} == $term || ref $virt{$key} eq 'HASH' && scalar keys %{$virt{$key};} == $term |
424
|
0 |
3 |
unless defined $virt{$key} and ref $virt{$key} eq 'ARRAY' |
426
|
1 |
5 |
unless &_value_in($_, $virt{$key}) |
429
|
3 |
25 |
if ($term eq 'int') { } |
|
4 |
21 |
elsif ($term eq 'float') { } |
|
2 |
19 |
elsif ($term eq 'real') { } |
|
2 |
17 |
elsif ($term eq 'whole') { } |
|
2 |
15 |
elsif ($term eq 'string') { } |
|
2 |
13 |
elsif ($term eq 'array') { } |
|
5 |
8 |
elsif ($term eq 'hash') { } |
|
1 |
7 |
elsif ($term eq 'bool') { } |
|
3 |
4 |
elsif ($term eq 'date') { } |
|
3 |
1 |
elsif ($term eq 'null') { } |
|
1 |
0 |
elsif ($term eq 'regex') { } |
430
|
1 |
2 |
unless defined $virt{$key} and is_int($virt{$key}) |
432
|
0 |
4 |
unless defined $virt{$key} and is_float($virt{$key}) |
434
|
0 |
2 |
unless defined $virt{$key} and is_real($virt{$key}) |
436
|
1 |
1 |
unless defined $virt{$key} and is_whole($virt{$key}) |
438
|
0 |
2 |
unless defined $virt{$key} and is_string($virt{$key}) |
440
|
0 |
2 |
unless defined $virt{$key} and ref $virt{$key} eq 'ARRAY' |
442
|
1 |
4 |
unless defined $virt{$key} and ref $virt{$key} eq 'HASH' |
446
|
0 |
3 |
unless defined $virt{$key} and not ref $virt{$key} |
448
|
1 |
2 |
unless blessed $date and blessed $date eq 'DateTime' |
450
|
1 |
2 |
unless exists $virt{$key} and not defined $virt{$key} |
452
|
0 |
1 |
unless defined $virt{$key} and ref $virt{$key} eq 'Regexp' |
458
|
0 |
1 |
unless Compare($value, $virt{$key}) |
478
|
0 |
0 |
if $_ eq $value |
498
|
0 |
0 |
if /$re/ |
517
|
89 |
590 |
if exists $$hash{$_} |
537
|
0 |
46 |
if is_float $_ and not is_float $value |
538
|
0 |
46 |
if not is_float $_ and is_float $value |
539
|
0 |
46 |
if is_float $_ and $value == $_ |
540
|
9 |
37 |
if not is_float $_ and $value eq $_ |
563
|
2 |
17 |
unless defined $doc and ref $doc and ref $doc eq 'HASH' |
565
|
1 |
15 |
unless defined $obj and ref $obj and ref $obj eq 'HASH' |
571
|
14 |
1 |
if (&_has_adv_upd($obj)) { } |
573
|
2 |
16 |
if ($op eq '$inc') { } |
|
2 |
14 |
elsif ($op eq '$set') { } |
|
2 |
12 |
elsif ($op eq '$unset') { } |
|
1 |
11 |
elsif ($op eq '$rename') { } |
|
1 |
10 |
elsif ($op eq '$push') { } |
|
1 |
9 |
elsif ($op eq '$pushAll') { } |
|
2 |
7 |
elsif ($op eq '$addToSet') { } |
|
2 |
5 |
elsif ($op eq '$pop') { } |
|
1 |
4 |
elsif ($op eq '$shift') { } |
|
1 |
3 |
elsif ($op eq '$splice') { } |
|
2 |
1 |
elsif ($op eq '$pull') { } |
|
1 |
0 |
elsif ($op eq '$pullAll') { } |
575
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
582
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
588
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
590
|
2 |
0 |
if $$obj{$op}{$field} |
594
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
596
|
1 |
0 |
if exists $$doc{$field} |
601
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
603
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
610
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
612
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
619
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
621
|
0 |
2 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
624
|
1 |
1 |
ref $$obj{$op}{$field} && ref $$obj{$op}{$field} eq 'ARRAY' ? : |
626
|
2 |
2 |
unless defined &_index_of($val, $$doc{$field}) |
632
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
634
|
0 |
2 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
637
|
2 |
0 |
if $$obj{$op}{$field} |
642
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
644
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
647
|
1 |
0 |
if $$obj{$op}{$field} |
652
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
654
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
658
|
0 |
1 |
unless ref $$obj{$op}{$field} and ref $$obj{$op}{$field} eq 'ARRAY' and scalar @{$$obj{$op}{$field};} == 2 |
664
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
666
|
0 |
2 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
677
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
679
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
713
|
14 |
84 |
if exists $$hash{$_} |
734
|
0 |
23 |
if (is_float($$array[$i]) and is_float $value) { } |
735
|
0 |
0 |
if $$array[$i] == $value |
737
|
6 |
17 |
if $$array[$i] eq $value |
761
|
0 |
23 |
unless exists $BUILTINS{$func} |
764
|
4 |
19 |
unless ref $$def{$func} |
770
|
49 |
4 |
if defined $v |
774
|
2 |
21 |
unless scalar @vals |
794
|
42 |
28 |
unless $key =~ /\./ |
806
|
35 |
15 |
if ($have and ref $have eq 'HASH' and exists $$have{$key}) { } |
|
10 |
5 |
elsif ($have and ref $have eq 'ARRAY' and $key =~ /^\d+$/ and scalar @$have > $key) { } |