Slackware::Slackget::List - This class is a general List class.
Version 1.0.0
This class is a container of Slackware::Slackget::Package object, and allow you to perform some operations on this packages list. As the Package class, it is a slack-get's internal representation of data.
use Slackware::Slackget::List; my $list = Slackware::Slackget::List->new(); $list->add($element); $list->get($index); my $element = $list->Shift();
This class constructor take the followings arguments :
* list_type. You must provide a string which will specialize your list. Ex:
For a Slackware::Slackget::Package list : my $packagelist = new Slackware::Slackget::List (list_type => 'Slackware::Slackget::Package') ;
* root-tag : the root tag of the XML generated by the to_XML method.
For a Slackware::Slackget::Package list : my $packagelist = new Slackware::Slackget::List ('root-tag' => 'packagelist') ;
* no-root-tag : to disabling the root tag in the generated XML output.
For a Slackware::Slackget::Package list : my $packagelist = new Slackware::Slackget::List ('no-root-tag' => 1) ;
A traditionnal constructor is :
my $speciallist = new Slackware::Slackget::List ( 'list_type' => 'Slackware::Slackget::Special', 'root-tag' => 'special-list' );
But look at special class Slackware::Slackget::*List before creating your own list : maybe I have already do the work :)
Add the element passed in argument to the list. The argument must be an object of the list_type type.
$list->add($element);
return the $index -nth object in the list
$list->get($index);
return a reference on an array containing all packages.
$arrayref = $list->get_all();
Same as the Perl shift. Shifts of and return the first object of the Slackware::Slackget::List;
$element = $list->Shift();
If a numerical index is passed shift and return the given index.
return an XML encoded string.
$xml = $list->to_XML();
return an HTML encoded string.
$xml = $list->to_HTML();
Alias for to_XML()
Return the length (the number of element) of the current list. If you are interest by the size in memory you have to multiply by yourself the number returned by this method by the size of a single object.
$list->Length ;
Empty the list
$list->empty ;
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
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.