make M:M:TC:Parameterized->equals("Unregistered") work
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint / Parameterized.pm
index 175c9ab..65bf696 100644 (file)
@@ -25,7 +25,7 @@ __PACKAGE__->meta->add_attribute('parameterized_from' => (
 sub equals {
     my ( $self, $type_or_name ) = @_;
 
-    my $other = Moose::Util::TypeConstraints::find_type_constraint($type_or_name);
+    my $other = Moose::Util::TypeConstraints::find_or_create_type_constraint($type_or_name) or return;
 
     return unless $other->isa(__PACKAGE__);