File Coverage

blib/lib/Net/Amazon/S3/ACL/Grantee/Group.pm
Criterion Covered Total %
statement 8 9 88.8
branch n/a
condition n/a
subroutine 4 5 80.0
pod 0 4 0.0
total 12 18 66.6


line stmt bran cond sub pod time code
1             package Net::Amazon::S3::ACL::Grantee::Group;
2             # ABSTRACT: Represents group reference for ACL
3             $Net::Amazon::S3::ACL::Grantee::Group::VERSION = '0.98';
4 97     97   806 use Moose;
  97         294  
  97         739  
5              
6             extends 'Net::Amazon::S3::ACL::Grantee';
7              
8             has group => (
9             is => 'ro',
10             isa => 'Str',
11             required => 1,
12             );
13              
14             around BUILDARGS => sub {
15             my ($orig, $class) = (shift, shift);
16             unshift @_, 'group' if @_ == 1 && ! ref $_[0];
17              
18             return $class->$orig (@_);
19             };
20              
21             sub format_for_header {
22 2     2 0 6 my ($self) = @_;
23              
24 2         4 return "uri=\"${\ $self->group }\"";
  2         60  
25             }
26              
27             sub AUTHENTICATED_USERS {
28 0     0 0 0 __PACKAGE__->new ('http://acs.amazonaws.com/groups/global/AuthenticatedUsers');
29             }
30              
31             sub ALL_USERS {
32 1     1 0 7 __PACKAGE__->new ('http://acs.amazonaws.com/groups/global/AllUsers');
33             }
34              
35             sub LOG_DELIVERY {
36 1     1 0 4 __PACKAGE__->new ('http://acs.amazonaws.com/groups/s3/LogDelivery');
37             }
38              
39             1;
40              
41             __END__
42              
43             =pod
44              
45             =encoding UTF-8
46              
47             =head1 NAME
48              
49             Net::Amazon::S3::ACL::Grantee::Group - Represents group reference for ACL
50              
51             =head1 VERSION
52              
53             version 0.98
54              
55             =head1 SYNOPSIS
56              
57             use Net::Amazon::S3::ACL::Grantee::Group;
58              
59             my $group = Net::Amazon::S3::ACL::Grantee::Group->AUTHENTICATED_USERS;
60             my $group = Net::Amazon::S3::ACL::Grantee::Group->ALL_USERS;
61             my $group = Net::Amazon::S3::ACL::Grantee::Group->LOG_DELIVERY;
62             my $group = Net::Amazon::S3::ACL::Grantee::Group->new ('http://...');
63             my $group = Net::Amazon::S3::ACL::Grantee::Group->new (group => 'http://...');
64              
65             =head1 AUTHOR
66              
67             Branislav Zahradník <barney@cpan.org>
68              
69             =head1 COPYRIGHT AND LICENSE
70              
71             This module is part of L<Net::Amazon::S3>.
72              
73             =head1 AUTHOR
74              
75             Branislav Zahradník <barney@cpan.org>
76              
77             =head1 COPYRIGHT AND LICENSE
78              
79             This software is copyright (c) 2021 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník.
80              
81             This is free software; you can redistribute it and/or modify it under
82             the same terms as the Perl 5 programming language system itself.
83              
84             =cut