Branch Coverage

blib/lib/HTTP/Headers/Fast.pm
Criterion Covered Total %
branch 147 190 77.3


line true false branch
67 17 12 if @_
74 4 1 $proto eq $klass || $klass eq 'HTTP::Headers' ? :
79 1 67 unless @_
82 30 37 if (@_ == 1) { }
21 16 elsif (@_ == 2) { }
90 7 49 if ($seen{lc $field}++) { }
97 8 59 if wantarray
98 51 8 if @old <= 1
110 6 0 if (@_ == 2) { }
112 5 1 unless $field =~ /^:/
115 1 5 if (not defined $h) { }
3 2 elsif (ref $h ne 'ARRAY') { }
123 5 1 ref $val ne 'ARRAY' ? :
126 0 0 unless $field =~ /^:/
129 0 0 if (not defined $h) { }
0 0 elsif (ref $h ne 'ARRAY') { }
137 0 0 ref $val ne 'ARRAY' ? :
144 1 4 if @_ != 3
153 20 1 if not $field =~ /^:/ and $TRANSLATE_UNDERSCORE
155 4 13 ref $v eq 'ARRAY' ? :
17 4 if defined $v
162 1 2 unless (defined wantarray)
180 142 6 if $TRANSLATE_UNDERSCORE
181 74 74 if (my $cache = $field_name{$field})
187 34 40 unless (defined $standard_case{$field})
199 28 13 unless $skip_standardize or $field =~ /^:/
202 23 9 defined $h ? :
9 32 ref $h eq 'ARRAY' ? :
208 84 1 unless $field =~ /^:/
211 7 76 defined $h ? :
2 83 ref $h eq 'ARRAY' ? :
212 84 1 if (defined $val) { }
213 0 84 if (ref $val eq 'ARRAY' and scalar @$val == 1)
226 7 0 unless $field =~ /^:/
229 3 4 if (ref $h eq 'ARRAY') { }
4 0 elsif (defined $h) { }
231 3 0 ref $val ne 'ARRAY' ? :
234 4 0 ref $val ne 'ARRAY' ? :
237 0 0 ref $val ne 'ARRAY' ? :
245 24 0 unless $field =~ /^:/
247 6 14 defined $val ? :
250 16 8 defined $h ? :
0 24 ref $h eq 'ARRAY' ? :
252 8 2 unless ($op == $OP_GET or $op == $OP_INIT and @old)
253 8 0 if (defined $val) { }
0 0 elsif ($op != $OP_PUSH) { }
254 0 8 $op == $OP_PUSH ? :
255 7 1 if (ref $val ne 'ARRAY') { }
261 1 7 @new > 1 ? :
273 0 180 unless ($header_order{$a} || 999) <=> ($header_order{$b} || 999)
280 6 2 if wantarray
288 0 12 if substr($key, 0, 1) eq '_'
290 3 9 if (ref $vals eq 'ARRAY') { }
317 0 114 if index($key, '_') == 0
319 7 107 if (ref $vals eq 'ARRAY') { }
323 0 16 if (index($val, "\n") >= 0)
331 10 97 if (index($vals, "\n") >= 0)
343 25 2 unless defined $endl
349 1 0 unless defined $endl
358 0 19 if substr($key, 0, 1) eq '_'
360 3 16 if (ref $vals eq 'ARRAY') { }
388 1 11 unless ($storable_required)
400 5 11 if (defined $time) { }
405 6 10 if defined $old
429 9 20 if @_
430 0 29 if ref $ct eq 'ARRAY'
431 5 24 unless defined $ct and length $ct
437 2 22 wantarray ? :
443 0 2 if ref $h
444 1 1 unless defined $h
446 1 1 if (@v)
449 1 0 if ($ct)
453 1 0 if ($charset)
456 0 1 if $charset eq ''
458 0 1 if wantarray
461 0 1 if wantarray
472 2 1 if (s/^\s*(=*[^\s=;,]+)//) { }
0 1 elsif (s/^\s*,//) { }
1 0 elsif (s/^\s*;// or s/^\s+//) { }
475 1 1 if (s/^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"//) { }
0 1 elsif (s/^\s*=\s*([^;,\s]*)//) { }
492 0 0 if @cur
502 1 1 if @cur
531 0 3 if $ct eq 'text/xml'
532 0 3 if $ct eq 'application/xml'
533 1 2 if $ct =~ /\+xml$/
539 2 6 if (@_ and $_[0] =~ /#/)
543 1 1 if (ref $uri) { }
561 10 14 if (@_) { }
565 0 14 ref $h eq 'ARRAY' ? :
579 4 5 if (defined $user)
580 1 3 if $user =~ /:/
582 1 2 unless defined $passwd
586 5 3 if (defined $old and $old =~ s/^\s*Basic\s+//)
588 2 3 unless wantarray