all does what we want anyway, no need for the weird if/return stuff
Shawn M Moore [Thu, 25 Jun 2009 04:20:29 +0000 (00:20 -0400)]
lib/Moose/Util/TypeConstraints.pm

index 069d7bc..5d65d30 100644 (file)
@@ -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 = $_;