NAME
WWW::AUR::Iterator - An iterator for looping through all AUR packages.
SYNOPSIS
my $iter = $aurobj->packages;
# or my $iter = WWW::AUR::Iterator->new();
while ( my $pkg = $iter->next ) {
print $pkg->name, "\n";
}
$iter->reset;
while ( my $pkgname = $iter->next_name ) {
print "$pkgname\n";
}
DESCRIPTION
A WWW::AUR::Iterator object can be used to iterate through all packages currently listed on the AUR webiste.
CONSTRUCTOR
$OBJ = WWW::AUR::Iterator->new( %PATH_PARAMS );
%PATH_PARAMS
-
The parameters are the same as the WWW::AUR constructor. These are propogated to any WWW::AUR::Package objects that are created.
$OBJ
-
A WWW::AUR::Iterator object.
METHODS
reset
$OBJ->reset;
The iterator is reset to the beginning of all packages available in the AUR. This starts the iteration over just like creating a new WWW::AUR::Iterator object.
next
$PKGOBJ | undef = $OBJ->next();
$PKGOBJ
-
A WWW::AUR::Package object representing the next package in the AUR.
undef
-
If we have iterated through all packages, then
undef
is returned.
next_name
$PKGNAME | undef = $OBJ->next_name();
$PKGNAME
-
The name of the next package in the AUR. This is faster than "next" in METHODS because WWW::AUR::Package objects do not have to be created for every package on the AUR.
undef
-
If we have iterated through all packages, then
undef
is returned.
SEE ALSO
AUTHOR
Justin Davis, <juster at cpan dot org>
BUGS
Please report any bugs or feature requests to bug-www-aur at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-AUR. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
Send me an email at the above address if you have any questions or need help.
LICENSE AND COPYRIGHT
Copyright 2010 Justin Davis.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.