Condition Coverage

blib/lib/LWP/UserAgent.pm
Criterion Covered Total %
condition 73 160 45.6


and 3 conditions

line !l l&&!r l&&r condition
75 32 0 0 $conn_cache and $keep_alive
86 32 0 0 $protocols_allowed and ref $protocols_allowed ne 'ARRAY'
88 32 0 0 $protocols_forbidden and ref $protocols_forbidden ne 'ARRAY'
90 0 32 0 $requests_redirectable and ref $requests_redirectable ne 'ARRAY'
93 31 1 0 %cnf and $^W
200 1 0 69 not $response and $self->{'use_eval'}
207 1 0 0 &blessed($error) and $error->isa('HTTP::Response')
323 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'
444 0 6 4 @_ and ref $_[0]
453 0 8 2 defined $content and not ref $content
467 3 8 2 defined $ct and $self->_has_raw_content(@parameters)
522 0 0 0 ref $arg and UNIVERSAL::isa($arg, 'CODE')
618 0 1 0 ref $self and $x = $self->protocols_allowed
0 0 1 ref $self and $x = $self->protocols_forbidden
627 0 0 0 $x and $x ne 'LWP::Protocol::nogo'
725 0 0 8 $] >= 5.008 and $HTML::Parser::VERSION >= 3.4
775 0 0 0 @_ == 1 and $_[0]->can('header_field_names')
856 3 0 6 not @h and $init
889 410 3 47 $o->{'handlers'} and $o->{'handlers'}{$phase}
918 0 0 0 @_ > 1 and $^W
985 0 0 0 defined $content_length and $file_length < $content_length
0 0 0 defined $content_length and $file_length > $content_length
1038 17 10 1 not @_ and ref $key eq 'ARRAY'
1052 1 0 14 defined $url and length $url
1054 2 12 0 $url =~ /^https?:/ and not $url =~ m[^https?://\w]

or 2 conditions

line l !l condition
34 7 25 delete $cnf{'ssl_opts'} || {}
131 0 1 $conn_cache ||= {'total_capacity', $keep_alive}
203 68 0 $protocol->request($request, $proxy, $arg, $size, $self->{'timeout'}) || die("No response returned by $protocol")
665 50 6 shift() || ''
666 49 7 shift() || ''
865 6 0 $spec{'callback'} ||= sub { }
876 11 45 $self->{'handlers'}{$phase} || (return)
1021 16 7 $ua->{'proxy'}{$req->uri->scheme} || (return)

or 3 conditions

line l !l&&r !l&&!r condition
37 0 0 21 $ENV{'HTTPS_CA_FILE'} or $ENV{'HTTPS_CA_DIR'}
50 0 0 31 $ENV{'PERL_LWP_SSL_CA_FILE'} || $ENV{'HTTPS_CA_FILE'}
55 0 0 32 $ENV{'PERL_LWP_SSL_CA_PATH'} || $ENV{'HTTPS_CA_DIR'}
114 2 30 0 defined $agent or not $def_headers
32 0 0 defined $agent or not $def_headers or not $def_headers->header('User-Agent')
266 0 0 72 ref $request eq 'ARRAY' or ref $request eq 'HASH'
0 0 72 ref $request eq 'ARRAY' or ref $request eq 'HASH' or not $request->can('method')
0 0 72 ref $request eq 'ARRAY' or ref $request eq 'HASH' or not $request->can('method') or not $request->can('uri')
313 6 0 65 $code == 301 or $code == 302
6 0 65 $code == 301 or $code == 302 or $code == 303
0 0 65 $code == 301 or $code == 302 or $code == 303 or $code == 307
8 0 57 $code == 401 or $code == 407
332 0 0 6 $code == 303 or $code == 302
336 0 0 0 $method eq 'GET' or $method eq 'HEAD'
364 0 0 8 $proxy || $request->method eq 'CONNECT'
773 28 32 0 $self->{'def_headers'} ||= 'HTTP::Headers'->new
827 48 0 0 $spec{'line'} ||= join(':', (caller)[1, 2])
828 0 48 0 $self->{'handlers'}{$phase} ||= do { require HTTP::Config; 'HTTP::Config'->new }
839 0 56 0 $spec{'line'} ||= join(':', (caller)[1, 2])
866 0 6 0 $spec{'line'} ||= join(':', (caller)[1, 2])
1105 4 0 0 $message ||= &HTTP::Status::status_message($code)
1111 1 3 0 $content || "$code $message\n"