Branch Coverage

blib/lib/AnyEvent/UserAgent.pm
Criterion Covered Total %
branch 30 38 78.9


line true false branch
59 9 1 unless ($hdrs->user_agent)
63 0 9 if ($uri->can('userinfo') and $uri->userinfo and not $hdrs->authorization)
66 9 1 if ($uri->scheme)
71 27 3 unless exists $$opts{$_}
76 1 9 if ($$opts{'request_timeout'})
107 1 9 if $prev
110 0 10 if (defined $$hdrs{'HTTPVersion'})
113 3 7 if (my $hdr = $$hdrs{'set-cookie'})
122 5 5 if (keys %$hdrs)
125 3 0 if ($res->code >= 590 and $res->code <= 599 and $res->message)
126 0 3 if ($res->message eq 'Connection timed out')
129 3 0 unless ($res->header('client-warning'))
133 7 3 if (defined $body)
140 2 8 if ($code == 301 or $code == 302 or $code == 303 or $code == 307 or $code == 308) { }
151 1 1 defined $count ? :
1 1 unless (defined $count ? $count : ($count = $$opts{'max_redirects'}))
163 0 1 if ($code == 302 || $code == 303 and not $meth eq 'GET' || $meth eq 'HEAD')
173 1 0 defined $uri ? :
176 0 1 if ($proto eq 'https' and $uri->scheme eq 'http')