));
sub parents {
- my $self;
+ my $self = shift;
$self->parent;
}
my $current = $self;
while (my $parent = $current->parent) {
- return 1 if $parent->is_a_type_of($type);
+ return 1 if $parent->equals($type);
$current = $parent;
}
=item B<< $constraint->parents >>
-A synonym for C<parent>. This is useful for polymorphism with types
-that can have more than one parent.
+Returns all of the types parents as an list of type constraint objects.
=item B<< $constraint->constraint >>