sub find_type_constraint {
my($spec) = @_;
- return $spec if Mouse::Util::is_a_type_constraint($spec);
- return undef if !defined $spec;
+ return $spec if Mouse::Util::is_a_type_constraint($spec) or not defined $spec;
$spec =~ s/\s+//g;
return $TYPE{$spec};
sub find_or_parse_type_constraint {
my($spec) = @_;
- return $spec if Mouse::Util::is_a_type_constraint($spec);
- return undef if !defined $spec;
+ return $spec if Mouse::Util::is_a_type_constraint($spec) or not defined $spec;
$spec =~ s/\s+//g;
return $TYPE{$spec} || do{