NAME
Slackware::Slackget::PackageList - This class is a container of Slackware::Slackget::Package object
VERSION
Version 1.0.0
SYNOPSIS
This class is a container of Slackware::Slackget::Package object, and allow you to perform some operations on this packages list. As the Package's list class, it is a slack-get's internal representation of data.
use Slackware::Slackget::PackageList;
my $packagelist = Slackware::Slackget::PackageList->new();
$packagelist->add($package);
$packagelist->get($index);
my $package = $packagelist->Shift();
CONSTRUCTOR
new
This class constructor don't take any parameters to works properly, but you can eventually disable the root tag <packagelist> by using 'no-root-tag' => 1, and modify the default encoding (utf8) by passing an 'encoding' => <your encoding> parameter. Thoses options are only related to the export functions.
my $PackageList = new Slackware::Slackget::PackageList ();
my $PackageList = new Slackware::Slackget::PackageList ('no-root-tag' => 1);
FUNCTIONS
This class inheritate from Slackware::Slackget::List (Slackware::Slackget::List), so you may want read the Slackware::Slackget::List documentation for the supported methods of this class.
The present documentation present only methods that differs from the Slackware::Slackget::List class.
fill_from_xml
Fill the Slackware::Slackget::PackageList from the XML data passed as argument.
$packagelist->fill_from_xml(
'<choice action="installpkg">
<package id="gcc-objc-3.3.4-i486-1">
<date hour="12:32:00" day-number="12" month-number="06" year="2004" />
<compressed-size>1395</compressed-size>
<location>./slackware/d</location>
<package-source>slackware</package-source>
<version>3.3.4</version>
<name>gcc-objc</name>
<uncompressed-size>3250</uncompressed-size>
<description>gcc-objc (Objective-C support for GCC)
Objective-C support for the GNU Compiler Collection.
This package contains those parts of the compiler collection needed to
compile code written in Objective-C. Objective-C was originally
developed to add object-oriented extensions to the C language, and is
best known as the native language of the NeXT computer.
</description>
<signature-checksum>565a10ce130b4287acf188a6c303a1a4</signature-checksum>
<checksum>23bae31e3ffde5e7f44617bbdc7eb860</checksum>
<architecture>i486</architecture>
<package-location>slackware/d/</package-location>
<package-version>1</package-version>
<referer>gcc-objc</referer>
</package>
<package id="gcc-objc-3.4.3-i486-1">
<date hour="18:24:00" day-number="21" month-number="12" year="2004" />
<compressed-size>1589</compressed-size>
<package-source>slackware</package-source>
<version>3.4.3</version>
<name>gcc-objc</name>
<signature-checksum>1027468ed0d63fcdd584f74d2696bf99</signature-checksum>
<architecture>i486</architecture>
<checksum>5e659a567d944d6824f423d65e4f940f</checksum>
<package-location>testing/packages/gcc-3.4.3/</package-location>
<package-version>1</package-version>
<referer>gcc-objc</referer>
</package>
</choice>'
);
Sort
Apply the Perl built-in function sort() on the PackageList. This method return nothing.
$list->Sort() ;
index_list
Create an index on the PackageList. This index don't take many memory but speed a lot search, especially when you already have the package id !
The index is build with the Package ID.
get_indexed
Return a package, as well as Get() do but use the index to return it quickly. You must provide a package ID to this method.
my $pkg = $list->get_indexed($qlistviewitem->text(5)) ;
get_indexes
Return the list of all indexes
my @indexes = $list->get_indexes() ;
AUTHOR
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
BUGS
Please report any bugs or feature requests to bug-slackget10@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.
BUGS
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.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Slackware::Slackget
You can also look for information at:
Infinity Perl website
slack-get specific website
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.
SEE ALSO
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.