X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FUtil%2FTypeConstraints.pm;h=96a56dcc654c2fe28b758bf5995ff8f01f69ee16;hb=431657256f423bda264c0cb76c28de72fd879b20;hp=74afc1da107149d1e4fba3942bc06a282b98ca79;hpb=06a970ab9fb60a4cac5e3f1774cf9a2914c94cc1;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 74afc1d..96a56dc 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -14,8 +14,6 @@ Mouse::Exporter->setup_import_methods( type subtype coerce class_type role_type enum find_type_constraint )], - - _export_to_main => 1, ); my %TYPE; @@ -364,7 +362,16 @@ sub _parse_type{ } } if($i - $start){ - push @list, _find_or_create_regular_type(substr $spec, $start, $i - $start); + my $type = _find_or_create_regular_type( substr $spec, $start, $i - $start ); + + if(defined $type){ + push @list, $type; + } + elsif($start != 0) { + # RT #50421 + # create a new class type + push @list, class_type( substr $spec, $start, $i - $start ); + } } if(@list == 0){ @@ -416,7 +423,7 @@ Mouse::Util::TypeConstraints - Type constraint system for Mouse =head1 VERSION -This document describes Mouse version 0.38 +This document describes Mouse version 0.40 =head2 SYNOPSIS