NAME
MooseX::Iterator::Locate -- read "locate" database with MooseX::Iterator
SYNOPSIS
use MooseX::Iterator::Locate;
my $it = MooseX::Iterator::Locate->new;
while ($it->has_next) {
print $it->next, "\n";
}
DESCRIPTION
MooseX::Iterator::Locate
reads a "locate" database file in iterator style. It's implemented as a front-end to File::Locate::Iterator
, providing MooseX::Iterator
style methods.
FUNCTIONS
$it = MooseX::Iterator::Locate->new (key=>value,...)
-
Create and return a new
MooseX::Iterator::Locate
object. Optional key/value pairs as passed toFile::Locate::Iterator->new
. $entry = $it->next
-
Return the next entry from the database.
$entry = $it->peek
-
Return the next entry from the database, but don't advance the iterator position. This lets you look at what
$it->next
would return. $bool = $it->has_next
-
Return true if there's a next entry available.
$it->reset
-
Move
$it
back to the start of the database again.As discussed in
File::Locate::Iterator
rewind()
this is only possible when the underlying database file or handle is a plain file or something else seekable.
SEE ALSO
MooseX::Iterator, File::Locate::Iterator, Moose
HOME PAGE
http://user42.tuxfamily.org/file-locate-iterator/index.html
COPYRIGHT
Copyright 2010 Kevin Ryde
File-Locate-Iterator is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
File-Locate-Iterator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with File-Locate-Iterator. If not, see http://www.gnu.org/licenses/