---
name: "Catmandu::Fix::Condition::SimpleAllTest"
section: "3pm"
platform: "linux"
package: "libcatmandu-perl"
version: "1.2024-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Fix::Condition::SimpleAllTest"
---

# Catmandu::Fix::Condition::SimpleAllTest(3pm)

Base class to ease the construction of all match conditionals

## NAME

Catmandu::Fix::Condition::SimpleAllTest - Base class to ease the construction of all match conditionals

## SYNOPSIS

```
   package Catmandu::Fix::Condition::is_even
   use Catmandu::Sane;
   use Moo;
   use Catmandu::Fix::Has;
   has path => (fix_arg => 1);
   with 'Catmandu::Fix::Condition::SimpleAllTest';
   sub emit_test {
       my ($self, $var) = @_;
       "is_value(${var}) && ${var} % 2 == 0";
   }
   1;
   # Now you can write in your fixes
   is_even('my_field')    # True when my_field is 0,2,4,6,...
   is_even('my_field.*')  # True when all my_field's are 0,2,4,6,...
```

## DESCRIPTION

The is a base class to ease the construction of Catmandu::Fix::Conditional-s. An 'all' test matches when all node on a path match a condition. E.g.

```
   all_match('title','abc')    # true when the title field contains 'abc'
   all_match('title.*','abc')  # true when all title fields contain 'abc'
```

## SEE ALSO

Catmandu::Fix::Condition::all\_match, Catmandu::Fix::Condition::greater\_than, Catmandu::Fix::Condition::less\_than
