Catmandu::Fix::pica_add - add new subfields to record
# Copy value of dc.identifier to PICA field 003A as subfield 0 pica_add('dc.identifier', '003A0'); # Same as above, but use another record path ('pica') pica_add('dc.identifier', '003A0', record:'pica'); # force the creation of a new field 003A pica_add('dc.identifier', '003A0', force_new:1); # Add multiple subfields # "dc": {"subjects": ["foo", "bar"]} pica_add('dc.subjects', '004Faf')
This fix adds subfields with value of PATH to the PICA field. The value of PATH must be either a scalar or an array.
If PICA field does not exist, it will be created.
record - alternative record key (default is 'record')
force_new - force the creation of a new field
See Catmandu::Fix::pica_set for setting a new value to an existing subfield.
See Catmandu::Fix::pica_map if you want to copy values from a PICA record.
See PICA::Path for a definition of PICA path expressions and PICA::Data for more methods to process parsed PICA+ records.
To install Catmandu::PICA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu::PICA
CPAN shell
perl -MCPAN -e shell install Catmandu::PICA
For more information on module installation, please visit the detailed CPAN module installation guide.