Branch Coverage

blib/lib/HTTP/Headers.pm
Criterion Covered Total %
branch 118 130 90.7


line true false branch
71 67 136 if @_
79 1 511 unless @_
84 4 231 $seen{lc $field}++ ? :
235 335 @_ ? :
87 60 449 if wantarray
88 443 6 if @old <= 1
102 132 1 if @_ == 2
111 1 4 if @_ != 3
122 82 1 if not $field =~ /^:/ and $TRANSLATE_UNDERSCORE
124 8 34 ref $v eq 'ARRAY' ? :
42 42 if defined $v
132 5 4 unless (defined wantarray)
142 2 2 if (exists $self->{'::std_case'})
153 2 958 if rindex($field, ":") > 1 or not length $field
156 946 12 unless ($field =~ /^:/)
157 911 35 if $TRANSLATE_UNDERSCORE
160 124 118 unless ($standard_case{$field} or $self->{'::std_case'}{$field})
167 45 205 defined $val ? :
168 134 824 if ($op eq "PUSH_H")
170 23 111 if (exists $self->{$field})
172 3 20 if (ref $h eq 'ARRAY') { }
173 1 2 ref $val eq 'ARRAY' ? :
176 1 19 ref $val eq 'ARRAY' ? :
185 337 463 defined $h ? :
24 800 ref $h eq 'ARRAY' ? :
187 281 2 unless ($op eq "GET" or $op eq "INIT" and @old)
188 280 1 if (defined $val) { }
1 0 elsif ($op ne 'PUSH') { }
189 4 276 $op eq 'PUSH' ? :
190 272 8 if (ref $val ne 'ARRAY') { }
196 12 268 @new > 1 ? :
210 0 271 unless ($header_order{$a} || 999) <=> ($header_order{$b} || 999)
218 10 5 if wantarray
230 15 78 if (ref $vals eq 'ARRAY') { }
258 47 79 unless defined $endl
262 0 219 if index($key, "_") == 0
264 14 205 if (ref $vals eq 'ARRAY') { }
266 0 35 unless defined $val
269 0 35 if (index($val, "\n") >= 0)
276 0 205 unless defined $vals
279 13 192 if (index($vals, "\n") >= 0)
319 17 117 if (defined $time)
322 57 77 if defined $old
347 37 385 if @_
348 0 422 if ref $ct eq "ARRAY"
349 41 381 unless defined $ct and length $ct
355 2 379 wantarray ? :
362 0 92 if ref $h
363 2 90 unless defined $h
365 90 2 if (@v)
368 90 0 if ($ct)
372 16 74 if ($charset)
375 0 16 if $charset eq ""
377 0 90 if wantarray
380 0 2 if wantarray
402 1 83 if $ct eq "text/xml"
403 44 39 if $ct eq "application/xml"
404 2 37 if $ct =~ /\+xml$/
410 2 7 if (@_ and $_[0] =~ /#/)
413 1 1 if (ref $uri) { }
450 5 6 if (defined $user)
451 1 4 if $user =~ /:/
453 1 3 unless defined $passwd
457 6 4 if (defined $old and $old =~ s/^\s*Basic\s+//)
459 2 4 unless wantarray