Catman...rc_has(3pm)

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

πŸ’– NAME πŸ’–

Catmandu::Fix::Condition::marc_has β€” the little fix that just wants to know: does this MARC (sub)field even exist, bestie? πŸ‘‘

(Also filed under the manual name marc_has(3pm) in the User Contributed Perl Documentation, if you're the type to look things up properly. πŸŽ€)


✨ SYNOPSIS ✨

# marc_has(MARC_PATH)

unless marc_has('245')
     add_field('error.$append','no 245 value!')
end

Look at her. Gorgeous. Iconic. She checks, and if it's a no, she goes straight to adding that error field. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the vibe: this condition only lets the enclosing fixes run if the MARC (sub)field actually exists. No field, no fixes. That's it. That's the whole personality. 🌸


πŸŽ€ METHODS πŸŽ€

🌈 marc_has(MARC_PATH)

Evaluates to true when the MARC_PATH values exist, and false otherwise. Simple as that, fr fr. πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

  • Catmandu::Fix::marc_has_many β€” for when one (sub)field just isn't enough and you need the whole squad. 🫢

perl v5.38.2 Β· 2024-08-03 Β· that's the version and the date, bestie, and that's the whole page. Go forth and check your fields. πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from