NAME
slackget10::PackageList - This class is a container of slackget10::Package object
VERSION
Version 1.0.0
SYNOPSIS
This class is a container of slackget10::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 slackget10::PackageList;
my $packagelist = slackget10::PackageList->new();
$packagelist->add($package);
$packagelist->get($index);
my $package = $packagelist->Shift();
CONSTRUCTOR
new
This class constructor don't take any parameters, but you can eventually disable the root tag <packagelist> by using 'no-root-tag' => 1.
my $PackageList = new slackget10::PackageList ();
my $PackageList = new slackget10::PackageList ('no-root-tag' => 1);
FUNCTIONS
This class inheritate from slackget10::List (slackget10::List), so you may want read the slackget10::List documentation for the supported methods of this class.
fill_from_xml
Fill the slackget10::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() ;
AUTHOR
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
BUGS
Please report any bugs or feature requests to bug-slackget10-PackageList@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.