Branch Coverage

blib/lib/PAGI/Request.pm
Criterion Covered Total %
branch 72 102 70.5


line true false branch
31 13 0 if exists $CONFIG{$key}
61 0 40 unless defined $str
70 0 41 unless defined $str
71 0 41 $strict ? :
103 50 33 if (lc $pair->[0] eq $name)
113 13 5 if $self->{'scope'}{'pagi.request.headers'}
136 0 15 if %opts
138 0 15 $strict ? :
0 15 $raw ? :
139 6 9 if $self->{'scope'}{$cache_key}
145 0 14 unless length $part
155 0 14 $raw ? :
156 0 14 $raw ? :
200 3 4 if exists $self->{'scope'}{'pagi.request.cookies'}
239 2 10 unless $conn
254 1 12 unless $conn
262 4 3 if $conn
270 1 3 unless $conn
316 1 2 if ($auth =~ /^Bearer\s+(.+)$/i)
326 2 1 if ($auth =~ /^Basic\s+(.+)$/i)
339 2 7 if (not defined $params and $CONFIG{'path_param_strict'})
350 6 19 exists $opts{'strict'} ? :
351 0 25 if %opts
355 7 17 if ($strict and not exists $params->{$name})
357 5 2 @available ? :
377 1 2 if $self->{'scope'}{'pagi.request.body.read'}
378 0 2 if $self->{'scope'}{'pagi.request.body.stream.created'}
383 0 2 defined $max_bytes ? :
384 2 0 unless (defined $max_bytes)
386 0 2 if (defined $cl)
406 1 12 if $self->{'scope'}{'pagi.request.body.stream.created'}
409 1 11 if $self->{'scope'}{'pagi.request.body.read'}
412 0 11 unless $receive
417 0 13 unless $message and $message->{'type'}
418 1 12 if $message->{'type'} eq "http.disconnect"
421 10 2 unless $message->{'more'}
434 0 1 if %opts
457 0 36 if exists $opts{$key}
459 0 6 if %opts
461 0 6 $strict ? :
0 6 $raw ? :
464 1 5 if $self->{'scope'}{$cache_key}
467 1 4 if ($self->is_multipart)
479 0 6 unless length $part
489 0 6 $raw ? :
490 0 6 $raw ? :
538 0 0 if $self->{'scope'}{'pagi.request.form'} and $self->{'scope'}{'pagi.request.uploads'}
543 4 0 if $boundary
545 0 4 unless $boundary
571 1 3 if $self->{'scope'}{'pagi.request.uploads'}
573 3 0 if ($self->is_multipart)