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=14ba4bdb825ca311557e430e6647c637c58ba2be;hpb=bddbe49fe3a9f15ff7323a75eb2b01adc39c0e21;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 14ba4bd..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){ @@ -414,6 +421,10 @@ __END__ Mouse::Util::TypeConstraints - Type constraint system for Mouse +=head1 VERSION + +This document describes Mouse version 0.40 + =head2 SYNOPSIS use Mouse::Util::TypeConstraints;