aws-sdk-perl
aws-sdk-perl copied to clipboard
Cannot use DynamoDB QueryAll and ScanAll with callback
When using DynamoDB QueryAll and ScanAll with callback, it does not work properly.
For example,
#!/usr/bin/perl
use Paws;
$dynamo->ScanAll(
sub {
my ( $item, $name ) = @_;
print "$item, $name\n";
},
TableName => 'MyTable',
);
This program will die as follows:
% perl sample.pl
Paws::DynamoDB::AttributeMap=HASH(0x803c05498), Items
Paws::DynamoDB::AttributeMap=HASH(0x803bdc2e8), Items
Paws::DynamoDB::AttributeMap=HASH(0x803c07a68), Items
Paws::DynamoDB::AttributeMap=HASH(0x803bf8a50), Items
Paws::DynamoDB::AttributeMap=HASH(0x803bf8180), Items
Can't use string ("26") as an ARRAY ref while "strict refs" in use at /usr/local/lib/perl5/site_perl/Paws/DynamoDB.pm line 347.
and so is QueryAll.
To fix this problem, try to apply this patch.
Thank you for your patch :)