From 1f7c809af24762d7a1c0d1fab184a3ef1d8c54cd Mon Sep 17 00:00:00 2001 From: doy Date: Sun, 7 Dec 2008 00:25:27 -0500 Subject: better synopsis --- lib/MooseX/Role/Matcher.pm | 9 +++------ 1 file 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? -- cgit v1.2.3