Branch Coverage

blib/lib/Net/LDAP/Filter.pm
Criterion Covered Total %
branch 61 80 76.2


line true false branch
52 142 0 if (@_)
53 0 142 unless $me->parse(shift())
84 11 9 length $1 == 1 ? :
98 21 185 if ($op eq ':=')
101 0 21 unless ($attr =~ /^([-;\d\w]*)(:dn)?(:(\w+|[.\d]+))?$/)
108 14 7 length $type ? :
10 11 $dn ? :
118 159 26 if ($op eq '=')
121 10 149 if ($val eq '*') { }
33 116 elsif ($val =~ /^(\\.|[^\\*]+)*\*/o) { }
132 47 10 if length $1 or $type eq 'any'
138 15 18 if length $val
170 0 142 unless (defined $filter)
178 4 138 unless $filter =~ /^\(/
185 70 276 if ($filter =~ s/^\(\s*([&!|])\s*//) { }
70 206 elsif ($filter =~ s/^\)\s*//o) { }
206 0 elsif ($filter =~ s/^\(\s* ($Attr)\s* ([:~<>]?=) ((?:\\.|[^\\()]+)*) \)\s* //ox) { }
195 0 70 unless (@stack)
202 20 50 $myop eq '!' ? :
203 43 27 if @stack
215 91 115 if @stack
223 0 142 if (length $filter)
228 0 142 if (@stack)
241 0 0 @_ ? :
252 30 193 if /^and/
253 20 173 if /^or/
254 17 156 if /^not/
255 9 147 if /^present/
257 111 36 if /^(equalityMatch|greaterOrEqual|lessOrEqual|approxMatch)/
258 22 14 if (/^substrings/)
260 14 8 if exists $_[1]{'substrings'}[0]{'initial'}
261 12 10 unless exists $_[1]{'substrings'}[-1]{'final'}
264 14 0 if (/^extensibleMatch/)
266 9 5 if defined $_[1]{'type'}
267 8 6 if $_[1]{'dnAttributes'}
268 12 2 if defined $_[1]{'matchingRule'}
287 0 0 if /^and/
288 0 0 if /^or/
289 0 0 if /^not/
290 0 0 if /^(present|equalityMatch|greaterOrEqual|lessOrEqual|approxMatch|substrings|extensibleMatch)/