Linux-Utils

 view release on metacpan or  search on metacpan

lib/Linux/Utils/YUM.pm  view on Meta::CPAN

package Linux::Utils::YUM;
$Linux::Utils::YUM::VERSION = '0.002';
use Modern::Perl;
use Moose;
use namespace::autoclean;
use Data::Printer alias => 'pdump';
use Kavorka 'method';
use English;

with
  'Util::Medley::Roles::Attributes::Spawn',
  'Util::Medley::Roles::Attributes::String';

=head1 NAME

Linux::Utils::YUM - Wrapper class for the 'yum' and 'repolist' commands.

=head1 VERSION

version 0.002

=cut

=head1 SYNOPSIS

  $yum = Linux::Utils::YUM->new;
  
  $aref = $yum->repoQuery (all       => 1,
                           installed => 1);
 
  $aref = $yum->repoList(enabled  => 1,
                         disabled => 0);
                         repoId   => $repoId);
=cut

########################################################

=head1 ATTRIBUTES

none

=head1 METHODS

=head2 repoList

Generates a list of configured YUM repositories.

Returns: ArrayRef[HashRef]

Example HashRef:

  {
    repoBaseurl   "http://centos3.zswap.net/7.8.2003/updates/x86_64/ (9 more)",
    repoExpire    "21,600 second(s) (last: Tue Oct 13 12:14:28 2020)",
    repoId        "updates/7/x86_64",
    repoMirrors   "http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=vag",
    repoName      "CentOS-7 - Updates",
    repoPkgs      "1,104",
    repoSize      "5.4 G",
    repoStatus    "enabled",
    repoUpdated   "Mon Sep 14 08:18:15 2020"
  }



( run in 0.549 second using v1.01-cache-2.11-cpan-ceb78f64989 )