line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Amazon::S3::ACL::Grant::ID; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1318
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
6
|
1
|
|
|
1
|
|
5
|
use English qw( -no_match_vars ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
562
|
use base qw(Net::Amazon::S3::ACL::Grant); |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
407
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw( ID displayname )); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Module implementation here |
12
|
|
|
|
|
|
|
sub parse_grantee { |
13
|
0
|
|
|
0
|
1
|
|
my ($self, $xpc, $node) = @_; |
14
|
|
|
|
|
|
|
|
15
|
0
|
0
|
|
|
|
|
my $id = $xpc->findvalue('.//s3:Grantee/s3:ID', $node) |
16
|
|
|
|
|
|
|
or croak 'no ID grant in provided node'; |
17
|
0
|
|
|
|
|
|
$self->ID($id); |
18
|
0
|
|
|
|
|
|
$self->key($id); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $name = $xpc->findvalue('.//s3:Grantee/s3:DisplayName', $node); |
21
|
0
|
|
|
|
|
|
$self->displayname($name); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $self; |
24
|
|
|
|
|
|
|
} ## end sub _parse_acl_grant |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub populate_from_target { |
27
|
0
|
|
|
0
|
1
|
|
my ($self, $target) = @_; |
28
|
0
|
|
|
|
|
|
$self->ID($target); |
29
|
0
|
|
|
|
|
|
$self->displayname(undef); |
30
|
0
|
|
|
|
|
|
$self->key($target); |
31
|
0
|
|
|
|
|
|
return $self; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
0
|
|
|
sub _set_key { $_[0]->key($_[0]->ID()); } |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub stringify_grantee { |
37
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
# The DisplayName attribute is actually ignored by AWS, but for |
40
|
|
|
|
|
|
|
# sake of completeness we're including it here |
41
|
0
|
|
|
|
|
|
my $id = $self->ID(); |
42
|
0
|
|
|
|
|
|
my $displayname = $self->displayname(); |
43
|
0
|
0
|
|
|
|
|
$displayname = '' unless defined $displayname; |
44
|
0
|
|
|
|
|
|
return <<"END_OF_GRANTEE"; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
$id |
47
|
|
|
|
|
|
|
$displayname |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
END_OF_GRANTEE |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
53
|
|
|
|
|
|
|
__END__ |