Branch Coverage

blib/lib/Plack/Middleware/Expires.pm
Criterion Covered Total %
branch 38 50 76.0


line true false branch
16 0 46 unless defined $access
29 9 37 if ($expires and $expires =~ /^(A|M)(\d+)$/) { }
36 1 elsif ($expires and $expires =~ /^(access|now|modification)\s(?:plus)\s(.+)$/) { }
30 1 8 $1 eq 'M' ? :
31 0 9 unless defined $base
35 16 20 $1 eq 'modification' ? :
36 1 35 unless defined $base
42 0 38 unless defined $type
43 1 37 unless exists $term{$sigular_type}
45 1 36 unless ($num =~ /^\d/)
57 1 41 if $expires_sec > 2147483647
63 5 0 if (my $expires = $self->expires)
78 0 4 unless $self->expires
80 0 4 unless defined $type_match
81 1 3 ref $type_match && ref $type_match eq 'ARRAY' ? :
84 0 4 if &HTTP::Status::is_error($$res[0])
87 1 3 if Plack::Util::header_exists($$res[1], 'Expires')
91 0 3 unless defined $type
94 3 1 if (my $ref = ref $_) { }
95 1 2 if ($ref eq 'Regexp' and $type =~ /$_/) { }
1 1 elsif ($ref eq 'CODE') { }
105 1 0 if (lc $type eq lc $_)
111 0 3 unless $type_check
114 0 3 if ($last_modified = Plack::Util::header_get($$res[1], 'Last-Modified'))
121 0 3 if (my $cc = Plack::Util::header_get($$res[1], 'Cache-Control')) { }