| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::Amazon::S3::Role::Bucket; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: Bucket role |
|
3
|
|
|
|
|
|
|
$Net::Amazon::S3::Role::Bucket::VERSION = '0.99'; |
|
4
|
99
|
|
|
99
|
|
66538
|
use Moose::Role; |
|
|
99
|
|
|
|
|
280
|
|
|
|
99
|
|
|
|
|
990
|
|
|
5
|
99
|
|
|
99
|
|
535451
|
use Scalar::Util; |
|
|
99
|
|
|
|
|
273
|
|
|
|
99
|
|
|
|
|
4509
|
|
|
6
|
99
|
|
|
99
|
|
733
|
use Safe::Isa (); |
|
|
99
|
|
|
|
|
243
|
|
|
|
99
|
|
|
|
|
26432
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
around BUILDARGS => sub { |
|
9
|
|
|
|
|
|
|
my ($orig, $class, %params) = @_; |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# bucket can be optional in HTTPRequest |
|
12
|
|
|
|
|
|
|
if ($params{bucket}) { |
|
13
|
|
|
|
|
|
|
my $region = $params{region}; |
|
14
|
|
|
|
|
|
|
$region = $params{bucket}->region |
|
15
|
|
|
|
|
|
|
if $params{bucket} |
|
16
|
|
|
|
|
|
|
and Scalar::Util::blessed( $params{bucket} ) |
|
17
|
|
|
|
|
|
|
and ! $params{region} |
|
18
|
|
|
|
|
|
|
and $params{bucket}->has_region |
|
19
|
|
|
|
|
|
|
; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$params{bucket} = $params{bucket}->name |
|
22
|
|
|
|
|
|
|
if $params{bucket}->$Safe::Isa::_isa ('Net::Amazon::S3::Client::Bucket'); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$params{bucket} = Net::Amazon::S3::Bucket->new( |
|
25
|
|
|
|
|
|
|
bucket => $params{bucket}, |
|
26
|
|
|
|
|
|
|
account => $params{s3}, |
|
27
|
|
|
|
|
|
|
(region => $region) x!! $region, |
|
28
|
|
|
|
|
|
|
) if $params{bucket} and ! ref $params{bucket}; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
delete $params{region}; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
$class->$orig( %params ); |
|
34
|
|
|
|
|
|
|
}; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has bucket => ( |
|
37
|
|
|
|
|
|
|
is => 'ro', |
|
38
|
|
|
|
|
|
|
isa => 'Net::Amazon::S3::Bucket', |
|
39
|
|
|
|
|
|
|
required => 1, |
|
40
|
|
|
|
|
|
|
); |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=pod |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding UTF-8 |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Net::Amazon::S3::Role::Bucket - Bucket role |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
version 0.99 |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Branislav Zahradník <barney@cpan.org> |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
67
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |