Amazon-DynamoDB
view release on metacpan or search on metacpan
lib/Amazon/DynamoDB/20120810.pm view on Meta::CPAN
fun _encode_type_and_value(Any $v) {
my $type;
if (ref($v)) {
# An array maps to a sequence
if (ref($v) eq 'ARRAY') {
# Any refs mean we're sending binary data
# Start by guessing we have an array of numeric strings,
# but on the first value we encoutner that is either a reference
# or a variable that isn't an integer or numeric. Stop.
$type = 'NS';
foreach my $value (@$v) {
if (ref($value)) {
$type = 'BS';
last;
}
my $element_flags = B::svref_2object(\$value)->FLAGS;
if ($element_flags & (B::SVp_IOK | B::SVp_NOK)) {
( run in 0.706 second using v1.01-cache-2.11-cpan-702932259ff )