Catman...l_equal(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

Catmandu::Fix::Condition::all_equal β€” the fix that runs your fixes when every path value equals a string value πŸ’…

It's from the Catmandu::Fix::Condition::all_equal page in section 3pm, and bestie, it's giving "simple and it knows it" πŸŽ€


🌸 DESCRIPTION 🌸

Okay so listen 🫢 this fix is literally the simple alternative to Catmandu::Fix::Condition::all_match. Like, its whole personality is "I'm the chill one."

No regular expressions are involved. None. Zero. Not a single regex walks through that door πŸ™ˆ

Strings get compared using the regular operator 'eq' β€” that's it, that's the whole vibe. Periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

# all_equal(X,Y) is true when value of X == 'Y'
if all_equal('year','2018')
 add_field('my.funny.title','true')
end

# all_equal(X,Y) is false when value of X == 'Ya'

No cap, that's the entire show πŸ‘‘


🌈 SEE ALSO 🌈

  • Catmandu::Fix β€” the main character, the mothership, the blueprint πŸ’–
  • Catmandu::Fix::Condition::any_equal β€” same energy but it only needs one match to be happy, she's flexible like that ✨

ngl the second example in the SYNOPSIS is just sitting there with no if/end around it, and it's lowkey iconic for that πŸ’€ but fr fr, all_equal(X,Y) is false when the value of X is 'Ya' β€” that's the whole point of showing it.

perl v5.40.1 Β· 2026-01-24 β€” okay that's the whole page bestie, documented on that date, running on that perl, mwah πŸ˜˜πŸ’œ

πŸ“¦ where this page comes from