Catmandu::Fix::marc_set(3pm)

Catmandu::Fix::marc_set3pm

Set a marc value of one (sub)field to a new value

Usage

    # Set a field in the leader
    if marc_match('LDR/6','c')
        marc_set('LDR/6','p')
    end
    # Set a control field
    marc_set('001',1234)
    # Set all the 650-p fields to 'test'
    marc_set('650p','test')
    # Set the 100-a subfield where indicator-1 is 3
    marc_set('100[3]a','Farquhar family.')
    # Copy data from another field in a subfield
    marc_set('100a','$.my.deep.field')

Overview

Set the value of a MARC subfield to a new value.

Methods

marc_set(MARC_PATH , VALUE)

Set a MARC subfield to a particular new value. This value can be a literal or reference an existing field in the record using the dollar JSON_PATH syntax.

Inline

This Fix can be used inline in a Perl script:

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

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.