Branch Coverage

blib/lib/MogileFS/Connection/HTTP.pm
Criterion Covered Total %
branch 28 52 53.8


line true false branch
22 0 10 unless my $sock = 'Net::HTTP::NB'->new(%opts)
24 10 0 unless ref $self
37 1 15 if $err
46 0 15 if (defined $content) { }
56 0 15 if ($path =~ m[\Ahttps?://[^/]+(/.*)\z])
66 15 0 $method eq 'GET' ? :
95 29 1 unless ($res)
99 17 12 unless (defined $code)
101 1 16 if ($err)
115 0 12 $content_cb ? :
119 0 2 $content_cb ? :
129 2 85 unless (defined $n)
130 2 0 if ($!{'EAGAIN'})
133 0 2 if (defined $clen and $clen == &$body_read())
141 0 0 if $!{'EINTR'}
144 11 74 if ($n == 0)
148 74 0 if ($n > 0)
149 0 74 if ($content_cb and $res->is_success) { }
160 0 0 if (defined $clen and $clen == &$body_read())
194 0 3 if ($self->retryable($reason) and $http_res_cb and not $self->{'http_response'}) { }
205 3 0 if $http_res_cb
231 0 11 if ($connection)
232 0 0 if ($connection =~ /\bkeep-alive\b/i) { }
0 0 elsif ($connection =~ /\bclose\b/i) { }
244 11 0 unless defined $persist
264 0 11 unless $self->_http_persistent($res)