Branch Coverage

blib/lib/PAGI/Request/BodyStream.pm
Criterion Covered Total %
branch 35 56 62.5


line true false branch
145 0 20 if $self->{'_done'}
146 0 20 if $self->{'_error'}
151 1 19 if (not $message or $message->{'type'} eq "http.disconnect")
154 0 1 if ($self->{'decode'} and length $self->{'_buffer'})
156 0 0 if length $final
166 2 17 if (defined $self->{'max_bytes'})
168 2 0 if ($new_total > $self->{'max_bytes'})
178 8 9 unless $more
181 4 13 if ($self->{'decode'})
258 0 2 unless defined $path
260 1 1 if $self->{'decode'}
267 0 2 unless defined $chunk
268 0 2 unless length $chunk
271 1 1 unless ($fh)
272 0 1 unless open $fh, ">:raw", $path
277 0 2 unless print $fh $chunk
284 1 0 if ($fh)
285 0 1 unless close $fh
307 0 1 unless $callback
313 0 2 unless defined $chunk
314 0 2 unless length $chunk
318 0 2 if (ref $result and $result->can("get"))
341 0 4 unless $encoding
349 3 1 if ($flush or not length $data) { }
352 1 2 $self->{'strict'} ? :
364 0 1 if ($self->{'strict'} and length $self->{'_buffer'} > 0)
367 0 0 if $@
374 1 3 if ($@)