Catman...arc_map(3pm)

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

🌸 Catman...arc_map(3pm) β€” the vibe

okay bestie, so this is a page from the User Contributed Perl Documentation, and the man page itself goes by Catman...arc_map(3pm). Say hi. 🫢


✨ NAME ✨

Catmandu::Fix::Inline::marc_map β€” a lil marc_map-er for your Perl scripts. (DEPRECATED) πŸ’€


πŸŽ€ SYNOPSIS πŸŽ€

like, here's the whole thing, no notes:

use Catmandu::Fix::Inline::marc_map qw(:all);

my $title   = marc_map($data,'245a');
my @authors = marc_map($data,'100ab');

# Get all 245 in an array
@arr = marc_map($data,'245');

# Or as a string
$str = marc_map($data,'245');

# str joined by a semi-colon
$f245 = marc_map($data, '245', -join , ';');

# Get the 245-$a$b$c subfields ordered as given in the record
$str = marc_map($data,'245abc');

# Get the 245-$c$b$a subfields orders as given in the mapping
$str = marc_map($data,'245cba', -pluck => 1);

# Get the 008 characters 35-35
$str = marc_map($data,'008_/35-35');

# Get all 100 subfields except the digits
$str = marc_map($data,'100^0123456789');

# If the 260c exist set the output to 'OK' (else undef)
$ok  = marc_map($data,'260c',-value => 'OK');

# The $data should be a Catmandu-style MARC hash
{ record => [
   ['field', 'ind1' , 'ind2' , 'subfieldcode or underscore' , 'data' , 'subfield' , 'data' , ...] ,
    ...
]};

# Example
$data = { record => [
   ['001' , ' ', ' ' , '_' , 'myrecord-001' ] ,
   ['020' , ' ', ' ' , 'a' , '978-1449303587' ] ,
   ['245' , ' ', ' ' , 'a' , 'Learning Per' , 'c', '/ by Randal L. Schwartz'],
]};

πŸ’… DEPRECATED πŸ’…

okay so this module is deprecated. it's giving retired. 😭 the glow-up replacement is the inline functionality of Catmandu::Fix::marc_map β€” use that instead, bestie, fr fr.


πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::Fix::Inline::marc_map

and that's the whole page, periodt. πŸ‘‘

perl v5.38.2 Β· 2024-08-03 Β· Catman...arc_map(3pm) β€” mwah, ily, go read the non-deprecated one πŸ’–βœ¨

πŸ“¦ where this page comes from