X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FTypeConstraint.pm;h=b3706ef2941c204c662c4401d477b68e99089af6;hb=1746908e63ce233fad3c290d731ac34aff7c2d22;hp=aa4e9fc292343f753f5e0f99e115b2606269b4b8;hpb=eed39dffe505fa8df062e315c23c1fbe36f9c95b;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/TypeConstraint.pm b/lib/Mouse/Meta/TypeConstraint.pm index aa4e9fc..b3706ef 100644 --- a/lib/Mouse/Meta/TypeConstraint.pm +++ b/lib/Mouse/Meta/TypeConstraint.pm @@ -24,6 +24,9 @@ sub new { "$type_parameter is not a subtype of $parent_tp", ); } + else { + $type_parameter = undef; + } } } @@ -237,8 +240,10 @@ sub assert_valid { return 1; } -sub _as_string { $_[0]->name } # overload "" -sub _identity; # overload 0+ +# overloading stuff + +sub _as_string { $_[0]->name } # overload "" +sub _identity; # overload 0+ sub _unite { # overload infix:<|> my($lhs, $rhs) = @_; @@ -257,7 +262,7 @@ Mouse::Meta::TypeConstraint - The Mouse Type Constraint metaclass =head1 VERSION -This document describes Mouse version 0.81 +This document describes Mouse version 0.85 =head1 DESCRIPTION