Condition Coverage

blib/lib/LWP/UserAgent.pm
Criterion Covered Total %
condition 74 160 46.2


and 3 conditions

line !l l&&!r l&&r condition
77 34 0 0 $conn_cache and $keep_alive
88 34 0 0 $protocols_allowed and ref $protocols_allowed ne 'ARRAY'
90 34 0 0 $protocols_forbidden and ref $protocols_forbidden ne 'ARRAY'
92 0 34 0 $requests_redirectable and ref $requests_redirectable ne 'ARRAY'
95 33 1 0 %cnf and $^W
203 1 0 70 not $response and $self->{'use_eval'}
210 2 0 0 &blessed($error) and $error->isa('HTTP::Response')
326 6 0 0 $referral->header('Referer') and $request->uri->scheme eq 'https'
6 0 0 $referral->header('Referer') and $request->uri->scheme eq 'https' and $referral->uri->scheme eq 'http'
447 0 6 4 @_ and ref $_[0]
456 0 8 2 defined $content and not ref $content
470 3 8 2 defined $ct and $self->_has_raw_content(@parameters)
525 0 0 0 ref $arg and UNIVERSAL::isa($arg, 'CODE')
621 0 1 0 ref $self and $x = $self->protocols_allowed
0 0 1 ref $self and $x = $self->protocols_forbidden
630 0 0 0 $x and $x ne 'LWP::Protocol::nogo'
729 0 0 8 $] >= 5.008 and $HTML::Parser::VERSION >= 3.4
779 0 0 0 @_ == 1 and $_[0]->can('header_field_names')
860 3 0 6 not @h and $init
893 425 3 47 $o->{'handlers'} and $o->{'handlers'}{$phase}
926 0 0 0 @_ > 1 and $^W
993 0 0 0 defined $content_length and $file_length < $content_length
0 0 0 defined $content_length and $file_length > $content_length
1046 17 10 1 not @_ and ref $key eq 'ARRAY'
1060 1 0 14 defined $url and length $url
1062 2 12 0 $url =~ /^https?:/ and not $url =~ m[^https?://\w]

or 2 conditions

line l !l condition
34 7 27 delete $cnf{'ssl_opts'} || {}
134 0 1 $conn_cache ||= {'total_capacity', $keep_alive}
206 68 0 $protocol->request($request, $proxy, $arg, $size, $self->{'timeout'}) || die("No response returned by $protocol")
668 50 6 shift() || ''
669 49 7 shift() || ''
869 6 0 $spec{'callback'} ||= sub { }
880 11 47 $self->{'handlers'}{$phase} || (return)
1029 16 7 $ua->{'proxy'}{$req->uri->scheme} || (return)

or 3 conditions

line l !l&&r !l&&!r condition
37 0 0 23 $ENV{'HTTPS_CA_FILE'} or $ENV{'HTTPS_CA_DIR'}
50 0 0 33 $ENV{'PERL_LWP_SSL_CA_FILE'} || $ENV{'HTTPS_CA_FILE'}
55 0 0 34 $ENV{'PERL_LWP_SSL_CA_PATH'} || $ENV{'HTTPS_CA_DIR'}
117 2 32 0 defined $agent or not $def_headers
34 0 0 defined $agent or not $def_headers or not $def_headers->header('User-Agent')
269 0 0 75 ref $request eq 'ARRAY' or ref $request eq 'HASH'
0 0 75 ref $request eq 'ARRAY' or ref $request eq 'HASH' or not $request->can('method')
0 0 75 ref $request eq 'ARRAY' or ref $request eq 'HASH' or not $request->can('method') or not $request->can('uri')
316 6 0 68 $code == 301 or $code == 302
6 0 68 $code == 301 or $code == 302 or $code == 303
0 0 68 $code == 301 or $code == 302 or $code == 303 or $code == 307
8 0 60 $code == 401 or $code == 407
335 0 0 6 $code == 303 or $code == 302
339 0 0 0 $method eq 'GET' or $method eq 'HEAD'
367 0 0 8 $proxy || $request->method eq 'CONNECT'
777 28 34 0 $self->{'def_headers'} ||= 'HTTP::Headers'->new
831 50 2 0 $spec{'line'} ||= join(':', (caller)[1, 2])
832 0 52 0 $self->{'handlers'}{$phase} ||= do { require HTTP::Config; 'HTTP::Config'->new }
843 0 58 0 $spec{'line'} ||= join(':', (caller)[1, 2])
870 0 6 0 $spec{'line'} ||= join(':', (caller)[1, 2])
1113 5 0 0 $message ||= &HTTP::Status::status_message($code)
1119 2 3 0 $content || "$code $message\n"