LibreCat / Catmandu-MARC

Catmandu modules for working with MARC data
https://metacpan.org/release/Catmandu-MARC
Other
8 stars 10 forks source link

Catmandu::MARC should support adding subfields #68

Closed phochste closed 6 years ago

phochste commented 7 years ago
marc_set(245c,"test")

will overwrite the current 245c. Functionality is need to add new subfields

phochste commented 7 years ago

This is a temporary solution

do marc_each()
 if marc_match("245a","Cross-platform Perl")
   add_field(record.0.$append,c)
   add_field(record.0.$append,ok)
 end
end
phochste commented 7 years ago

In 1.17 this is also possible:

do marc_each()
 if marc_match("245a","Cross-platform Perl")
   marc_cut(245,x)
   add_field(x.0.subfields.$append.c,ok)
   marc_paste(x)
 end
end