Branch Coverage

lib/Apache/Solr.pm
Criterion Covered Total %
branch 54 192 28.1


line true false branch
41 20 2 $b && $b ne 'false' && $b ne 'off' ? :
0 22 if (not defined $b) { }
49 2 2 if ($class eq __PACKAGE__)
51 0 2 unless $format eq "XML" or $format eq "JSON"
54 0 2 if $@
63 0 4 exists $args->{'autocommit'} ? :
77 0 1 if (@_) { }
78 0 0 if (@_) { }
85 1 4 unless $uri
86 4 0 unless builtin::blessed($uri) and $uri->isa("URI")
96 0 0 @_ && ref $_[0] eq 'HASH' ? :
112 0 0 if ref $docs ne "ARRAY"
117 0 0 exists $args{'commit'} ? :
119 0 0 if (my $cw = $args{'commitWithin'})
120 0 0 if ($sv lt '3.4') { }
125 0 0 if exists $args{'overwrite'}
128 0 0 if (exists $args{$depr})
129 0 0 if ($sv ge '4.0') { }
0 0 elsif ($sv ge '1.0') { }
144 0 0 if (exists $args{'waitFlush'})
145 0 0 if ($sv ge '4.0') { }
0 0 elsif ($sv ge '1.4') { }
152 0 0 if exists $args{'waitSearcher'}
154 0 0 if (exists $args{'softCommit'})
155 0 0 if ($sv lt '4.0') { }
159 0 0 if (exists $args{'expungeDeletes'})
160 0 0 if ($sv lt '1.4') { }
174 0 0 if (exists $args{'waitFlush'})
175 0 0 if ($sv ge '4.0') { }
0 0 elsif ($sv ge '1.4') { }
181 0 0 if exists $args{'waitSearcher'}
183 0 0 if (exists $args{'softCommit'})
184 0 0 if ($sv lt '4.0') { }
188 0 0 if (exists $args{'maxSegments'})
189 0 0 if ($sv lt '1.3') { }
202 0 0 exists $args{'commit'} ? :
204 0 0 if (exists $args{'fromPending'})
208 0 0 if (exists $args{'fromCommitted'})
214 0 0 if (my $id = $args{'id'})
215 0 0 ref $id eq 'ARRAY' ? :
217 0 0 if (my $q = $args{'query'})
218 0 0 ref $q eq 'ARRAY' ? :
220 0 0 unless @which
224 0 0 if ($self->serverVersion ge '1.4' and not $self->isa('Apache::Solr::JSON')) { }
238 0 0 unless $self->serverVersion ge "1.4"
248 0 0 unless $self->serverVersion ge "1.4"
257 0 0 if $fn and not ref $fn
260 0 0 unless exists $p{'commit'}
262 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
277 0 0 unless close IN
327 1 3 if not $sub or index($sub, "Apache::Solr::") == -1
333 15 11 ref $p eq 'HASH' ? :
340 43 47 if defined $prefix and index($k, $prefix) != 0
341 2 88 $k =~ /^f\.[^\.]+\.(.*)/ ? :
344 1 89 if ($dv = $Apache::Solr::deprecated{$param} and $sv ge $dv) { }
0 169 elsif ($iv = $Apache::Solr::introduced{$param} and $iv gt $sv) { }
355 7 83 ref $v eq 'ARRAY' ? :
22 75 $Apache::Solr::boolparams{$param} ? :
363 0 1 @_ == 1 ? :
365 1 0 wantarray ? :
371 4 0 ref $v eq 'HASH' ? :
379 0 1 @_ == 1 ? :
383 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') { }
392 1 0 @s ? :
393 1 0 wantarray ? :
420 2 35 $per_field ? :
422 15 22 if (my $def = $sets{$set}) { }
0 22 elsif (ref $v eq 'HASH') { }
424 0 2 unless not $per_field or $def->[0]
427 15 0 if (ref $v eq 'HASH') { }
0 0 elsif ($more) { }
428 0 15 if $more
444 1 8 wantarray ? :
450 0 1 if $self->{'AS_depr_msg'}{$msg}++
457 0 0 if $self->{'AS_ign_msg'}{$msg}++
464 0 0 if $self->{'AS_rem_msg'}{$msg}++
475 1 0 defined $core ? :
479 0 1 if ref $params eq "HASH"
480 0 1 unless @$params
486 3 0 if defined $p[1]
490 1 0 if @params
499 0 0 if ($body) { }
501 0 0 ref $body eq 'SCALAR' ? :
526 0 0 if $resp->is_success
528 0 0 if ($resp->code == 500)
532 0 0 if $wait and $retries
540 0 0 unless ($resp->is_success)
541 0 0 $resp->code == 500 ? :