From: Shawn M Moore Date: Thu, 25 Jun 2009 04:20:29 +0000 (-0400) Subject: all does what we want anyway, no need for the weird if/return stuff X-Git-Tag: 0.84~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f75513bd39c0de68ac61efffe2bf53aef19276fd;p=gitmo%2FMoose.git all does what we want anyway, no need for the weird if/return stuff --- diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index 069d7bc..5d65d30 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -371,8 +371,7 @@ sub duck_type { 'Object', sub { my $obj = $_; - return 0 unless all { $obj->can($_) } @methods; - return 1; + return all { $obj->can($_) } @methods; }, sub { my $obj = $_;