From: Jesse Luehrs Date: Sat, 7 May 2011 01:09:53 +0000 (-0500) Subject: stop documenting BUILDALL and DEMOLISHALL X-Git-Tag: 2.0003~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c25e358aa2c19af2815fc6f4b68cffe8ed4aad7b;p=gitmo%2FMoose.git stop documenting BUILDALL and DEMOLISHALL --- diff --git a/lib/Moose/Cookbook/Basics/Recipe4.pod b/lib/Moose/Cookbook/Basics/Recipe4.pod index d9fff11..da87d90 100644 --- a/lib/Moose/Cookbook/Basics/Recipe4.pod +++ b/lib/Moose/Cookbook/Basics/Recipe4.pod @@ -284,10 +284,9 @@ container type, and instead you will have a new type named =item (3) -The C method is actually called by C<< Moose::Object->BUILDALL ->>, which is called by C<< Moose::Object->new >>. The C -method climbs the object inheritance graph and calls any C -methods it finds in the correct order. +The C method is actually called by C<< Moose::Object->new >>. It climbs +the object inheritance graph and calls any C methods it finds in the +correct order. =back diff --git a/lib/Moose/Object.pm b/lib/Moose/Object.pm index 1143231..06b7cde 100644 --- a/lib/Moose/Object.pm +++ b/lib/Moose/Object.pm @@ -140,8 +140,9 @@ This class is the default base class for all Moose-using classes. When you C in this class, your class will inherit from this class. -It provides a default constructor and destructor, which run the -C and C methods respectively. +It provides a default constructor and destructor, which run all of the +C and C methods in the inheritance hierarchy, +respectively. You don't actually I to inherit from this in order to use Moose, but it makes it easier to take advantage of all of Moose's features. @@ -154,7 +155,8 @@ but it makes it easier to take advantage of all of Moose's features. This method calls C<< $class->BUILDARGS(@_) >>, and then creates a new instance of the appropriate class. Once the instance is created, it -calls C<< $instance->BUILDALL($params) >>. +calls C<< $instance->BUILD($params) >> for each C method in the +inheritance hierarchy. =item B<< Moose::Object->BUILDARGS(%params) >> @@ -167,22 +169,6 @@ options passed to the constructor. This method should always return a hash reference of named options. -=item B<< $object->BUILDALL($params) >> - -This method will call every C method in the inheritance -hierarchy, starting with the most distant parent class and ending with -the object's class. - -The C method will be passed the hash reference returned by -C. - -=item B<< $object->DEMOLISHALL >> - -This will call every C method in the inheritance hierarchy, -starting with the object's class and ending with the most distant -parent. C and C will receive a boolean -indicating whether or not we are currently in global destruction. - =item B<< $object->does($role_name) >> This returns true if the object does the given role. @@ -203,6 +189,12 @@ C. This is a handy utility for Cing an object. By default, the maximum depth is 1, to avoid making a mess. +=item B<< $object->DESTROY >> + +A default destructor is provided, which calls +C<< $instance->DEMOLISH($in_global_destruction) >> for each C +method in the inheritance hierarchy. + =back =head1 BUGS