Koha::MetadataIterator - iterates over records
This provides a fairly generic iterator that will return records provided by a function.
use Koha::MetadataIterator;
my $next_func = sub {
# something that'll return each record
};
my $iterator = Koha::MetadataIterator->new($next_func);
while ( my $record = $iterator->next() ) {
# do something with $record
}
my $it = new($next_func);
Takes a function that will provide the next bit of data.
Provides the next record.