[Koha-bugs] [Bug 33955] Add Koha::Biblio->normalized_upc
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Sep 18 16:10:36 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33955
--- Comment #8 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 155819
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155819&action=edit
[ALTERNATE] Bug 33955: Introduce Koha::MetadataExtractor and
->get_normalized_upc
This patch introduces a new pattern for the different ->get_<thing>
methods we've been adding. The aim is that code will look more like:
my $metadata_extractor = Koha::MetadataExtractor->new;
while ( my $biblio = $biblios->next ) {
my $record = $biblio->record;
my $schema = $biblio->record_schema;
$data->{$biblio->id}->{normalized_upc} =
$metadata_extractor->get_normalized_upc( { record => $record, schema =>
$schema } );
$data->{$biblio->id}->{normalized_ean} =
$metadata_extractor->get_normalized_ean( { record => $record, schema =>
$schema } );
}
The key is that we are actually reusing the MARC::Record, and code for
each schema is organized cleanly so easier to maintain.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list