Branch Coverage

blib/lib/PAGI/Request.pm
Criterion Covered Total %
branch 89 128 69.5


line true false branch
39 0 40 unless defined $str
48 0 41 unless defined $str
49 0 41 $strict ? :
98 0 15 if %opts
100 0 15 $strict ? :
0 15 $raw ? :
101 6 9 if $self->{'scope'}{$cache_key}
107 0 14 unless length $part
117 0 14 $raw ? :
118 0 14 $raw ? :
162 3 4 if exists $self->{'scope'}{'pagi.request.cookies'}
201 0 0 unless $conn
216 0 0 unless $conn
225 1 2 if $conn
234 1 1 if $conn
242 0 0 unless $conn
250 1 1 unless $t
257 1 1 unless $t
264 1 1 unless $t
271 1 1 if $t and $t->can("on_high_water")
278 1 1 if $t and $t->can("on_drain")
285 1 2 unless $t
287 0 2 unless defined $high
288 1 1 $t->buffered_amount < $high ? :
333 1 2 if ($auth =~ /^Bearer\s+(.+)$/i)
343 2 1 if ($auth =~ /^Basic\s+(.+)$/i)
356 1 32 if %opts
359 1 31 if (not defined $params and $strict)
370 6 19 exists $opts{'strict'} ? :
371 0 25 if %opts
375 8 17 if ($strict and not exists $params->{$name})
377 5 3 @available ? :
406 1 2 if $self->{'scope'}{'pagi.request.body.read'}
407 0 2 if $self->{'scope'}{'pagi.request.body.stream.created'}
412 0 2 defined $max_bytes ? :
413 2 0 unless (defined $max_bytes)
415 0 2 if (defined $cl)
435 2 4 if $self->{'scope'}{'pagi.request.body.read'} or $self->{'scope'}{'pagi.request.body.stream.created'}
436 1 3 unless $self->is_multipart
440 3 0 if defined $boundary
441 0 3 unless defined $boundary and length $boundary
449 0 15 defined $opts{$_} ? :
459 1 12 if $self->{'scope'}{'pagi.request.body.stream.created'}
462 1 11 if $self->{'scope'}{'pagi.request.body.read'}
465 0 11 unless $receive
470 0 13 unless $message and $message->{'type'}
471 1 12 if $message->{'type'} eq "http.disconnect"
474 10 2 unless $message->{'more'}
487 0 1 if %opts
510 0 48 if exists $opts{$key}
512 0 8 if %opts
514 0 8 $strict ? :
0 8 $raw ? :
517 1 7 if $self->{'scope'}{$cache_key}
520 3 4 if ($self->is_multipart)
532 0 6 unless length $part
542 0 6 $raw ? :
543 0 6 $raw ? :
590 1 5 if $self->{'scope'}{'pagi.request.body.stream.created'}
594 0 0 if $self->{'scope'}{'pagi.request.form'} and $self->{'scope'}{'pagi.request.uploads'}
599 5 0 if $boundary
601 0 5 unless $boundary
627 1 3 if $self->{'scope'}{'pagi.request.uploads'}
629 3 0 if ($self->is_multipart)