| blib/lib/HealthCheck/Diagnostic/WebRequest.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 28 | 42 | 66.6 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 21 | 21 | 0 | 0 | @params == 1 && (ref $params[0] || '') eq 'HASH' |
| 43 | 0 | 21 | 0 | $params{'url'} and $params{'request'} |
| 49 | 0 | 0 | 0 | builtin::blessed($params{'request'}) and $params{'request'}->isa("HTTP::Request") |
| 56 | 0 | 0 | 0 | builtin::blessed($params{'ua'}) and $params{'ua'}->isa("LWP::UserAgent") |
| 69 | 16 | 4 | 3 | defined $op and $op eq "!" |
| 152 | 20 | 4 | 2 | $client_warning and $client_warning eq "Internal response" |
| 181 | 23 | 1 | 2 | defined $response_time_threshold and $elapsed_time > $response_time_threshold |
| line | l | !l | condition |
|---|---|---|---|
| 61 | 6 | 15 | $params{'status_code'} ||= 200 |
| 77 | 2 | 19 | $params{'options'} //= {} |
| 78 | 20 | 0 | $class->VERSION || '0' |
| 80 | 1 | 20 | $params{'options'}{'timeout'} //= 7 |
| 125 | 6 | 20 | $response->header("Client-Warning") // "" |
| 126 | 1 | 25 | $response->header("X-Squid-Error") // "" |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 78 | 1 | 20 | 0 | $params{'options'}{'agent'} //= "LWP::UserAgent"->_agent . ' HealthCheck-Diagnostic-WebRequest/' . ($class->VERSION || '0') |
| 82 | 0 | 21 | 0 | $params{'ua'} //= "LWP::UserAgent"->new(%{$params{"options"};}) |
| 149 | 16 | 1 | 9 | $status eq "OK" or $proxy_error |