Branch Coverage

blib/lib/Catalyst/Response.pm
Criterion Covered Total %
branch 47 58 81.0


line true false branch
47 5 12 unless $self->finalized_headers
80 0 921 if $self->_has_write_fh
81 0 921 if ($self->_has_writer)
136 12 19 unless $self->finalized_headers
138 3 28 unless defined $buffer
140 18 13 if ($self->encodable_response)
154 0 3 unless $self->finalized_headers
156 0 3 unless defined $buffer
171 1 43 if (&blessed($psgi_res) and $psgi_res->can("as_psgi"))
174 36 8 if (ref $psgi_res eq 'ARRAY') { }
8 0 elsif (ref $psgi_res eq 'CODE') { }
179 36 0 if (defined $body)
180 35 1 ref $body eq 'ARRAY' ? :
196 5 3 if (defined $maybe_body) { }
198 5 0 ref $maybe_body eq 'ARRAY' ? :
214 1 43 if (not $self->finalized_headers and $self->content_type_charset)
466 14 920 if (@_)
470 4 10 if (&blessed($location) and $location->can("as_string"))
671 7 949 unless $self->_context
672 32 917 unless $self->_context->encoding
679 72 845 if (my $charset = $self->content_type_charset)
680 2 70 uc $charset ne uc $self->_context->encoding->mime_name ? :
684 247 670 $self->content_type =~ /${\$self->encodable_content_type;}/ ? :
687 916 1 !$self->content_encoding || $self->content_encoding eq 'identity' ? :
691 244 673 if ($encodable_content_type and not $has_manual_charset and $allowed_content_encoding) { }
717 0 3 unless defined $self->write($data)
720 0 3 unless defined $self->write($,)
721 0 3 unless defined $self->write($_)
723 0 3 unless defined $self->write($\)