Condition Coverage

blib/lib/Mojolicious/Plugin/RenderFile.pm
Criterion Covered Total %
condition 23 31 74.1


and 3 conditions

line !l l&&!r l&&r condition
19 7 1 5 $args{'filename'} and not utf8::is_utf8($args{'filename'})
20 4 2 7 $args{'filepath'} and not utf8::is_utf8($args{'filepath'})
35 0 0 9 -f $filepath and -r $filepath
69 0 1 4 $range =~ /^bytes=(\d+)-(\d+)?/ and $1 <= $end
71 2 0 2 defined $2 and $2 <= $end

or 2 conditions

line l !l condition
23 1 12 $args{'status'} || 200
24 1 12 $args{'content_disposition'} || 'attachment'
25 0 13 $args{'cleanup'} // 0
30 1 12 $content_type ||= 'application/x-download'
44 1 0 $c->req->url->path->parts->[-1] || 'download'

or 3 conditions

line l !l&&r !l&&!r condition
40 3 6 0 $filename ||= fileparse($filepath)
44 3 1 0 $filename ||= $c->req->url->path->parts->[-1] || 'download'