line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::STF::Bucket; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
3
|
|
|
|
|
|
|
use Class::Accessor::Lite |
4
|
1
|
|
|
|
|
11
|
new => 1, |
5
|
|
|
|
|
|
|
rw => [ qw( |
6
|
|
|
|
|
|
|
client |
7
|
|
|
|
|
|
|
name |
8
|
|
|
|
|
|
|
) ] |
9
|
1
|
|
|
1
|
|
946
|
; |
|
1
|
|
|
|
|
1195
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub delete { |
12
|
0
|
|
|
0
|
0
|
|
my ($self, $recursive) = @_; |
13
|
0
|
|
|
|
|
|
$self->client->delete_bucket( $self->name, $recursive ); |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub get_object { |
17
|
0
|
|
|
0
|
0
|
|
my ($self, $key, $opts) = @_; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
$self->client->get_object( |
20
|
|
|
|
|
|
|
join( "/", $self->name, $key ), |
21
|
|
|
|
|
|
|
$opts |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub put_object { |
26
|
0
|
|
|
0
|
0
|
|
my ($self, $key, $content, $opts) = @_; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
$self->client->put_object( |
29
|
|
|
|
|
|
|
join( "/", $self->name, $key ), |
30
|
|
|
|
|
|
|
$content, |
31
|
|
|
|
|
|
|
$opts |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub delete_object { |
36
|
0
|
|
|
0
|
0
|
|
my ($self, $key, $opts) = @_; |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
$self->client->delete_object( |
39
|
|
|
|
|
|
|
join( "/", $self->name, $key ), |
40
|
|
|
|
|
|
|
$opts |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |