From: gfx Date: Tue, 29 Sep 2009 07:04:49 +0000 (+0900) Subject: Add a warning for an old style use of TypeConstraint X-Git-Tag: 0.37_01~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=5c26929eb451b1545366943d5dd330bcd6fe140d Add a warning for an old style use of TypeConstraint --- diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index c9afe63..cfc1aed 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -20,8 +20,8 @@ sub new { my $check = $args{_compiled_type_constraint} || $args{constraint}; - # FIXME if(blessed($check)){ + Carp::cluck("'constraint' must be a CODE reference"); $check = $check->{_compiled_type_constraint}; }