Branch Coverage

blib/lib/Neo4j/Cypher/Abstract/Peeler.pm
Criterion Covered Total %
branch 125 178 70.2


line true false branch
87 0 34 if ($args{'dispatch'} and not ref $args{'dispatch'} eq 'HASH')
90 0 34 if ($args{'config'} and not ref $args{'config'} eq 'HASH')
98 34 0 if (length scalar keys %args)
100 0 408 if defined $args{$_}
116 22 8 $_[0]{'bind_values'} ? :
117 0 30 $_[0]{'parameters'} ? :
126 70 97 if (&looks_like_number($arg) or $arg =~ /^\s*$q(.*)$q\s*$/ or $arg =~ /$_[0]{'config'}{'parameter_sigil'}/ or &blessed($_[1])) { }
148 30 0 if ($SQL_ABSTRACT)
157 0 1 if (not defined $key) { }
0 1 elsif (not defined $val) { }
177 8 536 if (not defined $_[0] or ref $_[0])
180 213 323 if (not $_[1]) { }
181 63 150 if (defined $self->{'dispatch'}{$_[0]}) { }
185 0 5 if not $_[0] =~ /$self->{'config'}{'safe_identifier'}/ and $_[0] =~ /^-|[[:punct:]]/ and not &looks_like_number($_[0])
200 111 231 if ($_ eq '' or &blessed($expr))
201 111 0 if (defined $expr) { }
203 81 30 $self->{'config'}{'bind'} ? :
209 22 209 if (/REF|SCALAR/)
210 17 5 if ($_ eq 'SCALAR') { }
5 0 elsif (ref $$expr eq 'ARRAY') { }
218 0 5 if ($self->{'config'}{'bind'}) { }
222 4 1 if ($self->{'config'}{'anon_placeholder'})
226 3 2 $lhs ? :
229 32 177 if (/ARRAY/)
230 12 20 if (&$is_op($expr->[0], 'infix_distributable'))
235 3 9 if (@$expr == 1) { }
237 3 0 if (/ARRAY/)
241 0 0 if (/HASH/)
254 14 11 if (not ref $elt) { }
258 1 10 if ref $elt eq 'ARRAY' and not scalar @$elt or ref $elt eq 'HASH' and not scalar %$elt
265 4 16 if (&$is_op($expr->[0]) and not &$is_op($expr->[0], 'infix_distributable')) { }
3 13 elsif (ref $expr->[0] eq 'HASH') { }
276 4 9 if ($lhs) { }
281 12 1 defined $_ ? :
286 6 3 if ($arg_of and &any(sub { &$is_op($arg_of, $_); } , 'function', 'infix_listarg', 'predicate', 'reduce')) { }
299 177 0 if (/HASH/)
302 154 23 if (@k == 1) { }
305 59 95 if (&$is_op($k)) { }
38 57 elsif (ref $expr->{$k} and ref $expr->{$k} ne 'SCALAR') { }
306 33 26 if (&$is_op($k, 'infix_binary'))
307 0 33 unless $lhs
308 1 32 if (ref $expr->{$k} eq 'ARRAY') { }
29 3 elsif (defined $expr->{$k}) { }
315 1 1 defined $_ ? :
322 3 0 if ($k eq $self->{'config'}{'ineq_op'})
325 0 0 if ($k eq $self->{'config'}{'implicit_eq_op'})
331 6 20 if (&$is_op($k, 'function'))
334 4 16 if (&$is_op($k, 'infix_listarg'))
337 8 8 if (&$is_op($k, 'prefix'))
340 4 4 if (&$is_op($k, 'infix_distributable'))
341 0 4 if (not ref $expr->{$k} and $lhs) { }
1 3 elsif (ref $expr->{$k} eq 'HASH') { }
3 0 elsif (ref $expr->{$k} eq 'ARRAY') { }
355 2 2 if (&$is_op($k, 'predicate'))
357 0 2 unless ref $expr->{$k} eq 'ARRAY' and @{$expr->{$k};} == 3
362 2 0 if (&$is_op($k, 'reduce'))
364 0 2 unless ref $expr->{$k} eq 'ARRAY' and @{$expr->{$k};} == 5
381 53 4 defined $expr->{$k} ? :
391 6 46 if (&$is_op($k, 'infix_binary')) { }
3 43 elsif (&$is_op($k, 'prefix') or &$is_op($k, 'function')) { }
43 0 elsif (not &$is_op($k)) { }
392 0 6 unless defined $lhs
418 0 437 if (not defined $args) { }
189 248 elsif (not ref $args or &blessed($args)) { }
248 0 elsif (ref $args eq 'ARRAY') { }
425 0 248 unless @$args
427 0 248 unless $self->{'dispatch'}{$op}
429 34 214 if (grep /\Q$op\E/, @{$type_table{'infix_distributable'};}) { }
446 0 76 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
450 0 76 unless (@$args == 2)
460 0 35 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
470 0 12 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
474 0 12 unless (@$args == 1)
482 0 6 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
486 0 6 unless (@$args == 1)
494 0 6 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
503 0 2 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
507 0 2 unless (@$args == 3)
515 0 0 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
519 0 0 unless (@$args == 3)
527 0 2 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
531 0 2 unless (@$args == 5)
544 0 81 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
548 0 81 if ($args->[0] =~ /$self->{'config'}{'parameter_sigil'}/) { }
553 0 81 $self->{'config'}{'anon_placeholder'} ? :
558 0 81 $self->{'config'}{'anon_placeholder'} ? :
563 0 5 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
580 0 139 if $op eq '()'
581 143 10 $c =~ /infix|prefix|postfix/ ? :