Closed nichtich closed 10 years ago
That´s an useful enhancement, I did that in some custom fixes with simple subroutines. At which point would you bless the record structure without affecting the existing modules?
I don't know how Catmandu is effected by blessed structures. The internal array structure is simple enough to process without a blessed structure (e.g. with grep & map). The PICA::Data module requires some more refactoring for performance until we can split it from Catmandu::PICA.
Catmandu::Fix::pica_map is useful for Catmandu fixes but processing in raw Perl requires some helper methods, e.g.:
I refactored an independent function parse_pica_path to start with:
We could also bless the PICA record structure, e.g. to do:
In particular one should be able to easily filter holding fields, aggregated by level 1.