Condition Coverage

blib/lib/Mojolicious/Static.pm
Criterion Covered Total %
condition 42 47 89.3


and 3 conditions

line !l l&&!r l&&r condition
48 27 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 751 0 62 -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 15 1 $1 // 0

or 3 conditions

line l !l&&r !l&&!r condition
25 12 8 0 $assets->{$asset} // $asset
34 864 10 153 $method eq "GET" or $method eq "HEAD"
44 8 712 72 $canon_path =~ m[^\.\./|\\]u or not $self->serve($c, $canon_path)
92 6 15 81 my $since = $req_headers->if_modified_since or $match
95 14 6 1 $etag //= $res_headers->etag // ""
99 6 1 10 $last //= $res_headers->last_modified
168 210 42 0 not exists $assets->{$short} or $checksum eq "development"
179 645 3 98 not $rel =~ /\.\w+$/u or $rel =~ /\.\w+\.\w+$/u