diff --git a/Changes b/Changes index 7a0274389..63bab5bfa 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,11 @@ for, noteworthy changes. - Added a section to Moose::Manual::MethodModifiers illustrating how method modifiers work with inheritance. (Andreas Koenig, RT #98940) + [DOCUMENTATION] + + - Added docs to Moose.pm on the -meta_name import option. This addresses RT + #98488. + 2.1402 2014-11-05 [BUG FIXES] diff --git a/lib/Moose.pm b/lib/Moose.pm index 8caa23683..e957674fe 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -385,15 +385,27 @@ or coercion. =head1 PROVIDED METHODS Moose provides a number of methods to all your classes, mostly through the -inheritance of L. There is however, one exception. +inheritance of L. There is however, one exception. By default, +Moose will install a method named C in any class which uses +C. This method returns the current class's metaclass. -=over 4 +If you'd like to rename this method, you can do so by passing the +C<-meta_name> option when using Moose: -=item B + use Moose -meta_name => 'my_meta'; -This is a method which provides access to the current class's metaclass. +However, the L class I provides a method named C +which does the same thing. If your class inherits from L (which +is the default), then you will still have a C method. However, if your +class inherits from a parent which provides a C method of its own, your +class will inherit that instead. -=back +If you'd like for Moose to not install a meta method at all, you can pass +C as the C<-meta_name> option: + + use Moose -meta_name => undef; + +Again, you will still inherit C from L in this case. =head1 EXPORTED FUNCTIONS