NAME
slackget10::Base - A module which centralize some base methods usefull to slack-get
VERSION
Version 1.0.0
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 slackget10::Base;
my $base = slackget10::Base->new();
my $packagelist = $base->compil_package_directory('/var/log/packages/');
$packagelist = $base->load_list_from_xml_file('installed.xml');
CONSTRUCTOR
FUNCTIONS
compil_packages_directory
take a directory where are store installed packages files and return a slackget10::PackageList object
my $packagelist = $base->compil_package_directory('/var/log/packages/');
load_installed_list_from_xml_file
Load the data for filling the list from an XML file. Return a slackget10::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' => slackget10::PackageList,
...
};
Ex:
my $hashref = {
'slackware' => blessed(slackget10::PackageList),
'slacky' => blessed(slackget10::PackageList),
'audioslack' => blessed(slackget10::PackageList),
'linuxpackages' => blessed(slackget10::PackageList),
};
This method is design for reading a packages.xml file.
$hashref = $base->load_packages_list_from_xml_file('packages.xml');
load_server_list_from_xml_file
Load a server list from a servers.xml file.
$serverlist = $base->load_server_list_from_xml_file('servers.xml');
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 ue it BEFORE compil_packages_directory() !
$base->set_include_file_list();
$packagelist = $base->compil_packages_directory();
AUTHOR
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
BUGS
Please report any bugs or feature requests to bug-slackget10-base@rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=slackget10. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2005 DUPUIS Arnaud, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.