|| Carp::confess("The $name constraint cannot be used, because $param doesn't subtype from a parameterizable type");
return Mouse::Meta::TypeConstraint->new(
- name => $name,
- parent => $self,
- constraint => $generator->($param),
+ name => $name,
+ parent => $self,
+ parameter => $param,
+ constraint => $generator->($param), # must be 'constraint', not 'optimized'
- type => 'Parameterized',
+ type => 'Parameterized',
);
}