Branch Coverage

blib/lib/Net/SecurityCenter/REST.pm
Criterion Covered Total %
branch 34 74 45.9


line true false branch
26 0 1 unless ($host)
43 0 1 if ($timeout)
47 1 0 if ($ssl_opts)
66 0 1 unless ($self->_check)
95 0 1 unless ($response)
116 0 0 if (defined $message) { }
133 0 0 unless @_ == 2 or @_ == 3 and ref $params eq 'HASH'
0 27 unless @_ == 2 or @_ == 3 and ref $params eq 'HASH'
0 0 unless @_ == 2 or @_ == 3 and ref $params eq 'HASH'
0 0 unless @_ == 2 or @_ == 3 and ref $params eq 'HASH'
0 2 unless @_ == 2 or @_ == 3 and ref $params eq 'HASH'
0 0 unless @_ == 2 or @_ == 3 and ref $params eq 'HASH'
151 0 44 unless @_ == 3 or @_ == 4
157 0 44 unless ($method =~ /(?:GET|POST|PUT|DELETE|PATCH)/)
171 41 3 unless ($path =~ /token/)
175 0 44 if ($params->{'file'}) { }
191 44 0 if ($params)
209 0 44 if ($response_code == 403 and not $response_ctype =~ m[application/json])
213 44 0 if ($is_json)
219 41 3 if (ref $result->{'warnings'} eq 'ARRAY')
225 44 0 if ($response->is_success)
227 44 0 if ($is_json)
229 44 0 if (defined $result->{'response'}) { }
0 0 elsif ($result->{'error_msg'}) { }
249 0 0 if ($is_json and exists $result->{'error_msg'})
275 0 0 unless @_ == 2
288 0 224 unless $self->{'logger'}
308 1 1 unless (defined $args{'access_key'} and defined $args{'secret_key'} or defined $args{'username'} and defined $args{'password'})
327 0 1 unless ($username or $access_key)
331 2 1 if ($username)
341 0 2 unless $response
351 1 2 if ($access_key)
355 0 1 if ($version_check < 0)
364 0 1 unless $response
380 1 0 if ($self->{'token'})
385 1 0 if ($self->{'api_key'})
402 0 1 if ($self->{'token'})