Returns all the type's parent types, corresponding to its parent
classes.
-=item B<< $constraint->is_a_subtype_of($type_name_or_object) >>
+=item B<< $constraint->is_subtype_of($type_name_or_object) >>
If the given type is also a class type, then this checks that the
type's class is a subclass of the other type's class.
sub is_a_type_of {
my ($self, $type_or_name) = @_;
- my $type = Moose::Util::TypeConstraints::find_type_constraint($type_or_name);
+ $type = Moose::Util::TypeConstraints::find_type_constraint($type_or_name);
($self->equals($type) || $self->is_subtype_of($type_or_name));
}
Returns all the type's parent types, corresponding to the roles that
its role does.
-=item B<< $constraint->is_a_subtype_of($type_name_or_object) >>
+=item B<< $constraint->is_subtype_of($type_name_or_object) >>
If the given type is also a role type, then this checks that the
type's role does the other type's role.
super
with )
],
+ 'Moose::Meta::TypeCoercion::Union' => ['compile_type_coercion'],
'Moose::Meta::TypeConstraint' => [ 'compile_type_constraint', 'union' ],
+ 'Moose::Meta::TypeConstraint::Class' =>
+ [qw( equals is_a_type_of is_a_subtype_of )],
+ 'Moose::Meta::TypeConstraint::Union' => ['compile_type_constraint'],
);
for my $module ( sort @modules ) {