X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FTypeConstraint.pm;h=206a0a6f6614d79b0f29d4e502187a3339a9ec70;hb=97da20ef3707567e7aef8fa52598b2934a832de9;hp=f5dd14723c12e8f83e8a04205609c9685fd90f14;hpb=c0841d0c2cb7adbe152c01f63fa6e830ee4fbe71;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/TypeConstraint.pm b/lib/Moose/Meta/TypeConstraint.pm index f5dd147..206a0a6 100644 --- a/lib/Moose/Meta/TypeConstraint.pm +++ b/lib/Moose/Meta/TypeConstraint.pm @@ -97,7 +97,7 @@ __PACKAGE__->meta->add_attribute('inline_environment' => ( )); sub parents { - my $self; + my $self = shift; $self->parent; } @@ -420,11 +420,6 @@ sub _collect_all_parents { 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; @@ -571,8 +566,7 @@ Returns true if the type has a parent type. =item B<< $constraint->parents >> -A synonym for C. 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 >>