Branch Coverage

blib/lib/AnyEvent/MultiDownload.pm
Criterion Covered Total %
branch 28 50 56.0


line true false branch
118 2 1 if ($info)
126 0 1 if ($@)
149 1 1 if ($$hdr{'Status'} == 200)
151 0 1 if not defined $len or $len <= 0
162 0 1 if $len <= $self->block_size
166 1 7 unless defined $block_task
176 1 1 if ($self->on_body($first_task)->($partial_body, $hdr))
178 1 0 if ($$hdr{'content-length'} <= $self->block_size and $$first_task{'size'} == $$hdr{'content-length'} or $$first_task{'size'} >= $self->block_size)
183 1 0 $self->digest ? :
0 1 unless $self->on_block_finish->($hdr, $first_task, $self->digest ? $$first_task{'ctx'}->hexdigest : '')
196 0 3 if $$hdr{'OrigStatus'} and $$hdr{'OrigStatus'} == 200 or $$hdr{'Status'} == 200 or $$hdr{'Status'} == 416
198 1 2 if ($status == 500 || $status == 503 || $status =~ /^59/ and $retry < $self->max_retries)
210 2 0 $status ? :
2 0 $$hdr{'Reason'} ? :
228 1 8 unless $$hdr{'Status'} == 206 or $$hdr{'Status'} == 200
232 8 0 if ($$task{'size'} + $len > $self->block_size)
241 8 0 if ($self->digest)
276 7 0 if ($status == 200 or $status == 206)
278 7 0 $self->digest ? :
0 7 if $$task{'size'} != $$task{'tail'} - $$task{'ofs'} + 1 or not $self->on_block_finish->($hdl, $task, $self->digest ? $$task{'ctx'}->hexdigest : '')
286 0 7 $block_task ? :
291 0 0 $status ? :
0 0 $$hdr{'Reason'} ? :
303 0 0 if not $status =~ /^(59.|503|500|502|200|206|)$/ or $retry > $self->max_retries
345 0 8 if ($length - 1 < $tail)