X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FTypeConstraint.pm;h=fb7047bf33f023c389a8981022aac16d3aa42e9d;hp=266e53d1d63a37f1d41f6332b63517c60ba062b3;hb=346a3ab8a10ac61eae8021ccfd068d80ccccd56a;hpb=f7e41edaceee0d549a2d664378cfcf85dcf9454b diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index 266e53d..fb7047b 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -114,15 +114,15 @@ sub _add_type_coercions{ } else{ $self->{_compiled_type_coercion} = sub { - my($thing) = @_; - foreach my $pair (@{$coercions}) { - #my ($constraint, $converter) = @$pair; - if ($pair->[0]->check($thing)) { + my($thing) = @_; + foreach my $pair (@{$coercions}) { + #my ($constraint, $converter) = @$pair; + if ($pair->[0]->check($thing)) { local $_ = $thing; return $pair->[1]->($thing); - } - } - return $thing; + } + } + return $thing; }; } return; @@ -210,7 +210,7 @@ Mouse::Meta::TypeConstraint - The Mouse Type Constraint metaclass =head1 VERSION -This document describes Mouse version 0.40_08 +This document describes Mouse version 0.4501 =head1 DESCRIPTION