$args->{type_constraint} = Mouse::Util::TypeConstraints::find_or_create_isa_type_constraint($args->{isa});
}
elsif(exists $args->{does}){
- # TODO
- # $args->{type_constraint} = Mouse::Util::TypeConstraints::find_or_create_does_type_constraint($args->{does});
+ $args->{type_constraint} = Mouse::Util::TypeConstraints::find_or_create_does_type_constraint($args->{does});
}
$tc = $args->{type_constraint};
}
sub find_or_create_does_type_constraint{
- my $type = find_or_parse_type_constriant(@_) || role_type(@_);
+ my $type = find_or_parse_type_constraint(@_) || role_type(@_);
if($type->{type} && $type->{type} ne 'Role'){
Carp::cluck("$type is not a role type");