NAME

List::Objects::WithUtils::Role::WithJunctions - Add junctions to Arrays

SYNOPSIS

## Via List::Objects::WithUtils::Array ->
use List::Objects::WithUtils 'array';

my $array = array(qw/ a b c /);

if ( $array->any_items eq 'b' ) {
  ...
}

if ( $array->all_items eq 'a' ) {
  ...
}

if ( $array->any_items == qr/^b/ ) {
  ...
}

## As a Role ->
use Role::Tiny::With;
with 'List::Objects::WithUtils::Role::Array',
     'List::Objects::WithUtils::Role::WithJunctions';

DESCRIPTION

These methods supply overloaded List::Objects::WithUtils::Array::Junction objects that can be compared with values using normal Perl comparison operators.

Regular expressions can be matched by providing a qr// regular expression object to the == or != operators.

There is no support for the ~~ experimental smart-match operator.

any_items

Returns the overloaded any object for the current array; a comparison is true if any items in the array satisfy the condition.

all_items

Returns the overloaded all object for the current array; a comparison is true only if all items in the array satisfy the condition.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>