Branch Coverage

blib/lib/Mojolicious/Plugin/SecurityHeader.pm
Criterion Covered Total %
branch 47 60 78.3


line true false branch
10 0 38 unless ref $headers
11 1 37 if 'ARRAY' ne ref $headers
60 0 37 unless $headers
61 40 33 if ($valid_headers{$header}) { }
33 0 elsif ($last_header) { }
62 3 37 if ($last_header)
72 33 0 if ($values{$last_header})
75 21 12 if ($ref eq 'CODE') { }
12 0 elsif ($ref eq 'ARRAY') { }
81 2 10 unless $header_value
87 35 2 if $last_header
103 5 1 if (ref $value)
104 0 5 unless $value
118 3 4 if (ref $value)
122 1 2 unless $options->{$option}
125 2 5 if $option
127 2 5 if $value == -1
128 0 5 if $value < 0
129 1 4 if $value ne int $value
138 0 4 unless defined $value
139 2 2 if $allowed{$value}
140 1 1 unless ref $value
142 0 1 if ref $value and not $value->{'ALLOW-FROM'}
149 2 2 unless (ref $value)
150 1 1 if $value ne '1' and $value ne '0'
151 1 0 if $value eq '0' or $value eq '1'
154 2 0 if (ref $value and $value->{'value'} eq '1')
157 1 1 if ($value->{'mode'} and $value->{'mode'} eq 'block') { }
1 0 elsif ($value->{'report'}) { }
164 2 0 if $option