<<

NAME

Koha::MetadataIterator - iterates over records

DESCRIPTION

This provides a fairly generic iterator that will return records provided by a function.

SYNOPSIS

    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
    }

METHODS

new

    my $it = new($next_func);

Takes a function that will provide the next bit of data.

next()

Provides the next record.

<<