From: Dave Rolsky Date: Wed, 25 Mar 2009 22:40:01 +0000 (-0500) Subject: Fix pod coverage test to actually exclude things that should be X-Git-Tag: 0.72_01~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2870fb091b5b844678277347a8c710dd58e005e6;p=gitmo%2FMoose.git Fix pod coverage test to actually exclude things that should be excluded, and document things that shouldn't be --- diff --git a/lib/Moose/Meta/TypeConstraint/Class.pm b/lib/Moose/Meta/TypeConstraint/Class.pm index 5148a5c..a484a2d 100644 --- a/lib/Moose/Meta/TypeConstraint/Class.pm +++ b/lib/Moose/Meta/TypeConstraint/Class.pm @@ -151,7 +151,7 @@ Returns the class name associated with the constraint. 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. diff --git a/lib/Moose/Meta/TypeConstraint/Role.pm b/lib/Moose/Meta/TypeConstraint/Role.pm index 3262bf7..d90a6ac 100644 --- a/lib/Moose/Meta/TypeConstraint/Role.pm +++ b/lib/Moose/Meta/TypeConstraint/Role.pm @@ -68,7 +68,7 @@ sub equals { 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)); } @@ -145,7 +145,7 @@ Returns the role name associated with the constraint. 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. diff --git a/xt/pod_coverage.t b/xt/pod_coverage.t index 38b0a69..077cbf4 100644 --- a/xt/pod_coverage.t +++ b/xt/pod_coverage.t @@ -69,7 +69,11 @@ my %trustme = ( 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 ) {