From 2e5646ec4862a6627be83101b27d9cebc2c04318 Mon Sep 17 00:00:00 2001 From: doy Date: Sun, 7 Dec 2008 02:44:12 -0500 Subject: stop using podweaver for now, it's too broken --- dist.ini | 2 -- lib/MooseX/Role/Matcher.pm | 32 ++++++++++++++++++++++++++------ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/dist.ini b/dist.ini index 8a28e1b..42a704e 100644 --- a/dist.ini +++ b/dist.ini @@ -12,5 +12,3 @@ List::Util = 0 List::MoreUtils = 0 Test::More = 0 Test::Deep = 0 - -[PodWeaver] diff --git a/lib/MooseX/Role/Matcher.pm b/lib/MooseX/Role/Matcher.pm index 40f0331..ce8ebd3 100644 --- a/lib/MooseX/Role/Matcher.pm +++ b/lib/MooseX/Role/Matcher.pm @@ -5,6 +5,13 @@ use List::Util qw/first/; use List::MoreUtils qw/any all/; # ABSTRACT: generic object matching based on attributes and methods +=head1 NAME + +MooseX::Role::Matcher - generic object matching based on attributes and methods + +=head1 VERSION + +version 0.01 =head1 SYNOPSIS @@ -46,7 +53,7 @@ class. It provides a match method, which tests attributes and methods of your object against strings, regexes, or coderefs, and also provides several class methods for using match on lists of objects. -=head2 PARAMETERS +=head1 PARAMETERS MooseX::Role::Matcher is a parameterized role (see L). The parameters it takes are: @@ -80,7 +87,9 @@ method _apply_to_matches => sub { $on_match->(sub { $_->match(@matchers) }, @list); }; -=method first_match +=head1 METHODS + +=head2 first_match my $four = Person->first_match([@people], sub { length == 4 }); @@ -95,7 +104,7 @@ method first_match => sub { $class->_apply_to_matches(\&first, @_); }; -=method grep_matches +=head2 grep_matches my @not_twenty_two = Person->grep_matches([@people], '!age' => 22); @@ -111,7 +120,7 @@ method grep_matches => sub { $class->_apply_to_matches($grep, @_); }; -=method any_match +=head2 any_match Person->any_match([@people], age => 22, number => qr/4$/); @@ -127,7 +136,7 @@ method any_match => sub { $class->_apply_to_matches(\&any, @_); }; -=method all_match +=head2 all_match Person->all_match([@people], name => [qr/^J/, qr/^E/]); @@ -163,7 +172,7 @@ method _match => sub { return $value eq $seek; }; -=method match +=head2 match $person->match(age => 22); @@ -235,6 +244,17 @@ method match => sub { no MooseX::Role::Parameterized; +=head1 AUTHOR + + Jesse Luehrs + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2008 by Jesse Luehrs. + +This is free software; you can redistribute it and/or modify it under +the same terms as perl itself. + =head1 TODO Better error handling/reporting -- cgit v1.2.3