Catman...ss_than(3pm)

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

πŸ’– Catmandu::Fix::Condition::less_than πŸ’–

okay bestie, so this page is from the Perl user-contributed docs, and it's all about Catmandu::Fix::Condition::less_than β€” which is a condition, not a fix, and that distinction is lowkey the whole point. It's the little gatekeeper that decides whether your fixes even get to run. no cap. πŸŽ€


✨ NAME ✨

Catmandu::Fix::Condition::less_than β€” bestie it does exactly one thing and it does it slayfully: it executes fixes when a field is less than a value. that's it. that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

okay so here's how you actually use it. less_than(X,Y) is true when X < Y β€” literally just the < operator but wearing a cute little fix-shaped outfit:

# less_than(X,Y) is true when X < Y
if less_than('year','2018')
 add_field('my.funny.title','true')
end

and then, the plot twist that gets me every time 🫢 β€” when you run less_than on arrays, it checks if all values satisfy X < Y. all of them. every single one. it's giving strict:

# less_than on arrays checks if all values are X < Y
if less_than('years.*','2018')
  add_field('my.funny.title','true')
end

notice the years.* β€” that wildcard is how you say "hey, check the whole array, not just one field." and notice how both examples use add_field('my.funny.title','true'), because yes, the demo field name is my.funny.title, and honestly? iconic. the docs understood the assignment. 😌


✨ SEE ALSO ✨

  • Catmandu::Fix::Condition::greater_than β€” the flip side of this whole situation. when you need the other direction of comparison, that's your girl. πŸ’œ

heads up bestie: this is the entire page. no options, no env vars, no exit statuses, no bugs section, no authors β€” just the name, the two synopsis vibes, and the see-also. sometimes a manpage is short and that's simply the aesthetic. ✨

and that's a wrap, fr fr πŸ’– this was Catman...ss_than(3pm) from the User Contributed Perl Documentation, sitting pretty in the perl v5.40.1 era, dated 2026-01-24. go forth and compare things. less_than your way to greatness, queen. πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from