Branch Coverage

blib/lib/Mojolicious/Plugin/AppCacheManifest.pm
Criterion Covered Total %
branch 25 36 69.4


line true false branch
15 0 3 ref $extension ? :
32 0 12 $$stash{'path'} ? :
38 0 12 if @$parts == 0 or $$parts[0] eq '..'
41 0 12 unless ($path =~ /$redir/)
43 0 0 unless $static->serve($c, join('/', @$parts))
59 6 6 if (my $date = $req->headers->if_modified_since)
60 3 3 if $last_modified eq 'Mojo::Date'->new($date)
68 9 3 if $code == 200
86 2 4 if exists $CACHE{$path} and $CACHE{$path}[0] >= $mtime and $CACHE{$path}[1] + $timeout > $time
97 2 8 if $timeout > 0
108 0 10 unless $body =~ s/\A CACHE [ ] MANIFEST [ \t\r\n] \s* //sx
122 0 40 unless exists $HEADERS{$header}
130 7 0 /\A (\S+) \s+ (\S+) /x && !$seen{join $;, $header, $1, $2}++ ? :
76 0 !$seen{join $;, $header, $_}++ ? :
7 76 $header eq 'FALLBACK' ? :
159 1 60 if $mtime > $maxmtime
174 10 0 if $$manifest{'CACHE'}
178 7 3 if $$manifest{'FALLBACK'}