line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PawsX::DynamoDB::DocumentClient::Update; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
812
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
22
|
use 5.008_005; |
|
1
|
|
|
|
|
4
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use PawsX::DynamoDB::DocumentClient::Util qw(make_arg_transformer unmarshal_attribute_map); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
202
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $arg_transformer = make_arg_transformer( |
9
|
|
|
|
|
|
|
method_name => 'update', |
10
|
|
|
|
|
|
|
to_marshall => ['ExpressionAttributeValues', 'Key'], |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub transform_arguments { |
14
|
3
|
|
|
3
|
0
|
1014
|
my $class = shift; |
15
|
3
|
|
|
|
|
17
|
my %args = @_; |
16
|
3
|
|
|
|
|
11
|
return map { $_ => $arg_transformer->($_, $args{$_}) } keys %args; |
|
6
|
|
|
|
|
95
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub transform_output { |
20
|
2
|
|
|
2
|
0
|
5379
|
my ($class, $output) = @_; |
21
|
2
|
100
|
|
|
|
55
|
if ($output->Attributes) { |
22
|
1
|
|
|
|
|
49
|
my $item = unmarshal_attribute_map($output->Attributes); |
23
|
1
|
50
|
|
|
|
101
|
return $item if %$item; |
24
|
|
|
|
|
|
|
} |
25
|
1
|
|
|
|
|
17
|
return undef; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub run_service_command { |
29
|
0
|
|
|
0
|
0
|
|
my ($class, $service, %args) = @_; |
30
|
0
|
|
|
|
|
|
return $service->UpdateItem(%args); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |