Branch Coverage

blib/lib/Dancer2/Core/Response.pm
Criterion Covered Total %
branch 26 36 72.2


line true false branch
112 2 8 if @_ > 1
162 9 568 if $self->is_encoded
168 0 568 unless $ct =~ /^text/
170 567 1 if not defined $charset and $self->has_charset
172 1 567 if (not defined $charset or $charset eq "")
173 1 0 unless utf8::is_utf8($content)
175 0 0 if $self->strict_utf8
177 0 0 unless ($WARNED_NO_CHARSET)
179 0 0 if ($self->has_log_cb) { }
190 34 533 unless $content
192 533 0 unless $ct =~ /charset/
225 1 643 if Plack::Util::status_with_no_entity_body($status)
233 32 611 unless defined $content
235 620 23 if (not $headers->header('Content-Length') || $headers->header('Transfer-Encoding') and defined(my $content_length = length $content))
242 3 640 unless $self->content_type
250 1192 1213 if (scalar @_ > 0) { }
298 0 79 unless my $serializer = $self->serializer
301 1 78 unless $content = $serializer->serialize($content)