slackget10::SpecialFiles::PACKAGES - An interface for the special file PACKAGES.TXT
Version 1.0.0
This class contain all methods for the treatment of the PACKAGES.TXT file
use slackget10::SpecialFiles::PACKAGES; my $pack = slackget10::SpecialFiles::PACKAGES->new('PACKAGES.TXT','slackware'); ...
All classes from the slackget10::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 slackget10::Config object and an id name :
my $pack = slackget10::SpecialFiles::PACKAGES->new('PACKAGES.TXT',$config,'slackware');
Take no argument, and compile the informations contains in the PACKAGES.TXT file into the internal data structure of slack-get.
$pack->compile ;
This method take the whole file PACKAGES.TXT and split it into entity (one package or meta informations)
This method parse the 10 first lines of the PACKAGES.TXT and extract globals informations. It define the 'starting-position' object tag (this information is only for coders).
$pack->get_meta();
Not yet implemented.
Return informations relative to a packages as a hashref.
my $hashref = $list->get_package($package_name) ;
return a slackget10::Date object, which is the date of the PACKAGES.TXT
my $date = $pack->get_date ;
return the package as an XML encoded string.
$xml = $package->to_XML();
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
<a.dupuis@infinityperl.org>
Please report any bugs or feature requests to bug-slackget10-networking@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.
bug-slackget10-networking@rt.cpan.org
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 slackget10, copy and paste the appropriate command in to your terminal.
cpanm
cpanm slackget10
CPAN shell
perl -MCPAN -e shell install slackget10
For more information on module installation, please visit the detailed CPAN module installation guide.