From: Hans Dieter Pearcey Date: Fri, 24 Apr 2009 20:41:24 +0000 (-0400) Subject: re-apply my patch X-Git-Tag: 0.76~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=02679ba41a58922580fbbfea3690670bc1062589;p=gitmo%2FMoose.git re-apply my patch --- diff --git a/lib/Moose/Meta/TypeConstraint.pm b/lib/Moose/Meta/TypeConstraint.pm index 1671d07..559ef20 100644 --- a/lib/Moose/Meta/TypeConstraint.pm +++ b/lib/Moose/Meta/TypeConstraint.pm @@ -82,6 +82,8 @@ sub coerce { Moose->throw_error("Cannot coerce without a type coercion"); } + return $_[0] if $self->check($_[0]); + return $coercion->coerce(@_); }