Slackware::Slackget::SpecialFiles::FILELIST - An interface for the special file FILELIST.TXT
Version 1.0.0
This class contain all methods for the treatment of the FILELIST.TXT file
use Slackware::Slackget::SpecialFiles::FILELIST; my $spec_file = Slackware::Slackget::SpecialFiles::FILELIST->new('FILELIST.TXT'); $spec_file->compil(); my $ref = $spec_file->get_file_list() ;
This class care about package-namespace, which is the root set of a package (slackware, extra or pasture for packages from Slackware)
All classes from the Slackware::Slackget::SpecialFiles:: namespace need the followings methods :
- a contructor new() - a method compil() - a method get_result(), which one can be an alias on another method of the class.
Moreover, the get_result() methode need to return a hashref. Keys of this hashref are the filenames.
Classes from ths namespace represent an abstraction of the special file they can manage so informations stored in the returned hashref must have a direct link with this special file.
Take a file, a Slackware::Slackget::Config object and an id name :
my $spec_chk = Slackware::Slackget::SpecialFiles::CHECKSUMS->new('/home/packages/FILELIST.TXT',$config,'slackware');
The constructor return undef if the file does not exist.
This method take no arguments, and extract the list of couple (file/package-namespace). Those couple are store into an internal data structure.
$list->compile();
Return a hashref build on this model
$ref = { filename => Slackware::Slackget::Package } my $ref = $list->get_file_list ;
Return informations relative to a packages as a hashref.
my $hashref = $list->get_package($package_name) ;
Alias for get_file_list().
return a Slackware::Slackget::Date object, which is the date of the FILELIST.TXT
my $date = $list->get_date ;
Same as to_xml(), provided for backward compatibility.
return a string containing all packages name carriage return separated.
WARNING: ONLY FOR DEBUG
my $string = $list->to_xml();
Same as meta_to_xml(), provided for backward compatibility.
Return an XML encoded string which represent the meta informations of the FILELIST.TXT file.
my $xml_string = $list->meta_to_xml ;
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
<a.dupuis@infinityperl.org>
Please report any bugs or feature requests to bug-Slackware-Slackget@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-Slackware-Slackget@rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Slackware::Slackget
You can also look for information at:
Infinity Perl website
http://www.infinityperl.org/category/slack-get
slack-get specific website
http://slackget.infinityperl.org
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Slackware-Slackget
CPAN Ratings
http://cpanratings.perl.org/d/Slackware-Slackget
Search CPAN
http://search.cpan.org/dist/Slackware-Slackget
Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.
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.
To install Slackware::Slackget, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Slackware::Slackget
CPAN shell
perl -MCPAN -e shell install Slackware::Slackget
For more information on module installation, please visit the detailed CPAN module installation guide.