Branch Coverage

blib/lib/Amazon/API.pm
Criterion Covered Total %
branch 31 216 14.3


line true false branch
480 1 0 ref $options[0] ? :
484 1 0 if ($self->get_service_url_base)
488 0 1 unless $self->get_service
497 0 1 if ($self->is_botocore_api)
515 1 0 if ('Log::Log4perl'->initialized) { }
521 0 0 if ($logger->can("level"))
559 0 0 if (not ref $response and $response->can("content"))
568 0 0 if ($content)
571 0 0 if ($content_type =~ /json/imsx) { }
0 0 elsif ($content_type =~ /xml/imsx) { }
586 0 0 if (not $decoded_content or $Amazon::API::EVAL_ERROR)
589 0 0 if (not $decoded_content or $Amazon::API::EVAL_ERROR)
591 0 0 $self->get_force_array ? :
608 0 0 if (ref $content and $serializer)
616 0 0 if ($output->{'resultWrapper'})
633 0 0 if (not $content or $Amazon::API::EVAL_ERROR)
634 0 0 if ($self->get_raise_serialization_errors) { }
663 0 0 if ($shape_name =~ /Botocore::Shape::([^:]+)::([^:]+)$/msx) { }
692 0 0 $location && $location eq $type ? :
720 0 0 unless $action
723 0 0 unless $parameters
726 0 0 unless $self->is_botocore_api($action)
736 0 0 unless $class
786 0 0 if $request_shape_name and $request_shape_name ne $shape
792 0 0 if (not $request_shape_name and $self->is_botocore_api)
794 0 0 if (not $boto_request) { }
812 0 0 if (not $request_shape_name) { }
818 0 0 if ($protocol =~ /rest\-(xml|json)/msx)
834 0 0 if (defined $input->{'xmlNamespace'})
861 0 0 if ($protocol =~ /^rest\-(json|xml)/msx)
867 0 0 if (not $request_shape_name) { }
870 0 0 unless exists $parameters{$p}
880 0 0 if ($request_shape_name) { }
897 0 0 if (my $var = $self->is_uri_param($request_shape_name, $p))
918 0 0 if ($request_shape_name)
924 0 0 if (my $var = $self->is_query_param($request_shape_name, $p))
936 0 0 if (keys %query_parameters)
943 0 0 unless (keys %{$shape_parameters;})
962 0 0 if ($method ne "POST" and not keys %parameters)
1000 0 0 if (&any(sub {
0 0 elsif (ref $parameters and &reftype($parameters) eq 'HASH') { }
1004 0 0 if ($content_type =~ /json/msx) { }
0 0 elsif ($content_type =~ /xml/msx) { }
1009 0 0 unless ref $content and keys %{$content;}
1038 0 0 if (ref $args[0] and &reftype($args[0]) eq 'HASH') { }
1067 0 0 if &blessed($parameters) and not $self->is_botocore_api
1076 0 0 if ($use_botocore and $self->get_use_paginator)
1082 0 0 if ($use_botocore) { }
0 0 elsif (not $content_type) { }
1083 0 0 if ($paginator)
1122 0 0 if ($parameters)
1150 0 0 unless ($rsp->is_success)
1163 0 0 if ($self->get_print_error)
1167 0 0 if ($self->get_raise_error)
1182 0 0 unless $self->get_decode_always
1186 0 0 if ($use_paginator)
1202 0 0 unless ($$result{$paginator->{'more_results'}})
1214 0 0 $limit ? :
1222 0 0 if ($Amazon::API::EVAL_ERROR)
1223 0 0 if ($self->get_raise_serialization_errors) { }
1233 0 0 if $use_paginator
1237 0 0 unless $paginator and $use_paginator
1247 0 0 unless ($$results{$paginator->{'more_results'}})
1264 0 0 if ($error and ref($error) =~ /Amazon::API::Error/msx) { }
1271 0 0 ref $response ? :
1288 0 0 if ($credentials->can("is_token_expired"))
1289 0 0 if ($credentials->is_token_expired)
1291 0 0 unless ($self->can("refresh_token") and $credentials->refresh_token)
1318 0 0 if ($botocore_protocol =~ /^rest\-(json|xml)/msx)
1319 0 0 unless $self->get_request_uri
1335 0 0 if ($self->get_api or $self->get_target_prefix)
1342 0 0 if (my $token = $self->get_valid_token)
1404 1 4 if ($parameters and not ref $parameters) { }
1 3 elsif ($parameters and &reftype($parameters) eq 'HASH') { }
3 0 elsif ($parameters and &reftype($parameters) eq 'ARRAY') { }
1409 0 2 if (ref $parameters->{$key} and &reftype($parameters->{$key}) eq 'ARRAY') { }
1421 1 2 if (&any(sub {
1 1 elsif (&any(sub {
1435 4 1 if ($action and not &any(sub {
1439 4 1 if ($version and not &any(sub {
1452 0 0 keys %options ? :
1473 0 0 if &any(sub {
1476 0 0 if &any(sub {
1479 0 0 if &any(sub {
1491 0 1 if ($self->get_api_methods)
1509 0 0 unless ($stash->{$method})
1518 0 0 unless ($stash->{$api})
1542 0 0 if defined *{$sub_name;}{"CODE"}
1545 0 0 if ($self->get_logger and $self->get_logger->can($level)) { }
1561 1 0 if (not $self->get_logger || 'Log::Log4perl'->initialized) { }
1569 0 1 $self->get_log_file ? :
1597 1 0 unless ($self->get_user_agent)
1601 1 0 unless (defined $self->get_decode_always)
1604 0 0 unless ($self->get_decode_always or defined $self->get_force_array)
1615 1 0 unless (defined $self->get_region)
1624 0 1 $debug ? :
1628 0 1 unless ($self->get_credentials)
1629 0 0 if ($self->has_keys(%options)) { }
1648 0 0 unless (defined $self->get_region)
1670 0 1 if ($botocore_metadata and $botocore_metadata->{'globalEndpoint'}) { }
1677 0 1 if (&any(sub {
1 0 elsif ($self->get_region) { }
1700 1 0 if (not $url) { }
1704 0 0 unless ($url =~ /^https?/imsx)
1726 0 0 unless ($target)
1727 0 0 $version ? :
1755 0 0 if ($self->get_http_method ne 'GET' or not defined $content) { }
1756 0 0 if ($content_type)