summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2008-12-07 00:25:27 -0500
committerdoy <doy@tozt.net>2008-12-07 00:25:27 -0500
commit1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd (patch)
treea68c2e70da637e2943bd264c408bc7686dc28967
parentd856c3ed52aa1ec973f9acfd02f128ddb8e84965 (diff)
downloadmoosex-role-matcher-1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd.tar.gz
moosex-role-matcher-1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd.zip
better synopsis
-rw-r--r--lib/MooseX/Role/Matcher.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/MooseX/Role/Matcher.pm b/lib/MooseX/Role/Matcher.pm
index 8936640..b96ece5 100644
--- a/lib/MooseX/Role/Matcher.pm
+++ b/lib/MooseX/Role/Matcher.pm
@@ -17,12 +17,9 @@ use List::MoreUtils qw/any all/;
has phone => (isa => 'Str');
package main;
- my @people = map { Person->new(name => $_->[0],
- age => $_->[1],
- phone => $_->[2] }
- ['James', 22, '555-1914'],
- ['Jesse', 22, '555-6287'],
- ['Eric', 21, '555-7634'];
+ my @people = (Person->new(name => 'James', age => 22, phone => '555-1914'),
+ Person->new(name => 'Jesse', age => 22, phone => '555-6287'),
+ Person->new(name => 'Eric', age => 21, phone => '555-7634'));
# is James 22?
$people[0]->match(age => 22);
# which people are not 22?