Catman...append(3pm)

πŸ“¦
version 1.320 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸŽ€ NAME πŸŽ€

Catmandu::Fix::marc_append β€” bestie, this one's a Fix, and what it does is add a value at the end of a MARC field πŸ’…

(yes, we're in the User Contributed Perl Documentation section here, 3pm girlies rise up 🫢)


✨ SYNOPSIS ✨

okay so picture this, you just wanna slap a period at the end of your 100 field:

# Append a period at the end of the 100 field
marc_append(100,".")

that's it. that's the whole vibe. iconic. πŸ’–


🌸 DESCRIPTION 🌸

It appends a value at the end of a MARC (sub)field. simple as. lowkey does exactly what it says on the tin πŸ¦‹


πŸ’œ METHODS πŸ’œ

marc_append(MARC_PATH , VALUE)

So for each (sub)field that matches the MARC_PATH, it appends the VALUE to the last subfield. no cap πŸ”₯

And that VALUE? It can be either:

  • a literal β€” like, just type the thing you want, bestie ✍️
  • or a reference to an existing field in the record, using the dollar JSON_PATH syntax πŸ’«

pick your fighter, both work 🫢


🌈 INLINE 🌈

Not me casually reminding you that this Fix can be used inline in a Perl script β€” yes, right there in your own code, main character energy only πŸ‘‘

use Catmandu::Fix::marc_append as => 'marc_append';

my $data = { record => [...] };

$data = marc_append($data, '100', '.');

go off, script πŸ’…βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

  • Catmandu::Fix β€” the mothership, the blueprint, the whole reason we're here πŸ“

fr fr, that's the entire page β€” no crumbs left behind, every flag, path and default accounted for πŸ’€πŸ’–

perl v5.38.2 Β· 2024-08-03 β€” and that's the sign-off bestie, mwah, go append some values πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from