summaryrefslogtreecommitdiffstats
path: root/lib/MooseX/Role/Matcher.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MooseX/Role/Matcher.pm')
-rw-r--r--lib/MooseX/Role/Matcher.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/MooseX/Role/Matcher.pm b/lib/MooseX/Role/Matcher.pm
index 5eb391f..f2a01dd 100644
--- a/lib/MooseX/Role/Matcher.pm
+++ b/lib/MooseX/Role/Matcher.pm
@@ -80,6 +80,10 @@ method _apply_to_matches => sub {
=method first_match
+Class method which takes an arrayref of objects in the class that consumed this
+role, and calls C<match> on each object in the arrayref, passing it the
+remaining arguments, and returns the first object for which match returns true.
+
=cut
method first_match => sub {
@@ -89,6 +93,10 @@ method first_match => sub {
=method grep_matches
+Class method which takes an arrayref of objects in the class that consumed this
+role, and calls C<match> on each object in the arrayref, passing it the
+remaining arguments, and returns the each object for which match returns true.
+
=cut
method grep_matches => sub {
@@ -99,6 +107,11 @@ method grep_matches => sub {
=method any_match
+Class method which takes an arrayref of objects in the class that consumed this
+role, and calls C<match> on each object in the arrayref, passing it the
+remaining arguments, and returns true if any C<match> calls return true,
+otherwise returns false.
+
=cut
method any_match => sub {
@@ -108,6 +121,11 @@ method any_match => sub {
=method all_match
+Class method which takes an arrayref of objects in the class that consumed this
+role, and calls C<match> on each object in the arrayref, passing it the
+remaining arguments, and returns false if any C<match> calls return false,
+otherwise returns true.
+
=cut
method all_match => sub {