Catman...arc_set(3pm)
π Catmandu::Fix::marc_set π
okay bestie, so this is a page from the User Contributed Perl Documentation, section 3pm β it's all about Catmandu::Fix::marc_set, and she's here to set a MARC value on one little (sub)field to a brand new value. no cap. π
β¨ NAME β¨
Catmandu::Fix::marc_set β set a marc value of one (sub)field to a new value π¦
πΈ SYNOPSIS πΈ
# 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')
π DESCRIPTION π
Set the value of a MARC subfield to a new value. that's it, that's the vibe. iconic behavior honestly π
π«Ά METHODS π«Ά
π marc_set(MARC_PATH , VALUE)
Set a MARC subfield to a particular new value. This value can be a literal or it can reference an existing field in the record using the dollar JSON_PATH syntax. lowkey the flexibility is the whole point fr fr β¨
π INLINE π
This Fix can be used inline in a Perl script, which is giving main character energy:
use Catmandu::Fix::marc_set as => 'marc_set';
my $data = { record => [...] };
$data = marc_set($data, '245a', 'test');
π₯ SEE ALSO π₯
Catmandu::Fix::marc_addCatmandu::Fix::marc_copyCatmandu::Fix::marc_cutCatmandu::Fix::marc_paste
go read those too, they're the rest of the friend group π«Ά
and that's a wrap, bestie π this was written for perl v5.38.2 and stamped 2024-08-03 β go slay some MARC records, periodt π
π¦ where this page comes from
- debian trixie: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-marc-perl 1.320-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms