}
}
sub _find_or_create_union_type{
- my @types = map{ $_->{type_constraints} ? @{$_->{type_constraints}} : $_ } @_;
+ my @types = sort{ $a cmp $b } map{ $_->{type_constraints} ? @{$_->{type_constraints}} : $_ } @_;
- my $name = join '|', map{ $_->name } @types;
+ my $name = join '|', @types;
$TYPE{$name} ||= do{
return Mouse::Meta::TypeConstraint->new(
}
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");