Branch Coverage

blib/lib/Amazon/API.pm
Criterion Covered Total %
branch 31 212 14.6


line true false branch
478 1 0 ref $options[0] ? :
482 1 0 if ($self->get_service_url_base)
486 0 1 unless $self->get_service
495 0 1 if ($self->is_botocore_api)
513 1 0 if ('Log::Log4perl'->initialized) { }
519 0 0 if ($logger->can("level"))
557 0 0 if (not ref $response and $response->can("content"))
566 0 0 if ($content)
569 0 0 if ($content_type =~ /json/imsx) { }
0 0 elsif ($content_type =~ /xml/imsx) { }
584 0 0 if (not $decoded_content or $Amazon::API::EVAL_ERROR)
587 0 0 if (not $decoded_content or $Amazon::API::EVAL_ERROR)
589 0 0 $self->get_force_array ? :
606 0 0 if (ref $content and $serializer)
614 0 0 if ($output->{'resultWrapper'})
631 0 0 if (not $content or $Amazon::API::EVAL_ERROR)
632 0 0 if ($self->get_raise_serialization_errors) { }
661 0 0 if ($shape_name =~ /Botocore::Shape::([^:]+)::([^:]+)$/msx) { }
690 0 0 $location && $location eq $type ? :
718 0 0 unless $action
721 0 0 unless $parameters
724 0 0 unless $self->is_botocore_api($action)
734 0 0 unless $class
784 0 0 if $request_shape_name and $request_shape_name ne $shape
790 0 0 if (not $request_shape_name and $self->is_botocore_api)
792 0 0 if (not $boto_request) { }
810 0 0 if (not $request_shape_name) { }
816 0 0 if ($protocol =~ /rest\-(xml|json)/msx)
825 0 0 if (defined $input->{'xmlNamespace'})
852 0 0 if ($protocol =~ /^rest\-(json|xml)/msx)
858 0 0 if (not $request_shape_name) { }
861 0 0 unless exists $parameters{$p}
871 0 0 if ($request_shape_name) { }
888 0 0 if (my $var = $self->is_uri_param($request_shape_name, $p))
909 0 0 if ($request_shape_name)
915 0 0 if (my $var = $self->is_query_param($request_shape_name, $p))
927 0 0 if (keys %query_parameters)
934 0 0 unless (keys %{$shape_parameters;})
953 0 0 if ($method ne "POST" and not keys %parameters)
988 0 0 if (&any(sub {
0 0 elsif (ref $parameters and &reftype($parameters) eq 'HASH') { }
992 0 0 if ($content_type =~ /json/msx) { }
0 0 elsif ($content_type =~ /xml/msx) { }
997 0 0 unless ref $content and keys %{$content;}
1020 0 0 if (ref $args[0] and &reftype($args[0]) eq 'HASH') { }
1041 0 0 if &blessed($parameters) and not $self->is_botocore_api
1053 0 0 if ($self->is_botocore_api) { }
0 0 elsif (not $content_type) { }
1058 0 0 if ($use_paginator)
1095 0 0 unless ($rsp->is_success)
1108 0 0 if ($self->get_print_error)
1112 0 0 if ($self->get_raise_error)
1127 0 0 unless $self->get_decode_always
1131 0 0 if ($use_paginator)
1151 0 0 unless $$result{$paginator->{'more_results'}}
1159 0 0 $limit ? :
1167 0 0 if ($Amazon::API::EVAL_ERROR)
1168 0 0 if ($self->get_raise_serialization_errors) { }
1178 0 0 if $use_paginator
1182 0 0 unless $paginator and $use_paginator
1187 0 0 unless ($$results{$paginator->{'more_results'}})
1204 0 0 if ($error and ref($error) =~ /Amazon::API::Error/msx) { }
1211 0 0 ref $response ? :
1228 0 0 if ($credentials->can("is_token_expired"))
1229 0 0 if ($credentials->is_token_expired)
1231 0 0 unless ($self->can("refresh_token") and $credentials->refresh_token)
1258 0 0 if ($botocore_protocol =~ /^rest\-(json|xml)/msx)
1259 0 0 unless $self->get_request_uri
1275 0 0 if ($self->get_api or $self->get_target_prefix)
1282 0 0 if (my $token = $self->get_valid_token)
1344 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') { }
1349 0 2 if (ref $parameters->{$key} and &reftype($parameters->{$key}) eq 'ARRAY') { }
1361 1 2 if (&any(sub {
1 1 elsif (&any(sub {
1375 4 1 if ($action and not &any(sub {
1379 4 1 if ($version and not &any(sub {
1391 0 0 keys %options ? :
1412 0 0 if &any(sub {
1415 0 0 if &any(sub {
1418 0 0 if &any(sub {
1430 0 1 if ($self->get_api_methods)
1448 0 0 unless ($stash->{$method})
1457 0 0 unless ($stash->{$api})
1481 0 0 if defined *{$sub_name;}{"CODE"}
1484 0 0 if ($self->get_logger and $self->get_logger->can($level)) { }
1500 1 0 if (not $self->get_logger || 'Log::Log4perl'->initialized) { }
1508 0 1 $self->get_log_file ? :
1536 1 0 unless ($self->get_user_agent)
1540 1 0 unless (defined $self->get_decode_always)
1543 0 0 unless ($self->get_decode_always or defined $self->get_force_array)
1554 1 0 unless (defined $self->get_region)
1563 0 1 $debug ? :
1567 0 1 unless ($self->get_credentials)
1568 0 0 if ($self->has_keys(%options)) { }
1587 0 0 unless (defined $self->get_region)
1609 0 1 if ($botocore_metadata and $botocore_metadata->{'globalEndpoint'}) { }
1616 0 1 if (&any(sub {
1 0 elsif ($self->get_region) { }
1639 1 0 if (not $url) { }
1643 0 0 unless ($url =~ /^https?/imsx)
1665 0 0 unless ($target)
1666 0 0 $version ? :
1694 0 0 if ($self->get_http_method ne 'GET' or not defined $content) { }
1695 0 0 if ($content_type)