diff options
author | doy <doy@tozt.net> | 2008-12-07 00:25:27 -0500 |
---|---|---|
committer | doy <doy@tozt.net> | 2008-12-07 00:25:27 -0500 |
commit | 1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd (patch) | |
tree | a68c2e70da637e2943bd264c408bc7686dc28967 /lib/MooseX/Role/Matcher.pm | |
parent | d856c3ed52aa1ec973f9acfd02f128ddb8e84965 (diff) | |
download | moosex-role-matcher-1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd.tar.gz moosex-role-matcher-1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd.zip |
better synopsis
Diffstat (limited to 'lib/MooseX/Role/Matcher.pm')
-rw-r--r-- | lib/MooseX/Role/Matcher.pm | 9 |
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? |