From: Dave Rolsky Date: Sat, 21 Mar 2009 15:01:56 +0000 (-0500) Subject: docs for MM::Method::Constructor. X-Git-Tag: 0.72_01~44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cefc9e36dd611db97d9329332dbe43425fc5216b;p=gitmo%2FMoose.git docs for MM::Method::Constructor. also removed some methods that were duplicating the parent class --- diff --git a/lib/Moose/Meta/Method/Constructor.pm b/lib/Moose/Meta/Method/Constructor.pm index 627b641..beeb1a9 100644 --- a/lib/Moose/Meta/Method/Constructor.pm +++ b/lib/Moose/Meta/Method/Constructor.pm @@ -110,12 +110,9 @@ sub _expected_constructor_class { ## accessors -sub options { (shift)->{'options'} } sub meta_instance { (shift)->{'meta_instance'} } sub attributes { (shift)->{'attributes'} } -sub associated_metaclass { (shift)->{'associated_metaclass'} } - ## method # this was changed in 0.41, but broke MooseX::Singleton, so try to catch @@ -432,28 +429,32 @@ Moose::Meta::Method::Constructor - Method Meta Object for constructors =head1 DESCRIPTION -This is a subclass of L which handles -constructing an appropriate Constructor methods. This is primarily -used in the making of immutable metaclasses, otherwise it is -not particularly useful. +This class is a subclass of L that +provides additional Moose-specific functionality + +To understand this class, you should read the the +L documentation as well. =head1 METHODS =over 4 -=item B - -=item B +=item B<< $metamethod->can_be_inlined >> -=item B +This returns true if the method can inlined. -=item B +First, it looks at all of the parents of the associated class. If any +of them have an inlined constructor, then the constructor can be +inlined. -=item B +If none of them have been inlined, it checks to make sure that the +pre-inlining constructor for the class matches the constructor from +the expected class. -=item B +By default, it expects this constructor come from L, +but subclasses can change this expectation. -=item B +If the constructor cannot be inlined it warns that this is the case. =back diff --git a/xt/pod_coverage.t b/xt/pod_coverage.t index 346ef02..c615dfc 100644 --- a/xt/pod_coverage.t +++ b/xt/pod_coverage.t @@ -36,8 +36,16 @@ my %trustme = ( generate_writer_method_inline ) ], - 'Moose::Meta::Method::Constructor' => - [qw( initialize_body intialize_body)], + 'Moose::Meta::Method::Constructor' => [ + qw( attributes + generate_constructor_method + generate_constructor_method_inline + initialize_body + meta_instance + new + options + ) + ], 'Moose::Meta::Method::Destructor' => ['initialize_body'], 'Moose::Role' => [ qw( after