Branch Coverage

blib/lib/PAGI/Response.pm
Criterion Covered Total %
branch 101 112 90.1


line true false branch
791 1 114 unless $scope and ref $scope eq "HASH"
792 1 113 unless $send
793 1 112 unless ref $send eq "CODE"
808 91 21 if @_ == 1
809 2 18 unless $code =~ /^\d+$/ and $code >= 100 and $code <= 599
817 1 1 if exists $self->{'_status'}
823 0 58 unless defined $name
824 2 56 if (@_ == 2)
828 2 0 if lc $pair->[0] eq $key
834 56 0 if length $key
835 1 55 if ($key eq "content-type")
848 0 1 unless defined $name
852 1 0 if lc $pair->[0] eq $key
859 1 1 if $self->has_header($name)
865 2 63 if @_ == 1
876 1 1 if exists $self->{'_content_type'}
882 1 1 exists $self->{'_status'} ? :
888 0 4 unless length $key
889 2 2 $self->{'_header_set'}{$key} ? :
894 1 1 exists $self->{'_content_type'} ? :
902 3 3 $self->{'scope'}{'pagi.response.sent'} ? :
907 3 90 if $self->{'scope'}{'pagi.response.sent'}
937 25 8 if (lc $h->[0] eq "content-type")
939 0 25 unless ($h->[1] =~ /charset=/i)
945 1 25 unless ($has_ct)
985 3 3 unless (exists $self->{'_status'})
995 2 4 if defined $opts{'max_age'}
996 0 6 if defined $opts{'expires'}
997 2 4 if defined $opts{'path'}
998 1 5 if defined $opts{'domain'}
999 1 5 if $opts{'secure'}
1000 2 4 if $opts{'httponly'}
1001 1 5 if defined $opts{'samesite'}
1030 1 7 if ($origin eq '*' and $credentials) { }
1041 3 5 if ($credentials)
1045 2 6 if (@$expose)
1050 2 6 if ($preflight)
1075 2 13 unless $writer->is_closed
1121 1 11 unless -f $path
1122 0 11 unless -r $path
1132 1 10 if $offset < 0
1133 1 9 if $offset > $file_size
1137 3 6 if (defined $length) { }
1138 1 2 if $length < 0
1139 1 1 if $length > $max_length
1146 8 0 unless ($has_ct)
1155 1 7 if ($opts{'inline'}) { }
2 5 elsif ($opts{'filename'}) { }
1163 3 5 if $disposition
1181 3 5 if $offset > 0
1182 1 7 if $length < $max_length
1203 1 18 if $opts{'on_close'}
1209 2 16 if $self->{'closed'}
1220 0 17 if $self->{'closed'}
1230 2 12 if (builtin::blessed($r) and $r->isa("Future"))
1234 2 13 if ($@)