Branch Coverage

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


line true false branch
81 0 34 if ($args{'dispatch'} and not ref $args{'dispatch'} eq 'HASH')
84 0 34 if ($args{'config'} and not ref $args{'config'} eq 'HASH')
92 34 0 if (length scalar keys %args)
94 0 408 if defined $args{$_}
110 22 8 $_[0]{'bind_values'} ? :
111 0 30 $_[0]{'parameters'} ? :
120 70 97 if (&looks_like_number($arg) or $arg =~ /^\s*$q(.*)$q\s*$/ or $arg =~ /$_[0]{'config'}{'parameter_sigil'}/ or &blessed($_[1])) { }
142 30 0 if ($SQL_ABSTRACT)
151 0 1 if (not defined $key) { }
0 1 elsif (not defined $val) { }
171 8 536 if (not defined $_[0] or ref $_[0])
174 213 323 if (not $_[1]) { }
175 63 150 if (defined $self->{'dispatch'}{$_[0]}) { }
179 0 5 if not $_[0] =~ /$self->{'config'}{'safe_identifier'}/ and $_[0] =~ /^-|[[:punct:]]/ and not &looks_like_number($_[0])
194 111 231 if ($_ eq '' or &blessed($expr))
195 111 0 if (defined $expr) { }
197 81 30 $self->{'config'}{'bind'} ? :
203 22 209 if (/REF|SCALAR/)
204 17 5 if ($_ eq 'SCALAR') { }
5 0 elsif (ref $$expr eq 'ARRAY') { }
212 0 5 if ($self->{'config'}{'bind'}) { }
216 4 1 if ($self->{'config'}{'anon_placeholder'})
220 3 2 $lhs ? :
223 32 177 if (/ARRAY/)
224 12 20 if (&$is_op($expr->[0], 'infix_distributable'))
229 3 9 if (@$expr == 1) { }
231 3 0 if (/ARRAY/)
235 0 0 if (/HASH/)
248 14 11 if (not ref $elt) { }
252 1 10 if ref $elt eq 'ARRAY' and not scalar @$elt or ref $elt eq 'HASH' and not scalar %$elt
259 4 16 if (&$is_op($expr->[0]) and not &$is_op($expr->[0], 'infix_distributable')) { }
3 13 elsif (ref $expr->[0] eq 'HASH') { }
270 4 9 if ($lhs) { }
275 12 1 defined $_ ? :
280 6 3 if ($arg_of and &any(sub { &$is_op($arg_of, $_); } , 'function', 'infix_listarg', 'predicate', 'reduce')) { }
293 177 0 if (/HASH/)
296 154 23 if (@k == 1) { }
299 59 95 if (&$is_op($k)) { }
38 57 elsif (ref $expr->{$k} and ref $expr->{$k} ne 'SCALAR') { }
300 33 26 if (&$is_op($k, 'infix_binary'))
301 0 33 unless $lhs
302 1 32 if (ref $expr->{$k} eq 'ARRAY') { }
29 3 elsif (defined $expr->{$k}) { }
309 1 1 defined $_ ? :
316 3 0 if ($k eq $self->{'config'}{'ineq_op'})
319 0 0 if ($k eq $self->{'config'}{'implicit_eq_op'})
325 6 20 if (&$is_op($k, 'function'))
328 4 16 if (&$is_op($k, 'infix_listarg'))
331 8 8 if (&$is_op($k, 'prefix'))
334 4 4 if (&$is_op($k, 'infix_distributable'))
335 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') { }
349 2 2 if (&$is_op($k, 'predicate'))
351 0 2 unless ref $expr->{$k} eq 'ARRAY' and @{$expr->{$k};} == 3
356 2 0 if (&$is_op($k, 'reduce'))
358 0 2 unless ref $expr->{$k} eq 'ARRAY' and @{$expr->{$k};} == 5
375 53 4 defined $expr->{$k} ? :
385 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)) { }
386 0 6 unless defined $lhs
412 0 437 if (not defined $args) { }
189 248 elsif (not ref $args or &blessed($args)) { }
248 0 elsif (ref $args eq 'ARRAY') { }
419 0 248 unless @$args
421 0 248 unless $self->{'dispatch'}{$op}
423 34 214 if (grep /\Q$op\E/, @{$type_table{'infix_distributable'};}) { }
440 0 76 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
444 0 76 unless (@$args == 2)
454 0 35 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
464 0 12 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
468 0 12 unless (@$args == 1)
476 0 6 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
480 0 6 unless (@$args == 1)
488 0 6 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
497 0 2 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
501 0 2 unless (@$args == 3)
509 0 0 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
513 0 0 unless (@$args == 3)
521 0 2 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
525 0 2 unless (@$args == 5)
538 0 81 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
542 0 81 if ($args->[0] =~ /$self->{'config'}{'parameter_sigil'}/) { }
547 0 81 $self->{'config'}{'anon_placeholder'} ? :
552 0 81 $self->{'config'}{'anon_placeholder'} ? :
557 0 5 unless ($op and $args and not ref $op and ref $args eq 'ARRAY')
574 0 139 if $op eq '()'
575 143 10 $c =~ /infix|prefix|postfix/ ? :