https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34828 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #7)
What do we want to type/read?
I personally would like something like:
my $extractor = Koha::Biblio::MetadataExtractor->new({biblio => $biblio});
Thinking about it again today and I suppose I just wonder about all the different objects we'll have to do similar things. Koha::Biblio Koha::Biblio::Metadata Koha::Biblio::MetadataExtractor Koha::MetadataRecord Koha::RecordProcessor I can't keep them all straight. I hadn't even heard of Koha::MetadataRecord until yesterday. Something like "get_normalized_upc" should conceptually be a method of Koha::Biblio or Koha::Biblio::Metadata. But it would be a bit annoying to have a lot of if/elsif/else statements in methods like "get_normalized_upc" based on a schema condition. So I can see the value of Koha::Biblio::MetadataExtractor and having separate subclasses for different schemas, as it is a clean way of providing schema specific method overrides. But surely "hiding" it within Koha::Biblio or Koha::Biblio::Metadata would be better reading/writing for developers. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.