From: gfx Date: Sat, 24 Oct 2009 09:14:45 +0000 (+0900) Subject: Remove useless check code X-Git-Tag: 0.40_01~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2125ee6b834fe1e8e917df6e1bf7f7059d9579fc;p=gitmo%2FMouse.git Remove useless check code --- diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index d783a73..9b1acc7 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -31,11 +31,6 @@ sub new { $check = $args{constraint}; - if(blessed($check)){ - Carp::cluck("Constraint for $args{name} must be a CODE reference"); - $check = $check->{compiled_type_constraint}; - } - if(defined($check) && ref($check) ne 'CODE'){ confess("Constraint for $args{name} is not a CODE reference"); }