Branch Coverage

blib/lib/Test/Override/UserAgent.pm
Criterion Covered Total %
branch 53 54 98.1


line true false branch
37 6 20 if (defined $new_value)
53 44 16 if (defined $handler)
57 43 1 unless (defined $response->request)
63 15 45 if (not defined $response and exists $args{'live_request_handler'})
65 2 13 if ($self->allow_live_requests) { }
93 1 14 exists $args{'clone'} ? :
95 1 14 if ($clone)
153 4 15 if ($use_for eq 'configuration')
198 3 1 defined $allow ? :
221 1 19 @args == 1 ? :
237 2 18 if (exists $args{$arg})
268 3 73 if ($key eq 'url' or $key eq 'uri') { }
73 0 elsif ('m_' ne substr($key, 0, 2)) { }
292 43 1 unless (defined &Scalar::Util::blessed($response))
296 41 2 if (defined $response_type and $response_type eq 'ARRAY') { }
308 1 31 if (ref $body ne 'ARRAY')
389 1 40 unless ($code =~ /\A [1-9] \d{2,} \z/msx)
393 1 39 if (ref $headers ne 'ARRAY')
397 1 38 if (@{$headers;} % 2 != 0)
409 3 56 if (_is_invalid_psgi_header_key($key)) { }
32 24 elsif (lc $key eq 'content-type') { }
2 22 elsif (lc $key eq 'content-length') { }
422 2 57 if (_is_invalid_psgi_header_value($value))
428 1 37 if (@invalid_header_keys)
433 1 36 if (@invalid_header_values)
438 3 1 unless ($has_content_type or $code =~ /\A 1 | [23]04/msx)
442 1 32 if ($has_content_length and $code =~ /\A 1 | [23]04/msx)