Catman..._match(3pm)
π NAME π
okay so bestie, welcome to Catman..._match(3pm) β she's part of the User Contributed Perl Documentation collection and she's here to serve.
Catmandu::Fix::Condition::marc_match β literally just: test if a MARC (sub)field matches a value. that's it. that's the whole gig. π
β¨ SYNOPSIS β¨
no cap, here's how she shows up in the wild:
# marc_match(MARC_PATH,REGEX)
# Match when 245 contains the value "My funny title"
if marc_match('245','My funny title')
add_field('my.funny.title','true')
end
# Match when 245a contains the value "My funny title"
if marc_match('245a','My funny title')
add_field('my.funny.title','true')
end
# Match when all 650 fields contain digits
if marc_match('650','[0-9]')
add_field('has_digits','true')
end
# Match when /one/ of the 650 fields contain digits
do marc_each()
if marc_all_match('650','[0-9]')
add_field('has_digits','true')
end
end
πΈ DESCRIPTION πΈ
so the vibe is: your enclosing fixes only get evaluated if the MARC (sub)field matches a regular expression. π¦
and when the MARC field is a repeated field? then all of the MARC fields have to match the regular expression. every single one. she's thorough like that. π
π DEPRECATED: bestie I have to be honest with you β this condition is the same as Catmandu::Fix::Condition::marc_all_match and it will be deleted in the future. it's giving "on borrowed time". plan accordingly. π
π METHODS π
π
marc_match(MARC_PATH, REGEX)
evaluates to true when all MARC_PATH values match the REGEX, and false otherwise. that's the whole method, she's simple, she's iconic, she ate. β¨
π SEE ALSO π
go give her siblings some love too, they're all in the family:
Catmandu::Fix::Condition::marc_all_matchCatmandu::Fix::Condition::marc_any_match
okay that's the whole page bestie, you're so welcome π«Ά
this was documented under perl v5.38.2 and dated 2024-08-03 β like, clocked in and everything. bye mwah π
π¦ 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