Catman...as_many(3pm)

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

πŸ’– NAME πŸ’–

Catmandu::Fix::Condition::marc_has_many β€” bestie, this is the vibe check that asks: does this MARC record have more than one (sub)field? That's it. That's the whole job. ✨

(also hi, you found this in section 3pm of the User Contributed Perl Documentation, aka the perl module corner of the manual, welcome 🫢)


🌸 SYNOPSIS 🌸

# marc_has_many(MARC_PATH)

if marc_has_many('245')
     add_field('error.$append','more than one 245!')
end

okay so like, if the 245 shows up more than once, you get yourself a lil error field. iconic behavior honestly πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: marc_has_many only lets the enclosing fixes run when the MARC record has more than one (sub)field. Otherwise? Nothing happens. The fixes just sit there. Respectfully. πŸ™ˆ


πŸŽ€ METHODS πŸŽ€

⭐ marc_has_many(MARC_PATH)

Evaluates to true when the MARC has more than one (sub)field, and false otherwise. No in-between, no situationship, just true or false. periodt. πŸ‘‘


🌈 SEE ALSO 🌈

  • Catmandu::Fix::marc_has

and that's the whole page, bestie!! this one came to you courtesy of perl v5.38.2, dated 2024-08-03 β€” the User Contributed Perl Documentation really said "here, take this and go build something slay" πŸ§šπŸ’œβœ¨

πŸ“¦ where this page comes from