Catman...y_match(3pm)
π NAME π
okay bestie, gather round, because this one is Catmandu::Fix::Condition::any_match and it's literally the girl who decides whether your fixes get to run at all. β¨
She only lets the fixes execute if any path value matches the regex you hand her. that's it. that's the whole job. no cap. π
β¨ SYNOPSIS β¨
so like, picture this: you wanna uppercase the value of field foo, but ONLY if at least one member of oogly has the value doogly. yes, really, those are the names. iconic behavior fr fr. π
# uppercase the value of field 'foo' if at least one member of 'oogly' has the value 'doogly'
if any_match(oogly, "doogly")
upcase(foo) # foo => 'BAR'
end
and then if you want a case insensitive search for doogly in oogly fields? say less. π¦
# case insensitive search for 'doogly' in 'oogly' fields
if any_match(oogly.*, "(?i)doogly")
...
end
quick vibe check:oogly.*is a path with a wildcard, and(?i)is the inline flag that makes the regex not care about case. both of these are doing exactly what they look like they're doing. π
π SEE ALSO π
Catmandu::Fixβ the mothership, the main character, the whole reason any of this exists π«Ά
and that's the tea, bestie. go forth and match some paths. πΈ
this page came to you courtesy of perl v5.40.1, dated 2026-01-24 β mwah, slay, take care of her πβ¨π
π¦ where this page comes from
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms