Branch Coverage

blib/lib/Net/LDAP/FilterMatch.pm
Criterion Covered Total %
branch 77 132 58.3


line true false branch
22 0 1 unless @_
144 0 106 if ($op eq 'and')
146 0 0 unless &_filterMatch($subfilter, $entry)
150 0 106 if ($op eq 'or')
152 0 0 if &_filterMatch($subfilter, $entry)
156 6 100 if ($op eq 'not')
159 2 98 if ($op eq 'present')
165 84 14 if ($op =~ /^(equalityMatch|greaterOrEqual|lessOrEqual|approxMatch|substrings)/o) { }
14 0 elsif ($op eq 'extensibleMatch') { }
170 22 62 if ($op eq 'substrings') { }
174 18 4 if exists $args->{'substrings'}[0]{'initial'}
175 10 12 if exists $args->{'substrings'}[-1]{'final'}
185 31 53 if ($schema and $op ne 'approxMatch') { }
188 2 29 unless $mr
199 10 4 $args->{'type'} ? :
204 5 9 if ($schema) { }
208 4 1 if (defined $args->{'matchingRule'}) { }
210 4 0 if $mrhref
212 2 2 unless (@attrs)
214 0 2 unless $mruhref
219 0 1 unless @attrs
223 0 5 unless $mr
231 4 10 if ($args->{'dnAttributes'}) { }
235 0 4 unless $exploded
239 10 117 $dnattrs{$_} ? :
3 1 @attrs ? :
243 1 9 unless @attrs
260 0 0 unless $assertion =~ /^(?:TRUE|FALSE)$/i
261 0 0 if not @_ and $assertion =~ /^FALSE$/i
262 0 0 grep(/^\Q$assertion\E$/i, @_) ? :
271 0 1 unless defined $assertion
272 1 0 grep(/^\Q$assertion\E$/i, @vals) ? :
281 1 0 grep({($assertion & $_) == $assertion;} @vals) ? :
290 1 0 grep({($assertion & $_) != 0;} @vals) ? :
300 17 15 grep(/^\Q$assertion\E$/i, @_) ? :
308 0 0 grep(/^\Q$assertion\E$/, @_) ? :
316 1 1 grep(/^\Q$assertion\E$/, @_) ? :
327 0 3 if not @vals or $assertion =~ /^$/
328 3 0 grep({$assertion eq $_;} @vals) ? :
336 2 2 if ($op eq 'greaterOrEqual') { }
2 0 elsif ($op eq 'lessOrEqual') { }
337 2 0 grep({lc $_ ge lc $assertion;} @_) ? :
340 2 0 grep({lc $_ le lc $assertion;} @_) ? :
352 2 2 if ($op eq 'greaterOrEqual') { }
2 0 elsif ($op eq 'lessOrEqual') { }
353 2 0 grep({$_ ge $assertion;} @_) ? :
356 2 0 grep({$_ le $assertion;} @_) ? :
368 3 2 if ($op eq 'greaterOrEqual') { }
2 0 elsif ($op eq 'lessOrEqual') { }
369 3 0 grep({$_ >= $assertion;} @_) ? :
372 2 0 grep({$_ <= $assertion;} @_) ? :
384 0 18 if $regex =~ /^$/
385 14 4 grep(/$regex/i, @_) ? :
393 0 0 if $regex =~ /^$/
394 0 0 grep(/$regex/, @_) ? :
406 0 4 if not @vals or $regex =~ /^$/
407 4 0 grep(/$regex/, @vals) ? :
417 4 3 if (grep((!/^-?\d+$/o), $assertion, @_)) { }
435 0 20 if (/String::Approx/) { }
0 20 elsif (/Text::Metaphone/) { }
20 0 elsif (/Text::Soundex/) { }
436 0 0 String::Approx::amatch($assertion, @vals) ? :
440 0 0 grep((Text::Metaphone::Metaphone($_) eq $metamatch), @vals) ? :
444 20 0 grep((Text::Soundex::soundex($_) eq $smatch), @vals) ? :
448 0 0 if $assertion =~ /^$/
449 0 0 grep(/^$assertion$/i, @vals) ? :