Koha::BiblioUtils::Iterator - iterates over biblios provided by a DBIx::Class::ResultSet
This provides an iterator over a DBIx::Class::ResultSet that contains a biblionumber column. Returns a MARC::Record in scalar context. Returns biblionumber and marc in list context.
use Koha::BiblioUtils::Iterator; my $rs = $schema->resultset('biblioitems'); my $iterator = Koha::BiblioUtils::Iterator->new($rs); while (my $record = $iterator->next()) { // do something with $record }
my $it = new($sth, option => $value, ...);
Takes a ResultSet to iterate over, and gives you an iterator on it. Optional options may be specified.
Set to true to include item data in the resulting MARC record.
In a scalar context, provides the next MARC::Record from the ResultSet, or undef
if there are no more.
In a list context it will provide ($biblionumber, $record).