Branch Coverage

blib/lib/Search/Tools/QueryParser.pm
Criterion Covered Total %
branch 82 126 65.0


line true false branch
79 1 50 if ($self->{'locale'} ne $Defaults{'locale'})
81 0 1 if $self->{'lang'} =~ /^(posix|c)$/i
86 0 51 if (ref $self->{'ignore_fields'} eq 'ARRAY')
99 0 63 unless defined $query_str
100 0 63 if (ref $query_str)
114 32 113 if ($is_phrase)
152 0 63 unless defined $query
168 11 52 unless ref $stopwords
180 63 0 if $self->ignore_case
182 0 63 unless my $dialect = $parser->parse($baked_query)
183 0 63 if $self->debug
187 0 63 if $self->debug
194 0 63 if $self->debug
205 152 0 if ($self->treat_uris_like_phrases)
211 0 152 if $self->debug
217 0 199 unless $w =~ /\S/
225 208 0 if length $igf
226 208 0 if length $igl
228 0 208 unless ($tok)
229 0 0 if $self->debug
233 0 208 if $self->debug
235 13 195 if (exists $stophash{lc $tok})
236 0 13 if $self->debug
237 6 7 unless $isphrase
240 115 87 unless ($isphrase)
241 0 115 if $tok =~ /^($and_word|$or_word|$not_word)$/i
249 0 202 unless (&Encode::is_utf8($tok))
261 6 146 unless @w
264 32 114 if ($isphrase) { }
275 0 63 if $self->debug
279 12 135 if ($_ =~ /$esc_wildcard/)
287 1 146 if (length $_ < $min_length)
288 0 1 if $self->debug
294 0 63 if $self->debug
297 8 55 if ($self->stemmer)
311 0 27 unless (defined $f and length $f)
323 15 0 if ($new ne $_)
331 0 63 if $self->debug
349 0 208 ref $str ? :
350 0 208 if (not defined $$ref) { }
357 208 0 $$ref =~ /(.*)/ ? :
359 0 208 ref $str ? :
371 63 63 unless exists $parseTree->{$node}
379 0 150 unless (defined $v)
382 0 150 if (defined $leaf->{'field'} and exists $self->ignore_fields->{$leaf->{'field'}})
388 3 147 if (defined $field)
391 0 150 if (ref $v eq 'HASH') { }
1 149 elsif (ref $v eq 'ARRAY') { }
408 1 148 if ($leaf->{'proximity'} and $leaf->{'proximity'} > 1)
463 51 0 if length $ignore_first
467 51 0 if length $ignore_last
481 51 0 length $ignore_last ? :
51 0 length $ignore_first ? :
488 51 0 length $ignore_first ? :
51 0 length $ignore_last ? :
499 0 232 unless my $q = shift()
543 61 1400 if $c eq $wild_esc
545 55 1406 if ($c eq '\\ ')
551 1404 2 if ($ent) { }
552 1339 65 $ent eq "&#$num;" ? :
559 1345 61 unless $c eq "[$wild]*"
562 1174 232 unless $counter == $#char
600 0 0 if ($_) { }