Condition Coverage

blib/lib/Mojolicious/Plugin/RenderFile.pm
Criterion Covered Total %
condition 26 37 70.2


and 3 conditions

line !l l&&!r l&&r condition
19 7 1 6 $args{'filename'} and not utf8::is_utf8($args{'filename'})
20 5 2 7 $args{'filepath'} and not utf8::is_utf8($args{'filepath'})
29 13 1 0 $args{'format'} and $args{'content_type'}
38 0 0 9 -f $filepath and -r $filepath
72 0 1 5 $range =~ /^bytes=(\d+)-(\d+)?/ and $1 <= $end
74 2 0 3 defined $2 and $2 <= $end

or 2 conditions

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

or 3 conditions

line l !l&&r !l&&!r condition
32 0 1 0 $content_type ||= $c->app->types->type($args{'format'})
43 3 6 0 $filename ||= fileparse($filepath)
47 4 1 0 $filename ||= $c->req->url->path->parts->[-1] || 'download'