line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PawsX::DynamoDB::DocumentClient::Put; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
803
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
79
|
|
4
|
1
|
|
|
1
|
|
27
|
use 5.008_005; |
|
1
|
|
|
|
|
3
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use PawsX::DynamoDB::DocumentClient::Util qw(make_arg_transformer unmarshal_attribute_map); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
189
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $arg_transformer = make_arg_transformer( |
9
|
|
|
|
|
|
|
method_name => 'put', |
10
|
|
|
|
|
|
|
to_marshall => ['ExpressionAttributeValues', 'Item'], |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub transform_arguments { |
14
|
4
|
|
|
4
|
0
|
2797
|
my $class = shift; |
15
|
4
|
|
|
|
|
20
|
my %args = @_; |
16
|
4
|
|
|
|
|
9
|
my $force_type = delete $args{force_type}; |
17
|
|
|
|
|
|
|
return map |
18
|
|
|
|
|
|
|
{ |
19
|
4
|
|
|
|
|
15
|
$_ => $arg_transformer->($_, $args{$_}, $force_type) |
|
8
|
|
|
|
|
349
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
keys %args; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub transform_output { |
25
|
2
|
|
|
2
|
0
|
3044
|
my ($class, $output) = @_; |
26
|
2
|
100
|
|
|
|
58
|
if ($output->Attributes) { |
27
|
1
|
|
|
|
|
31
|
my $item = unmarshal_attribute_map($output->Attributes); |
28
|
1
|
50
|
|
|
|
74
|
return $item if %$item; |
29
|
|
|
|
|
|
|
} |
30
|
1
|
|
|
|
|
16
|
return undef; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub run_service_command { |
34
|
0
|
|
|
0
|
0
|
|
my ($class, $service, %args) = @_; |
35
|
0
|
|
|
|
|
|
return $service->PutItem(%args); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |