Net::Amazon::S3::ACL::Grant is a Perl module to represent a grant in a S3 ACL.
SYNOPSIS
# if you have some XPathContext and node...
my $grant = Net::Amazon::S3::ACL::Grant->create({
xpc => $xpc,
node => $node,
});
# otherwise
$grant = Net::Amazon::S3::ACL::Grant->create({
target => 'foo@example.com',
permissions => [qw( READ WRITE )],
});
# or also
$grant = Net::Amazon::S3::ACL::Grant->canonical(
'foo@example.com' => [qw( READ WRITE )],
);
# given a $grant...
my $key = $grant->key();
my $permissions = $grant->permissions();
print "permissions for '$key': [@$permissions]
";
$grant->add_permissions(qw( READ_ACP WRITE_ACP ));
$grant->delete_permissions('WRITE');
die 'invalid!' unless $grant->is_valid();
$grant->parse($xpc, $node);
print $grant->stringify();
This class represents a single grant in the grants hash of Net::Amazon::S3::ACL. This is actually a base class that has been specialised into three implementations, representing the three different ways to specify a grantee in AWS as of writing this.
Product's homepage
Requirements:
· Perl