X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FUtil%2FTypeConstraints.pm;h=620be02d7b6ae77af502ead7e727f7a6bfe20e7b;hp=4d2954e661a292bd2b8528ca2d39a1bb439b29f3;hb=a25ca8d637c040b2f929b1a23dd62ff63d85f5d1;hpb=5d4810c114dba9cf2867925934d91fc3842f3faf diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 4d2954e..620be02 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 { @@ -419,6 +414,10 @@ __END__ Mouse::Util::TypeConstraints - Type constraint system for Mouse +=head1 VERSION + +This document describes Mouse version 0.37_06 + =head2 SYNOPSIS use Mouse::Util::TypeConstraints;