Config::YUM

Config::YUM is a Perl extension for parsing yum.conf.
Download

Config::YUM Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Oliver Falk
  • Publisher web site:
  • http://search.cpan.org/~opitz/Config-YUM-1.9/lib/Config/YUM.pm

Config::YUM Tags


Config::YUM Description

Config::YUM is a Perl extension for parsing yum.conf. Config::YUM is a Perl extension for parsing yum.conf.SYNOPSIS use Config::YUM; my $yp = new Config::YUM; my $yum_conf = $yp->parse(); foreach(keys %{$yum_conf}) { print "Section: $_ is called " . $yum_conf->{$_}->{name} . "n"; } $yum_conf will be a a hash, all INI sections are the primary hash keys. include= will be automatically downloaded merged with the local yum.conf mirrorlists will also be downloaded and saved as an array in $yum_conf->{somerepo}->{baseurls} the first url in mirrorlists will be safed as $yum_conf->{somerepo}->{baseurl}. exclude statements will be splited and safed to $yum_conf->{somerepo}->{exclude_hash}. Note that we safe a perl regex string as keys here. To say it with one sentence. Config::YUM automatically parses a yum.conf does the downloading and provides you with a ready to use perl hash. :-) You can define a few things @ new: - use_cache: 0/1 (1 will enable, default: 0; Uses Cache::File) - yum_conf: path to your yum.conf (default: /etc/yum.conf) - yum_repos_d: path to your yum.repos.d (default: /etc/yum.repos.d) - agent: You LWP::UserAgent agent string (default: Config::YUM/$VERSION) - releasever: Define your RH/FC release version (rpm -qf --queryformat %{VERSION} /etc/redhat-release; Default: automatically queried) - basearch: Define your basearch (uname -i; Default: automatically discovered) - download_primary: Define if we should download/parse the primary.xml.gz These arguments can be specified this way (don't forget the '{'!) my $yp = new Config::YUM({ use_cache => 1, yum_conf => '/etc/yum.conf', yum_repos_d => '/etc/yum.repos.d', agent => 'MyProgram/$VERSION', relasever => 4, basearch => 'i386', download_primary => 1 });This module provides you with a few functions,parse() will return a hash containing the allready parsed local/remote yum.conf.yumconf_local() will return a hash containing the allready parsed local yum.conf (Will run parse(), if you didn't yet)yumconf_remote() will return a hash containing the allready parsed remote yum.conf (Will run parse(), if you didn't yet) Requirements: · Perl


Config::YUM Related Software