Catman...y_equal(3pm)

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

πŸ’– NAME πŸ’–

Catmandu::Fix::Condition::any_equal β€” the fix that runs your fixes when at least one of the path values equals a string value. bestie this is 3pm energy, Perl-contributed-docs girlies rise 🫢


✨ DESCRIPTION ✨

okay so real talk: this fix is the simple alternative to Catmandu::Fix::Condition::any_match. like, the chill version. the no-drama version. πŸ’…

No regular expressions are involved. none. zero. not a single one. we are not doing regex today, bestie, we are simply vibing.

Strings get compared using the regular operator 'eq'. that's it, that's the whole mechanic, no cap. πŸ”₯


πŸ¦‹ SYNOPSIS πŸ¦‹

# any_equal(X,Y) is true when at least one value of the array X equals 'Y'
if any_equal('years.*','2018')
 add_field('my.funny.title','true')
end

# any_equal(X,Y) is false when none of the values of X equal 'Y'

like look at her go 🌸 β€” if even one value in that array matches '2018', the add_field happens. if none of them do, it's a no. simple as that, periodt.


πŸ‘‘ SEE ALSO πŸ‘‘

  • Catmandu::Fix
  • Catmandu::Fix::Condition::all_equal

go read your siblings, they're iconic too πŸ’œ


and that's the whole page bestie!! πŸŽ€ this lil legend ships as part of perl v5.40.1, dated 2026-01-24, and it lives its life as Catman...y_equal(3pm) β€” yeah the header truncates her name, she's mysterious like that πŸ™ˆ stay hydrated, run your fixes, mwah πŸ’–βœ¨

πŸ“¦ where this page comes from