Koha::BiblioUtils - contains fundamental biblio-related functions
This contains functions for normal operations on biblio records.
my $biblio = Koha::BiblioUtils->new($marc_record, [$biblionumber]);
Creates an instance of Koha::BiblioUtils
based on the marc record. If known, the biblionumber can be provided too.
my $biblio = Koha::BiblioUtils->get_from_biblionumber($biblionumber, %options);
This will give you an instance of Koha::BiblioUtils that is the biblio that you requested.
Options are:
$item_data
If true, then the item data will be merged into the record when it's loaded.
It will return undef
if the biblio doesn't exist.
my $it = Koha::BiblioUtils->get_all_biblios_iterator(%options);
This will provide an iterator object that will, one by one, provide the Koha::BiblioUtils of each biblio. This will include the item data.
The iterator is a Koha::MetadataIterator object.
Possible options are:
slice
slice may be defined as a hash of two values: index and count. index is the slice number to process and count is total number of slices. With this information the iterator returns just the given slice of records instead of all.
my $marc = Koha::BiblioUtils->get_marc_biblio($bibnum, %options);
This non-class function fetches the MARC::Record for the given biblio number. Nothing is returned if the biblionumber couldn't be found (or it somehow has no MARC data.)
Options are:
If set to true, item data is embedded in the record. Default is to not do this.