Slackware::Slackget::Base

Slackware::Slackget::Base is a Perl module which centralize some base methods useful to slack-get.
Download

Slackware::Slackget::Base Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • DUPUIS Arnaud
  • Publisher web site:
  • http://search.cpan.org/~dupuisarn/slackget10-0.12c/lib/slackget10/Base.pm

Slackware::Slackget::Base Tags


Slackware::Slackget::Base Description

Slackware::Slackget::Base is a Perl module which centralize some base methods useful to slack-get. Slackware::Slackget::Base is a Perl module which centralize some base methods useful to slack-get.SYNOPSISThis module centralize bases tasks like package directory compilation, etc. This class is mainly designed to be a wrapper so it can change a lot before the release. use Slackware::Slackget::Base; my $base = Slackware::Slackget::Base->new(); my $packagelist = $base->compil_packages_directory('/var/log/packages/'); $packagelist = $base->load_list_from_xml_file('installed.xml');CONSTRUCTORnewTake no arguments. my $base = Slackware::Slackget::Base->new();FUNCTIONSlstake a directory as argument and return an array wich contain all things in this directory. my @config_files = $base->ls('/etc/slack-get/') ;dir2filestake at leat one directory in argument and recursively follow all subdirectories. Return an array containing all files encounter but WITHOUT symblic links. my @config_files = $base->dir2files('/etc','/usr/local/etc', "/$ENV{HOME}/etc/") ;compil_packages_directorytake a directory where are store installed packages files and return a Slackware::Slackget::PackageList object my $packagelist = $base->compil_packages_directory('/var/log/packages/');load_installed_list_from_xml_fileLoad the data for filling the list from an XML file. Return a Slackware::Slackget::PackageList. This method is design for reading a installed.xml file. $packagelist = $base->load_installed_list_from_xml_file('installed.xml');load_packages_list_from_xml_fileLoad the data for filling the list from an XML file. Return a hashref built on this model : my $hashref = { 'key' => Slackware::Slackget::PackageList, ... };Ex: my $hashref = { 'slackware' => blessed(Slackware::Slackget::PackageList), 'slacky' => blessed(Slackware::Slackget::PackageList), 'audioslack' => blessed(Slackware::Slackget::PackageList), 'linuxpackages' => blessed(Slackware::Slackget::PackageList), };This method is design for reading a packages.xml file. $hashref = $base->load_packages_list_from_xml_file('packages.xml');load_media_list_from_xml_fileLoad a server list from a medias.xml file. $serverlist = $base->load_server_list_from_xml_file('servers.xml');load_server_list_from_xml_fileAn allias for load_media_list_from_xml_file(). Given for backward compatibilityset_include_file_listBy default the file list is not include in the installed.xml for some size consideration (on my system including the file list into installed.xml make him grow 28 times ! It passed from 400 KB to 11 MB),So you can use this method to include the file list into installed.xml. BE carefull, to use it BEFORE compil_packages_directory() ! $base->set_include_file_list(); $packagelist = $base->compil_packages_directory();lddLike the UNIX command ldd. Do a ldd system call on a list of files and return an array of dependencies. my @dependecies = $base->ldd('/usr/bin/gcc', '/usr/bin/perl', '/bin/awk') ; Requirements: · Perl


Slackware::Slackget::Base Related Software