Catman...AnyTest(3pm)
β¨ Catman...AnyTest(3pm) β¨
okay bestie, welcome to the Catman...AnyTest(3pm) glow-up π this one's a Perl page, it's giving "User Contributed Perl Documentation," and it's lowkey iconic.
πΈ NAME πΈ
Catmandu::Fix::Condition::SimpleAllTest β bestie, this is the base class that makes building any-match conditionals so much easier. it's the scaffolding, the blueprint, the blueprint of the blueprint π
π SYNOPSIS π
here's the whole vibe, verbatim, no cap:
package Catmandu::Fix::Condition::has_even
use Catmandu::Sane;
use Moo;
use Catmandu::Fix::Has;
has path => (fix_arg => 1);
with 'Catmandu::Fix::Condition::SimpleAnyTest';
sub emit_test {
my ($self, $var) = @_;
my $value = $self->value;
"is_value(${var}) && ${var} % 2 == 0";
}
1;
# Now you can write in your fixes
has_even('my_field') # True when my_field is 0,2,4,6,...
has_even('my_field.*') # True when at least one my_field is 0,2,4,6,...
like, look at her. a whole custom conditional just born in the group chat β¨
π¦ DESCRIPTION π¦
so what is this? it's a base class, and its whole job is to ease the construction of Catmandu::Fix::Conditional-s. no fr, that's the assignment π«Ά
an 'any' test matches when at least one node on a path matches a condition. at least one!! not all of them, bestie, just one. E.g.:
any_match('title','abc') # true when the title field contains 'abc'
any_match('title.*','abc') # true when at least one title fields contain 'abc'
see the pattern? title alone checks the one field, and title.* fans out across all of them and pops off if even a single one hits. main character behavior honestly π
π SEE ALSO π
Catmandu::Fix::Condition::any_matchβ go read that one next, it's her sister π
and that's the whole page!! thanks for coming to my TED talk π€
this little manual page came to you from perl v5.40.1, dated 2026-01-24, and it was absolutely iconic of you to read all the way to the end. mwah πβ¨ π π¦ πΈ π
π¦ 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