Branch Coverage

blib/lib/PAGI/Response.pm
Criterion Covered Total %
branch 95 108 87.9


line true false branch
710 1 86 unless $scope and ref $scope eq "HASH"
711 1 85 unless $send
712 1 84 unless ref $send eq "CODE"
727 62 16 if @_ == 1
728 2 13 unless $code =~ /^\d+$/ and $code >= 100 and $code <= 599
736 1 1 if exists $self->{'_status'}
742 0 54 unless defined $name
743 2 52 if (@_ == 2)
747 2 0 if lc $pair->[0] eq $key
753 52 0 if length $key
754 1 51 if ($key eq "content-type")
767 0 1 unless defined $name
771 1 0 if lc $pair->[0] eq $key
778 1 1 if $self->has_header($name)
784 2 49 if @_ == 1
795 1 1 if exists $self->{'_content_type'}
801 1 1 exists $self->{'_status'} ? :
807 0 4 unless length $key
808 2 2 $self->{'_header_set'}{$key} ? :
813 1 1 exists $self->{'_content_type'} ? :
829 0 10 unless $self->{'scope'}
835 3 3 $self->{'scope'}{'pagi.response.sent'} ? :
840 2 61 if $self->{'scope'}{'pagi.response.sent'}
870 16 6 if (lc $h->[0] eq "content-type")
872 0 16 unless ($h->[1] =~ /charset=/i)
878 1 16 unless ($has_ct)
918 2 3 unless (exists $self->{'_status'})
928 2 4 if defined $opts{'max_age'}
929 0 6 if defined $opts{'expires'}
930 2 4 if defined $opts{'path'}
931 1 5 if defined $opts{'domain'}
932 1 5 if $opts{'secure'}
933 2 4 if $opts{'httponly'}
934 1 5 if defined $opts{'samesite'}
963 1 7 if ($origin eq '*' and $credentials) { }
974 3 5 if ($credentials)
978 2 6 if (@$expose)
983 2 6 if ($preflight)
1008 1 2 unless $writer->{'closed'}
1040 1 11 unless -f $path
1041 0 11 unless -r $path
1051 1 10 if $offset < 0
1052 1 9 if $offset > $file_size
1056 3 6 if (defined $length) { }
1057 1 2 if $length < 0
1058 1 1 if $length > $max_length
1065 8 0 unless ($has_ct)
1074 1 7 if ($opts{'inline'}) { }
2 5 elsif ($opts{'filename'}) { }
1082 3 5 if $disposition
1100 3 5 if $offset > 0
1101 1 7 if $length < $max_length
1124 0 7 if $self->{'closed'}
1135 0 3 if $self->{'closed'}