Branch Coverage

blib/lib/HTTP/DAV/Comms.pm
Criterion Covered Total %
branch 19 60 31.6


line true false branch
40 0 1 if (defined $useragent) { }
60 0 0 unless defined $$self{'_headers'}
72 0 1 if (defined $headers and ref $headers eq 'HTTP::Headers') { }
1 0 elsif (defined $headers and ref $headers eq 'HASH') { }
132 0 0 if (not defined $method or $method eq '' or not $method =~ /^\w+$/)
139 0 0 ref($url) =~ /URI/ ? :
141 0 0 unless $url_obj->scheme =~ /^http/
145 0 0 if ($url_obj->userinfo)
151 0 0 if ($newheaders and not ref($newheaders) =~ /Headers/)
163 0 0 $content ? :
176 0 0 if ($content and $content =~ /<\?xml/i)
197 0 0 if (defined $save_to and $save_to ne '') { }
0 0 elsif (ref($callback_func) =~ /CODE/) { }
209 0 0 if ($code == &HTTP::Status::RC_MOVED_PERMANENTLY or $code == &HTTP::Status::RC_MOVED_TEMPORARILY)
230 0 0 if (++$count > 13 or $r->request->url->as_string eq $referral_uri->as_string)
245 0 0 unless $bad_loop
258 0 0 if ($HTTP::DAV::DEBUG > 1)
267 0 0 if ($resp->headers->header('Content-Type') =~ /xml/) { }
340 0 7 unless $realm
342 7 0 if ($netloc) { }
343 7 0 unless $netloc =~ /^http/
353 4 3 if ($HTTP::DAV::DEBUG > 2)
354 1 3 if (defined $user) { }
365 3 4 if (exists $$self{'basic_authentication'}{$netloc} and exists $$self{'basic_authentication'}{$netloc}{$realm}) { }
375 2 5 if (defined $user)
382 2 5 unless (@{$cred;})
383 0 2 wantarray ? :
387 2 3 if (wantarray)
408 0 0 if $HTTP::DAV::DEBUG > 2
452 0 0 unless defined $headers and ref($headers) =~ /Headers/