From: gfx Date: Fri, 9 Oct 2009 04:20:41 +0000 (+0900) Subject: Remove a Moose-imcompatible warning X-Git-Tag: 0.37_05~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bddbe49fe3a9f15ff7323a75eb2b01adc39c0e21;p=gitmo%2FMouse.git Remove a Moose-imcompatible warning --- diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 4d2954e..14ba4bd 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -399,12 +399,7 @@ sub find_or_parse_type_constraint { } sub find_or_create_does_type_constraint{ - my $type = find_or_parse_type_constraint(@_) || role_type(@_); - - if($type->{type} && $type->{type} ne 'Role'){ - Carp::cluck("$type is not a role type"); - } - return $type; + return find_or_parse_type_constraint(@_) || role_type(@_); } sub find_or_create_isa_type_constraint {