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
47 27 33 7 $c->app->mode eq "development" and index($canon_path, $self->asset_dir) == 0
88 5 12 4 $match and not grep({"W/$_" eq $etag unless $_ eq $etag;} map({trim($_);} split(/,/u, $match, 0)))
91 10 1 6 $last //= $res_headers->last_modified and $since
121 1 4 10 defined $2 && $2 < $size
175 746 0 59 -f $path && -r _

or 2 conditions

line l !l condition
23 14 0 $self->{'assets'} //= {}
87 6 1 $res_headers->etag // ""
92 6 0 _epoch($since) // 0
121 14 1 $1 // 0

or 3 conditions

line l !l&&r !l&&!r condition
24 10 4 0 $assets->{$asset} // $asset
33 852 10 153 $method eq "GET" or $method eq "HEAD"
43 8 705 67 $canon_path =~ m[^\.\./|\\]u or not $self->serve($c, $canon_path)
84 6 15 76 my $since = $req_headers->if_modified_since or $match
87 14 6 1 $etag //= $res_headers->etag // ""
91 6 1 10 $last //= $res_headers->last_modified
153 205 41 0 not exists $assets->{$short} or $checksum eq "development"
164 643 3 95 not $rel =~ /\.\w+$/u or $rel =~ /\.\w+\.\w+$/u