line |
true |
false |
branch |
238
|
2 |
95 |
unless $doc and ref $doc and ref $doc eq 'HASH' |
240
|
2 |
92 |
if $query and !ref($query) || ref $query ne 'HASH' |
242
|
0 |
17 |
if $defs and !ref($defs) || ref $defs ne 'ARRAY' || scalar @$defs % 2 != 0 |
247
|
17 |
76 |
if ($defs) |
257
|
11 |
100 |
if ($key eq '$or' and ref $value eq 'ARRAY') { } |
260
|
0 |
18 |
unless ref $_ eq 'HASH' |
264
|
11 |
8 |
unless (&_attribute_matches($doc, $k, $v)) |
270
|
7 |
11 |
if ($ok) |
275
|
4 |
7 |
unless $found |
277
|
24 |
76 |
unless &_attribute_matches($doc, $key, $value) |
303
|
17 |
102 |
if ($key =~ /\./) { } |
308
|
13 |
4 |
if defined $v |
311
|
96 |
6 |
if exists $$doc{$key} |
315
|
26 |
93 |
if (not ref $value) { } |
|
0 |
93 |
elsif (blessed $value and blessed $value eq 'MongoDB::OID' || blessed $value eq 'MorboDB::OID') { } |
|
2 |
91 |
elsif (ref $value eq 'Regexp') { } |
|
90 |
1 |
elsif (ref $value eq 'HASH') { } |
|
1 |
0 |
elsif (ref $value eq 'ARRAY') { } |
318
|
1 |
25 |
unless defined $virt{$key} |
319
|
0 |
25 |
if (ref $virt{$key} eq 'ARRAY') { } |
|
25 |
0 |
elsif (not ref $virt{$key}) { } |
320
|
0 |
0 |
unless &_array_has_eq($value, $virt{$key}) |
322
|
7 |
18 |
unless $virt{$key} eq $value |
329
|
0 |
0 |
unless defined $virt{$key} |
330
|
0 |
0 |
if (blessed($virt{$key}) and blessed($virt{$key}) eq 'MongoDB::OID' || blessed($virt{$key}) eq 'MorboDB::OID') { } |
331
|
0 |
0 |
unless $virt{$key}->value eq $value->value |
339
|
0 |
2 |
unless defined $virt{$key} |
340
|
0 |
2 |
if (ref $virt{$key} eq 'ARRAY') { } |
|
2 |
0 |
elsif (not ref $virt{$key}) { } |
341
|
0 |
0 |
unless &_array_has_re($value, $virt{$key}) |
343
|
1 |
1 |
unless $virt{$key} =~ /$value/ |
350
|
2 |
88 |
if (not &_has_adv_que($value)) { } |
355
|
0 |
2 |
unless Compare($value, $virt{$key}) |
363
|
14 |
82 |
if ($q eq '$gt') { } |
|
8 |
74 |
elsif ($q eq '$gte') { } |
|
6 |
68 |
elsif ($q eq '$lt') { } |
|
5 |
63 |
elsif ($q eq '$lte') { } |
|
1 |
62 |
elsif ($q eq '$eq') { } |
|
2 |
60 |
elsif ($q eq '$ne') { } |
|
15 |
45 |
elsif ($q eq '$exists') { } |
|
4 |
41 |
elsif ($q eq '$mod' and ref $term eq 'ARRAY' and scalar @$term == 2) { } |
|
4 |
37 |
elsif ($q eq '$in' and ref $term eq 'ARRAY') { } |
|
3 |
34 |
elsif ($q eq '$nin' and ref $term eq 'ARRAY') { } |
|
4 |
30 |
elsif ($q eq '$size' and is_int $term) { } |
|
3 |
27 |
elsif ($q eq '$all' and ref $term eq 'ARRAY') { } |
|
27 |
0 |
elsif ($q eq '$type' and not ref $term) { } |
364
|
0 |
14 |
unless defined $virt{$key} and not ref $virt{$key} |
365
|
14 |
0 |
if (is_float($virt{$key})) { } |
366
|
7 |
7 |
unless $virt{$key} > $term |
368
|
0 |
0 |
unless $virt{$key} gt $term |
371
|
0 |
8 |
unless defined $virt{$key} and not ref $virt{$key} |
372
|
8 |
0 |
if (is_float($virt{$key})) { } |
373
|
1 |
7 |
unless $virt{$key} >= $term |
375
|
0 |
0 |
unless $virt{$key} ge $term |
378
|
0 |
6 |
unless defined $virt{$key} and not ref $virt{$key} |
379
|
5 |
1 |
if (is_float($virt{$key})) { } |
380
|
1 |
4 |
unless $virt{$key} < $term |
382
|
0 |
1 |
unless $virt{$key} lt $term |
385
|
0 |
5 |
unless defined $virt{$key} and not ref $virt{$key} |
386
|
5 |
0 |
if (is_float($virt{$key})) { } |
387
|
1 |
4 |
unless $virt{$key} <= $term |
389
|
0 |
0 |
unless $virt{$key} le $term |
392
|
0 |
1 |
unless defined $virt{$key} and not ref $virt{$key} |
393
|
0 |
1 |
if (is_float($virt{$key})) { } |
394
|
0 |
0 |
unless $virt{$key} == $term |
396
|
0 |
1 |
unless $virt{$key} eq $term |
399
|
0 |
2 |
unless defined $virt{$key} and not ref $virt{$key} |
400
|
1 |
1 |
if (is_float($virt{$key})) { } |
401
|
0 |
1 |
unless $virt{$key} != $term |
403
|
0 |
1 |
unless $virt{$key} ne $term |
406
|
10 |
5 |
if ($term) { } |
407
|
5 |
5 |
unless exists $virt{$key} |
409
|
1 |
4 |
if exists $virt{$key} |
412
|
1 |
3 |
unless defined $virt{$key} and is_float($virt{$key}) and $virt{$key} % $$term[0] == $$term[1] |
414
|
1 |
3 |
unless defined $virt{$key} and &_value_in($virt{$key}, $term) |
416
|
1 |
2 |
unless defined $virt{$key} and not &_value_in($virt{$key}, $term) |
418
|
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 |
420
|
0 |
3 |
unless defined $virt{$key} and ref $virt{$key} eq 'ARRAY' |
422
|
1 |
5 |
unless &_value_in($_, $virt{$key}) |
425
|
3 |
24 |
if ($term eq 'int') { } |
|
4 |
20 |
elsif ($term eq 'float') { } |
|
2 |
18 |
elsif ($term eq 'real') { } |
|
2 |
16 |
elsif ($term eq 'whole') { } |
|
2 |
14 |
elsif ($term eq 'string') { } |
|
2 |
12 |
elsif ($term eq 'array') { } |
|
5 |
7 |
elsif ($term eq 'hash') { } |
|
1 |
6 |
elsif ($term eq 'bool') { } |
|
3 |
3 |
elsif ($term eq 'date') { } |
|
2 |
1 |
elsif ($term eq 'null') { } |
|
1 |
0 |
elsif ($term eq 'regex') { } |
426
|
1 |
2 |
unless defined $virt{$key} and is_int($virt{$key}) |
428
|
0 |
4 |
unless defined $virt{$key} and is_float($virt{$key}) |
430
|
0 |
2 |
unless defined $virt{$key} and is_real($virt{$key}) |
432
|
1 |
1 |
unless defined $virt{$key} and is_whole($virt{$key}) |
434
|
0 |
2 |
unless defined $virt{$key} and is_string($virt{$key}) |
436
|
0 |
2 |
unless defined $virt{$key} and ref $virt{$key} eq 'ARRAY' |
438
|
1 |
4 |
unless defined $virt{$key} and ref $virt{$key} eq 'HASH' |
442
|
0 |
3 |
unless defined $virt{$key} and not ref $virt{$key} |
444
|
1 |
2 |
unless blessed $date and blessed $date eq 'DateTime' |
446
|
1 |
1 |
unless exists $virt{$key} and not defined $virt{$key} |
448
|
0 |
1 |
unless defined $virt{$key} and ref $virt{$key} eq 'Regexp' |
454
|
0 |
1 |
unless Compare($value, $virt{$key}) |
474
|
0 |
0 |
if $_ eq $value |
494
|
0 |
0 |
if /$re/ |
513
|
88 |
577 |
if exists $$hash{$_} |
533
|
0 |
46 |
if is_float $_ and not is_float $value |
534
|
0 |
46 |
if not is_float $_ and is_float $value |
535
|
0 |
46 |
if is_float $_ and $value == $_ |
536
|
9 |
37 |
if not is_float $_ and $value eq $_ |
559
|
2 |
17 |
unless defined $doc and ref $doc and ref $doc eq 'HASH' |
561
|
1 |
15 |
unless defined $obj and ref $obj and ref $obj eq 'HASH' |
567
|
14 |
1 |
if (&_has_adv_upd($obj)) { } |
569
|
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') { } |
571
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
578
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
584
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
586
|
2 |
0 |
if $$obj{$op}{$field} |
590
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
592
|
1 |
0 |
if exists $$doc{$field} |
597
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
599
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
606
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
608
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
615
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
617
|
0 |
2 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
620
|
1 |
1 |
ref $$obj{$op}{$field} && ref $$obj{$op}{$field} eq 'ARRAY' ? : |
622
|
2 |
2 |
unless defined &_index_of($val, $$doc{$field}) |
628
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
630
|
0 |
2 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
633
|
2 |
0 |
if $$obj{$op}{$field} |
638
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
640
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
643
|
1 |
0 |
if $$obj{$op}{$field} |
648
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
650
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
654
|
0 |
1 |
unless ref $$obj{$op}{$field} and ref $$obj{$op}{$field} eq 'ARRAY' and scalar @{$$obj{$op}{$field};} == 2 |
660
|
0 |
2 |
unless ref $$obj{$op} eq 'HASH' |
662
|
0 |
2 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
673
|
0 |
1 |
unless ref $$obj{$op} eq 'HASH' |
675
|
0 |
1 |
if defined $$doc{$field} and ref $$doc{$field} ne 'ARRAY' |
709
|
14 |
84 |
if exists $$hash{$_} |
730
|
0 |
23 |
if (is_float($$array[$i]) and is_float $value) { } |
731
|
0 |
0 |
if $$array[$i] == $value |
733
|
6 |
17 |
if $$array[$i] eq $value |
757
|
0 |
21 |
unless exists $BUILTINS{$func} |
760
|
3 |
18 |
unless ref $$def{$func} |
766
|
49 |
0 |
if defined $v |
788
|
38 |
28 |
unless $key =~ /\./ |
800
|
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) { } |