X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FAttribute.pm;h=dffcb227d903a45e19e950a1d29a361cfb95651f;hb=e763d56e2b18480328a95cbbe9e9b58988a8c4dc;hp=4b3539fc160954c7b04d537ba805bcbb40079c48;hpb=ffbbf459fec594dcd08b5f7d05014740390bde58;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index 4b3539f..dffcb22 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -156,7 +156,7 @@ sub new { # Carp::cluck("Found unknown argument(s) passed to '$name' attribute constructor in '$class': @bad"); # } - return $instance + return $instance; } # readers @@ -301,6 +301,9 @@ sub verify_type_constraint_error { sub coerce_constraint { ## my($self, $value) = @_; my $type = $_[0]->{type_constraint} or return $_[1]; + + Carp::cluck("coerce_constraint() has been deprecated, which was an internal utility anyway"); + return Mouse::Util::TypeConstraints->typecast_constraints($_[0]->associated_class->name, $type, $_[1]); }