Catman...ab_map(3pm)
π NAME π
Hiii bestie, welcome to Catmandu::Fix::mab_map β it's one of those 3pm pages, aka User Contributed Perl Documentation, and the entire job description is right there in the name: copy mab values of one field to a new field. That's the whole vibe. Copy from here, land over there. Iconic, honestly. π
β¨
β¨ SYNOPSIS β¨
Okay so, every single example from the page, in order, no skipping, no summarizing, we are doing ALL of them because I am not about to gatekeep. π«Ά
Copy all 245 subfields into the my.title hash
mab_map('245','my.title');
Copy the 245-$a$b$c subfields into the my.title hash
mab_map('245abc','my.title');
Copy the 100 subfields into the my.authors array
mab_map('100','my.authors.$append');
Add the 710 subfields into the my.authors array
mab_map('710','my.authors.$append');
Copy the 600-$x subfields into the my.subjects array while packing each into a genre.text hash
mab_map('600x','my.subjects.$append', -in => 'genre.text');
Copy the 008 characters 35-35 into the my.language hash
mab_map('008_/35-35','my.language');
Copy all the 600 fields into a my.stringy hash joining them by '; '
mab_map('600','my.stringy', -join => '; ');
When 024 field exists create the my.has024 hash with value 'found'
mab_map('024','my.has024', -value => 'found');
Do the same examples now with the fields in 'record2'
mab_map('245','my.title', -record => 'record2');
Not me re-reading example 9 like "wait, same examples" β yes bestie, the-record => 'record2'flag is how you point at'record2'instead. The page says do the same examples with those fields, so go wild with the other eight. π
π AUTHOR π
Johann Rolschewski <jorol@cpan.org> β the actual legend who wrote this. Respect. π«‘
πΈ COPYRIGHT AND LICENSE πΈ
This software is copyright (c) 2013 by Johann Rolschewski.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Likeβ¦ free free. Remix it, redistribute it, it's giving open source royalty. π
And that's the whole page, bestie, no crumbs left. This one shipped as part of the User Contributed Perl Documentation under perl v5.36.0, dated 2022-12-04. Mwah, go copy some mab values. ππ¦β¨
π¦ where this page comes from
- debian bookworm: libcatmandu-mab2-perl 0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-mab2-perl 0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-mab2-perl 0.24-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libcatmandu-mab2-perl 0.24-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms