The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Podman::Images

Provides the operations against images for a Podman service.

 my $Images = Podman::Images->new(Client => Podman::Client->new());
 
 # Display names and Ids of available images.
 for my $Image (@{ $Images->list() }) {
     my $Info = $Image->Inspect();
     printf "%s: %s\n", $Image->Id, $Info->{RepoTags}->[0];
 }

Attributes

has 'Client'; #23

Podman::Client API connector.

Methods

sub List($Self); #44

List all local stored images.

 use Podman::Client;
 
 my $Images = Podman::Images->new(Client => Podman::Client->new());
 
 my $List = $Images->List();
 is(ref $List, 'ARRAY', 'Images list ok.');
 
 if ($List) {
     is(ref $List->[0], 'Podman::Image', 'Images list items ok.');
 }