line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Podman::Images; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
547429
|
use Mojo::Base 'Podman::Client'; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
12
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
198
|
use Mojo::Collection qw(c); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
103
|
|
6
|
2
|
|
|
2
|
|
11
|
use Scalar::Util qw(blessed); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
77
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
431
|
use Podman::Image; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
730
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'names_only' => undef; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub list { |
13
|
1
|
|
|
1
|
1
|
29970
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
1
|
50
|
|
|
|
42
|
if (!blessed($self)) { |
16
|
0
|
|
|
|
|
0
|
$self = __PACKAGE__->new(); |
17
|
0
|
|
|
|
|
0
|
my %opts = @_; |
18
|
0
|
|
|
|
|
0
|
$self->names_only($opts{names_only}); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
55
|
my $images = $self->get('images/json', parameters => {all => 1},)->json; |
22
|
|
|
|
|
|
|
my @list = map { |
23
|
2
|
|
33
|
|
|
74
|
my ($name) = split /:/, $_->{Names}->[0] || $_->{Id}; |
24
|
2
|
50
|
|
|
|
10
|
$self->names_only ? $name : Podman::Image->new(name => $name); |
25
|
1
|
|
|
|
|
438
|
} @{$images}; |
|
1
|
|
|
|
|
4
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
43
|
return c(@list); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub prune { |
31
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
$self = __PACKAGE__->new() unless blessed($self); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
$self->post('images/prune'); |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
__END__ |