__PACKAGE__->meta->add_attribute('type_parameter' => (
accessor => 'type_parameter',
predicate => 'has_type_parameter',
+ Class::MOP::_definition_context(),
));
__PACKAGE__->meta->add_attribute('parameterized_from' => (
accessor => 'parameterized_from',
predicate => 'has_parameterized_from',
+ Class::MOP::_definition_context(),
));
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__);