Branch Coverage

blib/lib/HTTP/Request/Common.pm
Criterion Covered Total %
branch 72 86 83.7


line true false branch
36 8 14 if @_ and ref $_[0]
39 11 15 if (lc $k eq 'content') { }
47 11 11 $ct ? :
54 14 8 if (ref $content)
55 7 7 if ($ct =~ m[^multipart/form-data\s*(;|$)]i) { }
58 0 7 if @v > 1
65 1 7 if ($k eq "boundary")
74 1 6 if ($boundary_index) { }
88 4 3 ref $content eq 'HASH' ? :
94 17 5 if (defined $content) { }
95 16 1 unless ref $content
113 2 3 if (lc $k eq 'content') { }
121 1 4 if ($content and not defined $req->header("Content-Length"))
131 0 7 ref $data eq 'HASH' ? :
135 12 4 if (not ref $v) { }
143 3 1 unless (defined $usename)
145 2 1 if defined $usename
149 3 1 if (defined $usename and length $usename)
155 2 2 if ($file)
156 0 2 unless open my $fh, "<", $file
158 1 1 if ($DYNAMIC_FILE_UPLOAD) { }
169 2 0 unless ($h->header("Content-Type"))
174 0 4 if ($h->header("Content-Disposition"))
179 2 2 if ($h->header("Content"))
186 1 3 if (ref $content) { }
195 1 6 unless @parts
198 1 5 if ($fhparts) { }
199 1 0 unless $boundary
212 1 10 if (ref $_) { }
215 0 1 unless (-f $f and $file_size = -s _)
230 1 0 if $length
235 1 7 unless (@parts)
236 0 1 if defined $length and $length != 0
241 2 5 unless (ref $p)
243 2 0 if defined $length
247 1 4 unless (ref $fh)
250 0 1 unless open $fh, "<", $file
255 4 1 if ($n) { }
262 4 1 if ($buflength)
263 4 0 if defined $length
271 4 1 unless $boundary
277 0 11 if (index($_, $boundary) != -1)
290 6 0 wantarray ? :