Branch Coverage

blib/lib/KinoSearch1/QueryParser/QueryParser.pm
Criterion Covered Total %
branch 43 52 82.6


line true false branch
35 0 47 unless $$self{'default_boolop'} =~ /^(?:AND|OR)$/
49 43 4 defined $$self{'fields'} ? :
53 0 47 unless defined $fields and reftype $fields eq 'ARRAY'
59 0 47 unless a_isa_b($$self{'analyzer'}, 'KinoSearch1::Analysis::Analyzer')
103 0 348 unless defined $qstring_orig
115 393 578 if s/^\s+//
117 260 318 $default_boolop eq 'AND' ? :
119 41 537 if (s/^AND\s+//) { }
42 495 elsif (s/^OR\s+//) { }
120 31 10 if (@clauses)
122 18 13 if ($clauses[-1]{'occur'} eq 'SHOULD')
130 38 4 if (@clauses)
137 55 523 if (s/$neg_re//) { }
41 482 elsif (s/$req_re//) { }
145 32 546 s/^$field_re// ? :
148 96 482 if (s/$$self{'phrase_re'}//) { }
83 399 elsif (s/$$self{'bool_group_re'}//) { }
399 0 elsif (s/([^"(\s]+)//) { }
154 96 0 if (@$token_texts)
156 96 0 if defined $query
171 357 42 if (@$token_texts)
178 147 201 if (@clauses == 1 and $clauses[0]{'occur'} ne 'MUST_NOT') { }
202 0 453 if (@queries == 0) { }
408 45 elsif (@queries == 1) { }
224 468 66 if (@$token_texts == 1) { }
66 0 elsif (@$token_texts > 1) { }