Branch Coverage

lib/Apache/Solr.pm
Criterion Covered Total %
branch 54 184 29.3


line true false branch
37 20 2 $b && $b ne 'false' && $b ne 'off' ? :
0 22 !defined($b) ? :
45 2 2 if ($class eq "Apache::Solr")
47 0 2 unless $format eq "XML" or $format eq "JSON"
50 0 2 if $@
59 0 4 exists $args->{'autocommit'} ? :
72 0 1 @_ ? :
74 0 0 @_ ? :
81 1 4 unless $uri
82 4 0 unless &blessed($uri) and $uri->isa("URI")
92 0 0 @_ && ref $_[0] eq 'HASH' ? :
108 0 0 if ref $docs ne "ARRAY"
114 0 0 exists $args{'commit'} ? :
116 0 0 if (my $cw = $args{'commitWithin'})
117 0 0 if ($sv lt '3.4') { }
122 0 0 if exists $args{'overwrite'}
125 0 0 if (exists $args{$depr})
126 0 0 if ($sv ge '4.0') { }
0 0 elsif ($sv ge '1.0') { }
141 0 0 if (exists $args{'waitFlush'})
142 0 0 if ($sv ge '4.0') { }
0 0 elsif ($sv ge '1.4') { }
149 0 0 if exists $args{'waitSearcher'}
151 0 0 if (exists $args{'softCommit'})
152 0 0 if ($sv lt '4.0') { }
156 0 0 if (exists $args{'expungeDeletes'})
157 0 0 if ($sv lt '1.4') { }
171 0 0 if (exists $args{'waitFlush'})
172 0 0 if ($sv ge '4.0') { }
0 0 elsif ($sv ge '1.4') { }
179 0 0 if exists $args{'waitSearcher'}
181 0 0 if (exists $args{'softCommit'})
182 0 0 if ($sv lt '4.0') { }
186 0 0 if (exists $args{'maxSegments'})
187 0 0 if ($sv lt '1.3') { }
201 0 0 exists $args{'commit'} ? :
203 0 0 if (exists $args{'fromPending'})
207 0 0 if (exists $args{'fromCommitted'})
213 0 0 if (my $id = $args{'id'})
214 0 0 ref $id eq 'ARRAY' ? :
216 0 0 if (my $q = $args{'query'})
217 0 0 ref $q eq 'ARRAY' ? :
219 0 0 unless @which
223 0 0 if ($self->serverVersion ge '1.4' and not $self->isa('Apache::Solr::JSON')) { }
237 0 0 unless $self->serverVersion ge "1.4"
247 0 0 unless $self->serverVersion ge "1.4"
256 0 0 if $fn and not ref $fn
259 0 0 unless exists $p{'commit'}
261 0 0 if (defined $p{'string'}) { }
0 0 elsif ($fn) { }
266 0 0 ref $p{'string'} eq 'SCALAR' ? :
0 0 ref $p{'string'} eq 'SCALAR' ? :
0 0 $ct =~ m[^text/]i ? :
272 0 0 if (ref $fn eq 'GLOB') { }
275 0 0 unless open IN, "<:raw", $fn
278 0 0 unless close IN
331 1 3 if not $sub or index($sub, "Apache::Solr::") < 0
337 15 11 ref $p eq 'HASH' ? :
344 43 47 if defined $prefix and index($k, $prefix) != 0
345 2 88 $k =~ /^f\.[^\.]+\.(.*)/ ? :
348 1 89 if ($dv = $Apache::Solr::deprecated{$param} and $sv ge $dv) { }
0 169 elsif ($iv = $Apache::Solr::introduced{$param} and $iv gt $sv) { }
359 7 83 ref $v eq 'ARRAY' ? :
22 75 $Apache::Solr::boolparams{$param} ? :
367 0 1 @_ == 1 ? :
369 1 0 wantarray ? :
375 4 0 ref $v eq 'HASH' ? :
383 0 1 @_ == 1 ? :
387 6 4 if (not ref $v or ref $v eq 'SCALAR') { }
2 2 elsif ($k eq 'literal' or $k eq 'literals') { }
2 0 elsif ($k eq 'fmap' or $k eq 'boost' or $k eq 'resource') { }
396 1 0 @s ? :
397 1 0 wantarray ? :
424 2 35 $per_field ? :
426 15 22 if (my $def = $sets{$set}) { }
0 22 elsif (ref $v eq 'HASH') { }
428 0 2 unless not $per_field or $def->[0]
432 15 0 if (ref $v eq 'HASH') { }
0 0 elsif ($more) { }
433 0 15 if $more
450 1 8 wantarray ? :
456 0 1 if $self->{'AS_depr_msg'}{$msg}++
463 0 0 if $self->{'AS_ign_msg'}{$msg}++
470 0 0 if $self->{'AS_rem_msg'}{$msg}++
481 1 0 defined $core ? :
485 0 1 if ref $params eq "HASH"
486 0 1 unless @$params
492 2 0 if defined $p[1]
496 1 0 if @params
504 0 0 if (not $body) { }
510 0 0 ref $body eq 'SCALAR' ? :
524 0 0 unless ($resp->is_success)