actually, why not make the meta method renameable
[gitmo/Class-MOP.git] / lib / Class / MOP / Class.pm
index 96ecf9d..122ed9a 100644 (file)
@@ -504,13 +504,16 @@ sub create {
         || confess "You must pass a HASH ref of methods"
             if exists $options{methods};                  
 
+    $options{meta_name} = 'meta'
+        unless exists $options{meta_name};
+
     my (%initialize_options) = @args;
     delete @initialize_options{qw(
         package
         superclasses
         attributes
         methods
-        no_meta
+        meta_name
         version
         authority
     )};
@@ -518,7 +521,8 @@ sub create {
 
     $meta->_instantiate_module( $options{version}, $options{authority} );
 
-    $meta->_add_meta_method unless $options{no_meta};
+    $meta->_add_meta_method($options{meta_name})
+        if defined $options{meta_name};
 
     $meta->superclasses(@{$options{superclasses}})
         if exists $options{superclasses};
@@ -1436,9 +1440,11 @@ hash reference are method names and values are subroutine references.
 
 An optional array reference of L<Class::MOP::Attribute> objects.
 
-=item * no_meta
+=item * meta_name
 
-If true, a C<meta> method will not be installed into the class.
+Specifies the name to install the C<meta> method for this class under.
+If it is not passed, C<meta> is assumed, and if C<undef> is explicitly
+given, no meta method will be installed.
 
 =back