line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Store::Resolver::Bag; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
4
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
4
|
1
|
|
|
1
|
|
171
|
use JSON; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
87
|
use Catmandu::Sane; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
7
|
1
|
|
|
1
|
|
490
|
use Catmandu::Store::Resolver::API; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
234
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Catmandu::Bag'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has api => (is => 'lazy'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub _build_api { |
14
|
0
|
|
|
0
|
|
|
my $self = shift; |
15
|
0
|
|
|
|
|
|
my $api = Catmandu::Store::Resolver::API->new( |
16
|
|
|
|
|
|
|
url => $self->store->url, |
17
|
|
|
|
|
|
|
username => $self->store->username, |
18
|
|
|
|
|
|
|
password => $self->store->password |
19
|
|
|
|
|
|
|
); |
20
|
0
|
|
|
|
|
|
return $api; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub generator { |
24
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub get { |
28
|
|
|
|
|
|
|
my ($self, $id) = @_; |
29
|
|
|
|
|
|
|
return $self->api->get($id); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub add { |
33
|
|
|
|
|
|
|
my ($self, $data) = @_; |
34
|
|
|
|
|
|
|
return $self->api->post($data); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub update { |
38
|
0
|
|
|
0
|
0
|
|
my ($self, $id, $data) = @_; |
39
|
0
|
|
|
|
|
|
return $self->api->put($id, $data); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub delete { |
43
|
|
|
|
|
|
|
my ($self, $id) = @_; |
44
|
|
|
|
|
|
|
return $self->api->delete($id); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub delete_all { |
48
|
|
|
|
|
|
|
my $self = shift; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |