Branch Coverage

lib/PAGI/Middleware/XSendfile.pm
Criterion Covered Total %
branch 29 34 85.2


line true false branch
269 1 15 unless my $type = $config->{'type'}
273 1 14 unless $VALID_TYPES{$type}
287 1 13 if ($scope->{'type'} ne "http")
298 13 14 if ($type eq "http.response.start")
304 14 0 if ($type eq "http.response.body")
310 8 6 if (defined $path and not $is_partial)
319 1 7 if ($self->{'variation'})
340 5 1 if ($pending_start)
350 0 13 if ($pending_start)
360 9 5 if defined $event->{'file'}
363 2 3 if (my $fh = $event->{'fh'})
364 1 1 if (builtin::blessed($fh) and $fh->can("path"))
366 1 0 if defined $path and length $path
379 6 2 unless defined $mapping
382 1 1 unless (ref $mapping)
387 1 0 if (ref $mapping eq "HASH")
389 1 0 if (substr($path, 0, length $from) eq $from)