Catmandu::Fix::marc_add(3pm)

Catmandu::Fix::marc_add3pm

Add new fields to marc

Usage

    # Set literal values
    marc_add('900', a, 'test' , 'b', test)
    marc_add('900', ind1 , ' ' , a, 'test' , 'b', test)
    marc_add('900', ind1 , ' ' , a, 'test' , 'b', test)
    # Set control fields
    marc_add('009','_','23123131')
    # Copy data from an other field (when the field value is an array, the
    # subfield will be repeated)
    marc_add('900', a, '$.my.data.field')

Overview

Add a new subfield to MARC record.

Methods

marc_add(MARC_FIELD, SUBFIELD, VALUE, [ SUBFIELD, VALUE , ... ])

Add new subfields to a MARC record. The MARC_FIELD should contain a marc field name, all other arguments contain the subfields to be added.

By default literal values will be added. To point to an existing value in a record use the JSON_PATH syntax with a dollar '$.' added in front.

Inline

This Fix can be used inline in a Perl script:

    use Catmandu::Fix::marc_add as => 'marc_add';
    my $data = { record => [...] };
    $data = marc_add($data,'245','a','title');

Releases

6 releases since Debian 8 (Jessie); the text changed 4 times.

  1. 8
  2. 9
  3. 10–11
  4. 12
  5. 13

From libcatmandu-marc-perl 1.320-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.