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;
}
return @parents;
}
+sub _ancestor_count {
+ my $self = shift;
+ return scalar $self->_collect_all_parents;
+}
+
sub create_child_type {
my ($self, %opts) = @_;
my $class = ref $self;