Branch Coverage

blib/lib/Net/SecurityCenter/REST.pm
Criterion Covered Total %
branch 37 74 50.0


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 1 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 3 unless @_ == 2 or @_ == 3 and ref $params eq "HASH"
0 0 unless @_ == 2 or @_ == 3 and ref $params eq "HASH"
151 0 47 unless @_ == 3 or @_ == 4
157 0 47 unless ($method =~ /(?:GET|POST|PUT|DELETE|PATCH)/)
171 44 3 unless ($path =~ /token/)
175 0 47 if ($params->{'file'}) { }
191 47 0 if ($params)
209 0 47 if ($response_code == 403 and not $response_ctype =~ m[application/json])
213 47 0 if ($is_json)
219 43 4 if (ref $result->{'warnings'} eq "ARRAY")
225 46 1 if ($response->is_success)
227 46 0 if ($is_json)
229 46 0 if (defined $result->{'response'}) { }
0 0 elsif ($result->{'error_msg'}) { }
249 0 1 if ($is_json and exists $result->{'error_msg'})
275 0 0 unless @_ == 2
288 0 240 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'})