view release on metacpan or search on metacpan
---
abstract: 'A client for Amazon DynamoDB'
author:
- 'Rusty Conover <rusty@luckydinosaur.com>'
- 'Tom Molesworth <cpan@entitymodel.com>'
build_requires:
Data::Dumper: '0'
IO::Async::Loop: '0'
IO::Async::SSL: '0'
String::Random: '0'
Test::Differences: '0'
Test::More: '0'
Test::Most: '0'
lib: '0'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
Makefile.PL view on Meta::CPAN
"POSIX" => 0,
"Type::Library" => 0,
"Type::Registry" => 0,
"Type::Utils" => 0,
"Types::Standard" => 0,
"VM::EC2::Security::CredentialCache" => 0,
"strict" => 0,
"warnings" => 0
},
"TEST_REQUIRES" => {
"Data::Dumper" => 0,
"IO::Async::Loop" => 0,
"IO::Async::SSL" => 0,
"String::Random" => 0,
"Test::Differences" => 0,
"Test::More" => 0,
"Test::Most" => 0,
"lib" => 0
},
"VERSION" => "0.35",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"AWS::Signature4" => 0,
"B" => 0,
"Data::Dumper" => 0,
"ExtUtils::MakeMaker" => 0,
"Future" => 0,
"Future::Utils" => 0,
"HTTP::Request" => 0,
"IO::Async::Loop" => 0,
"IO::Async::SSL" => 0,
"IO::Async::Timer::Countdown" => 0,
"JSON::MaybeXS" => 0,
"Kavorka" => 0,
"LWP::UserAgent" => 0,
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
my $parameter_type_definitions = {
AttributesToGet => {},
AttributeUpdates => {
encode => sub {
my $source = shift;
my $r;
ref($source) eq 'HASH' || Carp::confess("Attribute updates is not a hash ref");
foreach my $k (keys %$source) {
my $op = $source->{$k};
ref($op) eq 'HASH' || Carp::confess("AttributeUpdate for field $k is not a hash ref:" . Data::Dumper->Dump([$op]));
$r->{$k} = {
(defined($op->{Action}) ? (Action => $op->{Action}) : ()),
(defined($op->{Value}) ? (Value => { _encode_type_and_value($op->{Value}) }) : ()),
};
}
return $r;
}
},
# should be a boolean
ConsistentRead => {},
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
}
return $r;
}
fun _create_key_schema(ArrayRef $source, HashRef $known_fields) {
defined($source) || die("No source passed to create_key_schema");
defined($known_fields) || die("No known fields passed to create_key_schmea");
my @r;
foreach my $field_name (@$source) {
defined($known_fields->{$field_name}) || Carp::confess("Unknown field specified '$field_name' in schema, must be defined in fields. schema:" . Data::Dumper->Dump([$source]));
push @r, {
AttributeName => $field_name,
KeyType => (scalar(@r) ? 'RANGE' : 'HASH')
};
}
return \@r;
};
t/#02-tables-gsi.t# view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use TestSettings;
use String::Random;
use Data::Dumper;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 9;
}
my $ddb = TestSettings::get_ddb();
my $table_name = TestSettings::random_table_name();
t/01-tables-simple.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use TestSettings;
use String::Random;
use Data::Dumper;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 7;
}
my $ddb = TestSettings::get_ddb();
t/02-tables-gsi.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use TestSettings;
use String::Random;
use Data::Dumper;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 9;
}
my $ddb = TestSettings::get_ddb();
my $table_name = TestSettings::random_table_name();
t/02-tables-lsi.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use TestSettings;
use Test::Differences;
use Data::Dumper;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 9;
}
my $ddb = TestSettings::get_ddb();
t/03-simple-get-put.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use Test::Differences;
use TestSettings;
use Data::Dumper;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 84;
}
bail_on_fail;
my $ddb = TestSettings::get_ddb();
t/03-simple-get-put.t view on Meta::CPAN
{
my $found_item;
my $get = $ddb->get_item(
sub {
$found_item = shift;
},
TableName => $table_name,
Key => {
user_id => $source_data->{user_id}
});
ok($get->is_done, "get_item completed ok:" . Data::Dumper->Dump([$get]));
ok(!defined($found_item), "an item was not retrieved");
}
# test delete with retrieving the attributes
{
my $put = $ddb->put_item(TableName => $table_name,
Item => $source_data);
ok($put->is_done, "put_item completed successfully");
is_deeply($put->get(), {}, "Results of put_item with no attributes returned didn't return any.");
}
t/04-batch-get.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use Test::Differences;
use Data::Dumper;
use TestSettings;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 4869;
}
bail_on_fail;
my $ddb = TestSettings::get_ddb();
t/05-batch-write.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use Test::Differences;
use TestSettings;
use Data::Dumper;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 2417;
}
bail_on_fail;
t/06-scan.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use Test::Differences;
use List::MoreUtils;
use Data::Dumper;
use TestSettings;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 40;
}
bail_on_fail;
t/07-query.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use Test::Differences;
use List::MoreUtils;
use Data::Dumper;
use TestSettings;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 10;
}
bail_on_fail;
t/10-presidential-data.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use TestSettings;
use String::Random;
use Data::Dumper;
use JSON::MaybeXS qw(decode_json);
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 107;
}
t/30-nahttp.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use lib ('lib', './t');
use Test::Most;
use TestSettings;
use String::Random;
use Data::Dumper;
use IO::Async::Loop;
use IO::Async::SSL;
unless ( $ENV{'AMAZON_DYNAMODB_EXPENSIVE_TESTS'} ) {
plan skip_all => 'Testing this module for real costs money.';
} else {
plan tests => 7;
}