From: Dave Rolsky Date: Thu, 26 Mar 2009 15:30:09 +0000 (-0500) Subject: Punt on documenting Parameteriz{able,ed} - the API is just X-Git-Tag: 0.72_01~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f6fdcfe79e8a84a867b56c8c3b6c08d9550a167f;p=gitmo%2FMoose.git Punt on documenting Parameteriz{able,ed} - the API is just bizarre. When I find myself unable to coherently explain how to use said API in the docs, it's time to stop writing docs and start refactoring. --- diff --git a/lib/Moose/Meta/TypeConstraint/Parameterizable.pm b/lib/Moose/Meta/TypeConstraint/Parameterizable.pm index e020b8c..8317560 100644 --- a/lib/Moose/Meta/TypeConstraint/Parameterizable.pm +++ b/lib/Moose/Meta/TypeConstraint/Parameterizable.pm @@ -88,26 +88,29 @@ __END__ =head1 NAME -Moose::Meta::TypeConstraint::Parameterizable - Higher Order type constraints for Moose +Moose::Meta::TypeConstraint::Parameterizable - Type constraints which can take a parameter (ArrayRef) -=head1 METHODS - -=over 4 +=head1 DESCRIPTION -=item B +This class represents a parameterizable type constraint. This is a +type constraint like C or C, that can be +parameterized and made more specific by specifying a contained +type. For example, instead of just an C of anything, you can +specify that is an C. -=item B +A parameterizable constraint should not be used as an attribute type +constraint. Instead, when parameterized it creates a +L which should be used. -=item B +=head1 INHERITANCE -=item B +C is a subclass of +L. -Given a single type constraint or type constraint string, this method -parameterizes the type based on the given argument. - -=item B +=head1 METHODS -=back +This class is intentionally not documented because the API is +confusing and needs some work. =head1 BUGS diff --git a/lib/Moose/Meta/TypeConstraint/Parameterized.pm b/lib/Moose/Meta/TypeConstraint/Parameterized.pm index d03d81d..d0cdfa9 100644 --- a/lib/Moose/Meta/TypeConstraint/Parameterized.pm +++ b/lib/Moose/Meta/TypeConstraint/Parameterized.pm @@ -76,25 +76,17 @@ __END__ =head1 NAME -Moose::Meta::TypeConstraint::Parameterized - Higher Order type constraints for Moose +Moose::Meta::TypeConstraint::Parameterized - Type constraints with a bound parameter (ArrayRef[Int]) =head1 METHODS -=over 4 +This class is intentionally not documented because the API is +confusing and needs some work. -=item B +=head1 INHERITANCE -=item B - -=item B - -=item B - -=item B - -=item B - -=back +C is a subclass of +L. =head1 BUGS diff --git a/xt/pod_coverage.t b/xt/pod_coverage.t index 077cbf4..6e8fa24 100644 --- a/xt/pod_coverage.t +++ b/xt/pod_coverage.t @@ -73,6 +73,8 @@ my %trustme = ( 'Moose::Meta::TypeConstraint' => [ 'compile_type_constraint', 'union' ], 'Moose::Meta::TypeConstraint::Class' => [qw( equals is_a_type_of is_a_subtype_of )], + 'Moose::Meta::TypeConstraint::Parameterizable' => [ '.+' ], + 'Moose::Meta::TypeConstraint::Parameterized' => [ '.+' ], 'Moose::Meta::TypeConstraint::Union' => ['compile_type_constraint'], );