Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Slackware::Slackget::Base 0.16

    Download button

    No screenshots available
    Downloads: 596  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.6/5)
    16 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    DUPUIS Arnaud | More programs
    Perl Artistic License / FREE
    May 22nd, 2008, 15:23 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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.

    SYNOPSIS

    This 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');

    CONSTRUCTOR

    new

    Take no arguments.

    my $base = Slackware::Slackget::Base->new();

    FUNCTIONS

    ls

    take a directory as argument and return an array wich contain all things in this directory.

    my @config_files = $base->ls('/etc/slack-get/') ;

    dir2files

    take 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_directory

    take 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_file

    Load 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_file

    Load 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_file

    Load a server list from a medias.xml file.

    $serverlist = $base->load_server_list_from_xml_file('servers.xml');

    load_server_list_from_xml_file

    An allias for load_media_list_from_xml_file(). Given for backward compatibility
    set_include_file_list

    By 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();

    ldd

    Like 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') ;

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Slackware class | Slackget methods | Perl module | Slackware | Slackget | slack-get

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM