Condition Coverage

blib/lib/Mojolicious/Static.pm
Criterion Covered Total %
condition 40 47 85.1


and 3 conditions

line !l l&&!r l&&r condition
48 26 38 7 $c->app->mode eq "development" and index($canon_path, $self->asset_dir) == 0
96 5 12 4 $match and not grep({"W/$_" eq $etag unless $_ eq $etag;} map({trim($_);} split(/,/u, $match, 0)))
99 10 1 6 $last //= $res_headers->last_modified and $since
136 1 4 11 defined $2 && $2 < $size
190 813 0 60 -f $path && -r _

or 2 conditions

line l !l condition
24 20 0 $self->{'assets'} //= {}
95 6 1 $res_headers->etag // ""
100 6 0 _epoch($since) // 0
136 16 0 $1 // 0

or 3 conditions

line l !l&&r !l&&!r condition
25 12 8 0 $assets->{$asset} // $asset
34 914 24 155 $method eq "GET" or $method eq "HEAD"
44 8 776 71 $canon_path =~ m[^\.\./|\\]u or not $self->serve($c, $canon_path)
92 6 15 80 my $since = $req_headers->if_modified_since or $match
95 14 7 0 $etag //= $res_headers->etag // ""
99 6 1 10 $last //= $res_headers->last_modified
168 220 44 0 not exists $assets->{$short} or $checksum eq "development"
179 709 3 96 not $rel =~ /\.\w+$/u or $rel =~ /\.\w+\.\w+$/u