make CMOP::Method::Accessor->initialize_body private
[gitmo/Class-MOP.git] / lib / Class / MOP / Method / Accessor.pm
index bd88bf3..dcf5f32 100644 (file)
@@ -36,7 +36,7 @@ sub new {
     # needed
     weaken($self->{'attribute'});
 
-    $self->initialize_body;
+    $self->_initialize_body;
 
     return $self;
 }
@@ -58,6 +58,12 @@ sub accessor_type        { (shift)->{'accessor_type'} }
 ## factory
 
 sub initialize_body {
+    warn 'The initialize_body method has been made private.'
+        . " The public version is deprecated and will be removed in a future release.\n";
+    goto &_initialize_body;
+}
+
+sub _initialize_body {
     my $self = shift;
 
     my $method_name = join "_" => (
@@ -243,21 +249,29 @@ C<%options> provided.
 
 =over 4
 
-=item attribute
+=item * attribute
 
 This is the C<Class::MOP::Attribute> for which accessors are being
 generated. This option is required.
 
-=item accessor_type
+=item * accessor_type
 
 This is a string which should be one of "reader", "writer",
 "accessor", "predicate", or "clearer". This is the type of method
 being generated. This option is required.
 
-=item is_inline
+=item * is_inline
 
 This indicates whether or not the accessor should be inlined. This
-default to false.
+defaults to false.
+
+=item * name
+
+The method name (without a package name). This is required.
+
+=item * package_name
+
+The package name for the method. This is required.
 
 =back