Catman...AnyTest(3pm)

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

✨ 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