diff options
Diffstat (limited to 'lib/MooseX/Role/Matcher.pm')
-rw-r--r-- | lib/MooseX/Role/Matcher.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/MooseX/Role/Matcher.pm b/lib/MooseX/Role/Matcher.pm index d4731cc..0bb4ce0 100644 --- a/lib/MooseX/Role/Matcher.pm +++ b/lib/MooseX/Role/Matcher.pm @@ -2,7 +2,7 @@ package MooseX::Role::Matcher; use MooseX::Role::Parameterized; use List::Util qw/first/; -use List::MoreUtils qw/any/; +use List::MoreUtils qw/any all/; parameter default_match => ( is => 'ro', @@ -38,6 +38,11 @@ method any_match => sub { $class->_apply_to_matches(\&any, @_); }; +method all_match => sub { + my $class = shift; + $class->_apply_to_matches(\&all, @_); +}; + method _match => sub { my $self = shift; my $value = shift; |