Branch Coverage

blib/lib/HTTP/Lite.pm
Criterion Covered Total %
branch 0 182 0.0


line true false branch
67 0 0 if (defined $val)
78 0 0 if (defined $val)
95 0 0 if ($$self{'DEBUG'})
134 0 0 if (defined $cbargs)
146 0 0 if ($protocol ne 'http')
156 0 0 unless $port
159 0 0 $connecthost ? :
161 0 0 $connectport ? :
163 0 0 unless ($addr)
167 0 0 if ($connecthost ne $host)
176 0 0 if (defined $$self{'local_addr'})
178 0 0 if ($local_addr eq '0.0.0.0' or $local_addr eq '0') { }
184 0 0 if (defined $$self{'local_port'})
188 0 0 unless bind FH, $paddr
191 0 0 unless connect FH, $sin
193 0 0 if ($^O ne 'MSWin32')
197 0 0 if (defined $callback_func)
201 0 0 if ($$self{'header_at_once'})
206 0 0 if ($$self{'HTTP11'}) { }
215 0 0 if ($port != 80) { }
220 0 0 unless (defined $self->get_req_header('Accept'))
224 0 0 if ($method eq 'POST')
240 0 0 if (defined $$self{'content'})
244 0 0 if (defined $callback_func)
246 0 0 if (defined $ncontent_length)
251 0 0 if ($content_length)
255 0 0 if (defined $callback_func)
261 0 0 if ($$self{'header_at_once'})
267 0 0 if (defined $callback_func)
275 0 0 if (not $content_out and defined $$self{'content'})
280 0 0 if (defined $callback_func)
295 0 0 if $$self{'DEBUG'}
297 0 0 if ($$self{'DEBUG'})
306 0 0 if ($line == 1)
309 0 0 if $$self{'DEBUG'}
315 0 0 if ($headmode || $chunkmode eq 'entity-header' and $$data =~ /^[\r\n]*$/)
317 0 0 if ($chunkmode)
325 0 0 if (defined $te)
327 0 0 if ($header =~ /chunked/i)
334 0 0 if ($headmode or $chunkmode eq 'entity-header') { }
0 0 elsif ($chunkmode) { }
337 0 0 if (defined $var)
344 0 0 if (not ref $hr) { }
356 0 0 if ($chunkmode eq 'chunksize') { }
0 0 elsif ($chunkmode eq 'chunk') { }
0 0 elsif ($chunkmode eq 'ignorecrlf') { }
362 0 0 if (length $chunksize > 0) { }
364 0 0 unless ($chunksize =~ /^[a-f0-9]+$/i)
365 0 0 if $$self{'DEBUG'}
368 0 0 if $$self{'DEBUG'}
369 0 0 if ($chunksize == 0) { }
377 0 0 if $$self{'DEBUG'}
383 0 0 if ($chunklength >= $chunksize)
386 0 0 if ($chunklength > $chunksize) { }
0 0 elsif ($chunklength == $chunksize and not $chunk =~ /$CRLF$/) { }
408 0 0 if (defined $callback_func)
423 0 0 if (not defined $data_callback || defined $callback_func) { }
424 0 0 if $$self{'DEBUG'}
428 0 0 if (defined $callback_func) { }
433 0 0 if ($$self{'DEBUG'})
435 0 0 if (ref $newdata eq 'SCALAR')
439 0 0 if (defined $newdata and ref $newdata eq 'SCALAR')
450 0 0 unless defined $value
452 0 0 if $$self{'DEBUG'}
471 0 0 if ($exists = defined ${$$self{'headers'};}{lc $header})
520 0 0 unless ($host)
587 0 0 if ($body) { }
595 0 0 unless defined $$self{'headers'}{'Content-Type'} and $$self{'headers'}{'Content-Type'}
606 0 0 if ($$self{'holdback'}) { }
610 0 0 if (defined $$self{'HTTPWriteBuffer'})
620 0 0 unless defined $nbytes or $!{'EAGAIN'}
630 0 0 if $$self{'DEBUG'}
633 0 0 if ($headmode == 0 and $chunkmode eq '0' or $chunkmode eq 'chunk') { }
634 0 0 $chunksize < $BLOCKSIZE ? :
0 0 $chunkmode eq 'chunk' ? :
641 0 0 if ($res)
642 0 0 if ($$self{'DEBUG'})
658 0 0 if $$self{'DEBUG'}
667 0 0 if ($nfound == 0) { }
674 0 0 if $$self{'DEBUG'}
677 0 0 if ($chars <= 0 and not $!{'EAGAIN'})
688 0 0 if ($nlat > -1) { }
698 0 0 length $newline ? :
707 0 0 if $$self{'DEBUG'}
716 0 0 if ($nfound == 0) { }
723 0 0 if $$self{'DEBUG'}
726 0 0 if ($chars <= 0 and not $!{'EAGAIN'})
735 0 0 if (($buflen = length $$self{'HTTPReadBuffer'}) >= $bytes) { }
738 0 0 if ($bytes + 1 < $buflen) { }
747 0 0 length $newline ? :
753 0 0 if (defined $str) { }