From: Dave Rolsky Date: Mon, 6 Jun 2011 19:08:58 +0000 (-0500) Subject: Work around List::MoreUtils::all being misparsed under 5.10 (no idea why that was... X-Git-Tag: 2.0101~9^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e0250b7c96d040c19972f3dc2a8fed7d71611ce3;p=gitmo%2FMoose.git Work around List::MoreUtils::all being misparsed under 5.10 (no idea why that was happening) --- diff --git a/lib/Moose/Meta/TypeConstraint/Union.pm b/lib/Moose/Meta/TypeConstraint/Union.pm index c0c846b..0492e6e 100644 --- a/lib/Moose/Meta/TypeConstraint/Union.pm +++ b/lib/Moose/Meta/TypeConstraint/Union.pm @@ -75,7 +75,13 @@ sub _actually_compile_type_constraint { sub can_be_inlined { my $self = shift; - return all { $_->can_be_inlined } @{ $self->type_constraints }; + # This was originally done with all() from List::MoreUtils, but that + # caused some sort of bizarro parsing failure under 5.10. + for my $tc ( @{ $self->type_constraints } ) { + return 0 unless $tc->can_be_inlined; + } + + return 1; } sub _inline_check {