jorol / Catmandu-MAB2

Catmandu modules for working with MAB2 data
Other
2 stars 3 forks source link

Add a mab_each binder? #3

Closed phochste closed 9 years ago

phochste commented 9 years ago

Maybe an easy addition to make to Catmandu::MAB2 the mab_each fix like in: https://github.com/LibreCat/Catmandu-MARC/blob/master/lib/Catmandu/Fix/Bind/marc_each.pm

Say you want to apply a fix only if an e-subfield is available in the MAB file

 do mab_each
     if mab_match("500e",".*")
           fix()
           fix()
           ...
     end
 end

This would be hard to do when the 500 is a repeated field and you only want a fix for that 500 with an $e subfield.

jorol commented 9 years ago

Thanks. Implemented in the new release.

phochste commented 9 years ago

Super! Thanks

From: jorol notifications@github.com<mailto:notifications@github.com> Reply-To: jorol/Catmandu-MAB2 reply@reply.github.com<mailto:reply@reply.github.com> Date: Thursday 3 September 2015 19:50 To: jorol/Catmandu-MAB2 Catmandu-MAB2@noreply.github.com<mailto:Catmandu-MAB2@noreply.github.com> Cc: Patrick Hochstenbach Patrick.Hochstenbach@UGent.be<mailto:Patrick.Hochstenbach@UGent.be> Subject: Re: [Catmandu-MAB2] Add a mab_each binder? (#3)

Thanks. Implemented in the new release.

— Reply to this email directly or view it on GitHubhttps://github.com/jorol/Catmandu-MAB2/issues/3#issuecomment-137526392.