Branch Coverage

blib/lib/Perlbal/Test/WebClient.pm
Criterion Covered Total %
branch 40 58 68.9


line true false branch
30 11 0 if (@_) { }
41 0 0 if (@_) { }
52 11 0 if (@_) { }
62 13 0 if (@_)
63 9 4 shift() ? :
71 0 136 unless $$self{'server'}
73 95 41 ref $_[0] eq 'HASH' ? :
81 0 136 if %$opts
84 0 136 unless $cmds
88 131 5 if ($$self{'keepalive'}) { }
94 5 131 if ($opt_headers)
98 17 119 if (my $hostname = $opt_host || $$self{'host'})
104 74 62 if ($opt_content)
109 36 100 if ($opt_extra_rn)
115 100 36 unless ($opt_post_header_pause)
124 0 136 unless $Perlbal::Test::WebClient::FLAG_NOSIGNAL
127 123 13 if ($sock)
129 0 123 if ($! or not defined $rv) { }
0 123 elsif ($rv != $len) { }
137 13 123 unless ($rv)
140 0 13 unless $sock = 'IO::Socket::INET'->new('PeerAddr', $$self{'server'}, 'Timeout', 3)
144 0 13 unless setsockopt $sock, 6, 1, "\cA\000\000\000"
147 0 13 if ($! or $rv != $len)
152 36 100 if ($opt_post_header_pause)
155 36 0 if ($len)
157 0 36 if ($! or not defined $rv) { }
0 36 elsif ($rv != $len) { }
169 130 6 if ($firstline =~ m[\bHTTP/1\.1\b] and not $conhdr =~ /\bclose\b/i or $firstline =~ m[\bHTTP/1\.0\b] and $conhdr =~ /\bkeep-alive\b/i) { }
180 0 136 if ($opt_return_reader) { }