Branch Coverage

lib/Net/Amazon/DynamoDB.pm
Criterion Covered Total %
branch 0 352 0.0


line true false branch
202 0 0 if (defined $table_ref->{'range_key'})
213 0 0 if ($res_ok and defined $json_ref->{'TableDescription'})
226 0 0 defined $json_ref->{'Table'}{'KeySchema'}{'RangeKeyElement'} ? :
250 0 0 if ($res_ok and defined $json_ref->{'TableDescription'})
271 0 0 if ($res_ok)
272 0 0 if (defined $json_ref->{'Table'}) { }
289 0 0 defined $json_ref->{'Table'}{'KeySchema'}{'RangeKeyElement'} ? :
319 0 0 if ($res_ok)
343 0 0 defined $json_ref->{'Table'} && defined $json_ref->{'Table'}{'ItemCount'} ? :
0 0 if $res_ok
357 0 0 if ($res_ok)
362 0 0 unless not $self->namespace
364 0 0 wantarray ? :
391 0 0 unless defined $$item_ref{$table_ref->{'hash_key'}} and length $$item_ref{$table_ref->{'hash_key'}}
397 0 0 if $where_ref
413 0 0 if ($where_ref)
418 0 0 if $args_ref->{'return_old'}
426 0 0 if ($res_ok)
429 0 0 if ($self->_cache_enabled($args_ref))
434 0 0 if ($args_ref->{'return_old'}) { }
437 0 0 defined $json_ref->{'Attributes'} ? :
473 0 0 unless defined $t_ref->{$operation}
476 0 0 ref $t_ref->{$operation} eq 'ARRAY' ? :
479 0 0 if ($operation eq 'put') { }
491 0 0 if ($self->_cache_enabled($args_ref))
503 0 0 if ($self->_cache_enabled($args_ref))
536 0 0 if ($res_ok and defined $json_ref->{'UnprocessedItems'})
539 0 0 unless @operations
545 0 0 defined $operation_ref->{'PutRequest'} ? :
553 0 0 wantarray ? :
573 0 0 if defined $$update_ref{$table_ref->{'hash_key'}}
577 0 0 if defined $table_ref->{'range_key'} and defined $$update_ref{$table_ref->{'range_key'}}
582 0 0 unless defined $$where_ref{$table_ref->{'hash_key'}} and length $$where_ref{$table_ref->{'hash_key'}}
587 0 0 if defined $table_ref->{'range_key'} and not defined $$where_ref{$table_ref->{'range_key'}} && length $$where_ref{$table_ref->{'range_key'}}
592 0 0 if defined $$update_ref{$table_ref->{'hash_key'}}
594 0 0 if defined $table_ref->{'range_key'} and defined $$update_ref{$table_ref->{'range_key'}}
612 0 0 if (not defined $value) { }
0 0 elsif ($type eq 'N' and $value =~ /^(--|\+\+)(\d+)$/) { }
0 0 elsif ($type eq 'N' or $type eq 'S' or $type eq 'B') { }
0 0 elsif ($type =~ /^([NSB])S$/) { }
620 0 0 $1 eq '--' ? :
639 0 0 if (ref $value eq 'REF') { }
663 0 0 if (keys %where)
668 0 0 if ($args_ref->{'return_mode'})
671 0 0 "$args_ref->{'return_mode'}" =~ /^(?:ALL_OLD|UPDATED_OLD|ALL_NEW|UPDATED_NEW)$/i ? :
680 0 0 if ($res_ok)
683 0 0 if ($self->_cache_enabled($args_ref))
688 0 0 if ($args_ref->{'return_mode'}) { }
691 0 0 defined $json_ref->{'Attributes'} ? :
724 0 0 unless defined $$pk_ref{$table_ref->{'hash_key'}} and length $$pk_ref{$table_ref->{'hash_key'}}
729 0 0 if defined $table_ref->{'range_key'} and not defined $$pk_ref{$table_ref->{'range_key'}} && length $$pk_ref{$table_ref->{'hash_key'}}
734 0 0 if ($use_cache)
737 0 0 if defined $cached
752 0 0 defined $args_ref->{'attributes'} ? :
0 0 $args_ref->{'consistent'} ? :
755 0 0 if (defined $table_ref->{'range_key'})
768 0 0 if ($res_ok)
769 0 0 if (defined $json_ref->{'Item'})
771 0 0 if ($use_cache)
817 0 0 ref $t_ref eq 'ARRAY' ? :
828 0 0 if (defined $m_ref->{'range_key'})
837 0 0 defined $range_key ? :
842 0 0 if (ref $t_ref eq 'HASH' and defined $t_ref->{'attributes'})
847 0 0 if ($args_ref->{'consistent'})
858 0 0 if ($res_ok and defined $json_ref->{'Responses'})
860 0 0 if ($args_ref->{'process_all'} and defined(my $ukeys_ref = $json_ref->{'UnprocessedKeys'}))
868 0 0 if ($res_ok and defined $ujson_ref->{'Responses'})
871 0 0 if (defined $ujson_ref->{'Responses'}{$table} and defined $ujson_ref->{'Responses'}{$table}{'Items'})
880 0 0 $res_ok && defined $ujson_ref->{'UnprocessedKeys'} ? :
887 0 0 unless defined $json_ref->{'Responses'}{$table} and defined $json_ref->{'Responses'}{$table}{'Items'}
921 0 0 unless defined $$where_ref{$table_ref->{'hash_key'}} and length $$where_ref{$table_ref->{'hash_key'}}
926 0 0 if defined $table_ref->{'range_key'} and not defined $$where_ref{$table_ref->{'range_key'}} && length $$where_ref{$table_ref->{'range_key'}}
935 0 0 $args_ref->{'return_old'} ? :
948 0 0 if (defined $table_ref->{'range_key'})
956 0 0 if (keys %where)
965 0 0 if ($res_ok)
968 0 0 if ($self->_cache_enabled($args_ref))
973 0 0 if (defined $json_ref->{'Attributes'})
976 0 0 unless defined $json_ref->{'Attributes'}{$attrib}
1008 0 0 unless defined $self->tables->{$table}
1019 0 0 $args_ref->{'consistent'} ? :
0 0 $args_ref->{'backward'} ? :
0 0 defined $args_ref->{'limit'} ? :
1025 0 0 if (defined $filter{$table_ref->{'hash_key'}})
1027 0 0 unless defined $filter{$table_ref->{'hash_key'}}
1035 0 0 if (defined $table_ref->{'range_key'})
1037 0 0 unless defined $filter{$table_ref->{'range_key'}}
1040 0 0 unless ref $r_ref
1042 0 0 unless ref $vals_ref
1053 0 0 if keys %filter
1058 0 0 if (defined(my $start_key_ref = $args_ref->{'start_key'}))
1063 0 0 if (defined $$start_key_ref{$table_ref->{'hash_key'}})
1069 0 0 if (defined $table_ref->{'range_key'} and defined $$start_key_ref{$table_ref->{'range_key'}})
1076 0 0 if (defined(my $attribs_ref = $args_ref->{'attributes'})) { }
0 0 elsif ($args_ref->{'count'}) { }
1093 0 0 if ($res_ok and defined $json_ref->{'Items'})
1102 0 0 if (defined $json_ref->{'LastEvaluatedKey'})
1110 0 0 if (defined $table_ref->{'range_key'} and defined $json_ref->{'LastEvaluatedKey'}{'RangeKeyElement'})
1117 0 0 if ($args_ref->{'all'} and $next_start_key_ref)
1121 0 0 defined $args_ref->{'_start_key_cache'} ? :
1124 0 0 unless (defined $key_cache{$new_start_key})
1136 0 0 if ($sub_count)
1143 0 0 wantarray ? :
1169 0 0 unless defined $self->tables->{$table}
1176 0 0 defined $args_ref->{'limit'} ? :
1180 0 0 if ($filter_ref and keys %$filter_ref)
1187 0 0 if ($rvalue eq 'HASH') { }
0 0 elsif ($rvalue eq 'ARRAY') { }
1210 0 0 if (defined(my $start_key_ref = $args_ref->{'start_key'}))
1215 0 0 if (defined $$start_key_ref{$table_ref->{'hash_key'}})
1221 0 0 if (defined $table_ref->{'range_key'} and defined $$start_key_ref{$table_ref->{'range_key'}})
1228 0 0 if (defined(my $attribs_ref = $args_ref->{'attributes'})) { }
0 0 elsif ($args_ref->{'count'}) { }
1244 0 0 if ($res_ok and defined $json_ref->{'Items'})
1254 0 0 if (defined $json_ref->{'LastEvaluatedKey'})
1262 0 0 if (defined $table_ref->{'range_key'} and defined $json_ref->{'LastEvaluatedKey'}{'RangeKeyElement'})
1269 0 0 if ($args_ref->{'all'} and $next_start_key_ref)
1273 0 0 defined $args_ref->{'_start_key_cache'} ? :
1276 0 0 unless (defined $key_cache{$new_start_key})
1288 0 0 if ($sub_count)
1295 0 0 wantarray ? :
1298 0 0 if ($args_ref->{'count'})
1299 0 0 if $res_ok
1317 0 0 unless ($self->_init_security_token)
1319 0 0 wantarray ? :
1323 0 0 if ref $json
1363 0 0 defined $args_ref->{'max_retries'} ? :
1372 0 0 if $ENV{'DYNAMO_DB_DEBUG'}
1373 0 0 if $ENV{'DYNAMO_DB_DEBUG_KEEPALIVE'}
1377 0 0 $response ? :
1379 0 0 if (defined $json_ref->{'__type'} and $json_ref->{'__type'} =~ /ProvisionedThroughputExceededException/ and $tries-- > 0)
1380 0 0 if $ENV{'DYNAMO_DB_DEBUG_RETRY'}
1389 0 0 if (defined $json_ref->{'error'} and $json_ref->{'error'}) { }
0 0 elsif (defined $json_ref->{'__type'} and $json_ref->{'__type'} =~ /Exception/ and $json_ref->{'Message'}) { }
1398 0 0 $response ? :
0 0 wantarray ? :
1406 0 0 if ($str)
1407 0 0 if $self->raise_error
1410 0 0 if $self->_has_error
1421 0 0 if ($type =~ /^(.)S$/) { }
0 0 elsif ($type eq 'B') { }
1423 0 0 ref $value ? :
1445 0 0 if ($self->_has_credentials)
1447 0 0 if $dt < $self->_credentials_expire
1451 0 0 unless $self->_has_aws_signer
1460 0 0 if ($res->is_success) { }
1465 0 0 if (ref $result_ref and defined $result_ref->{'GetSessionTokenResult'} and defined $result_ref->{'GetSessionTokenResult'} and defined $result_ref->{'GetSessionTokenResult'}{'Credentials'}) { }
1471 0 0 if (ref $cred_ref and defined $cred_ref->{'SessionToken'} and defined $cred_ref->{'AccessKeyId'} and defined $cred_ref->{'SecretAccessKey'} and defined $cred_ref->{'Expiration'})
1511 0 0 unless ($table)
1516 0 0 unless defined $self->tables->{$table}
1531 0 0 ref $key_ref eq 'ARRAY' ? :
0 0 ref $key_ref ? :
1540 0 0 if @invalid_keys
1543 0 0 wantarray ? :
1560 0 0 if (defined $table_ref->{'range_key'})
1586 0 0 unless (ref $where_ref->{$key})
1589 0 0 if (ref $where_ref->{$key} eq 'SCALAR') { }
1593 0 0 if (defined(my $value = $where_ref->{$key}{'value'}))
1596 0 0 if (defined $where_ref->{$key}{'exists'})
1597 0 0 $where_ref->{$key}{'exists'} ? :
1600 0 0 if keys %cur
1613 0 0 defined $table_ref->{'attributes'}{$key} ? :
1647 0 0 if (defined $from_ref->{'HashKeyElement'}) { }
1649 0 0 if defined $table_ref->{'range_key'}
1655 0 0 if ($key_type eq 'B') { }
0 0 elsif ($key_name = 'BS') { }
1664 0 0 if ($self->derive_table) { }
1666 0 0 if (exists $value->{'B'}) { }
0 0 elsif (exists $value->{'BS'}) { }
1679 0 0 unless defined $from_ref->{$attrib}
1680 0 0 if ($type eq 'BS') { }
0 0 elsif ($type eq 'B') { }
1709 0 0 $remove ? :
1720 0 0 if ($response) { }
1722 0 0 if (defined $json->{'__type'}) { }
1755 0 0 if defined $table_ref->{'range_key'}