From: Jesse Luehrs Date: Wed, 11 Nov 2009 23:29:14 +0000 (-0600) Subject: stop overriding the prototype on List::Util::first X-Git-Tag: 0.93~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31c519ab50a928bf1c7017031946edc663ab92e9;p=gitmo%2FMoose.git stop overriding the prototype on List::Util::first --- diff --git a/lib/Moose/Meta/Attribute/Native/MethodProvider/Array.pm b/lib/Moose/Meta/Attribute/Native/MethodProvider/Array.pm index 8ce0e24..733c22e 100644 --- a/lib/Moose/Meta/Attribute/Native/MethodProvider/Array.pm +++ b/lib/Moose/Meta/Attribute/Native/MethodProvider/Array.pm @@ -26,7 +26,7 @@ sub first : method { my ( $attr, $reader, $writer ) = @_; return sub { my ( $instance, $predicate ) = @_; - &List::Util::first($predicate, @{ $reader->($instance) }); + List::Util::first { $predicate->() } @{ $reader->($instance) }; }; }