From: Jesse Luehrs Date: Sat, 7 May 2011 03:11:02 +0000 (-0500) Subject: copy over some Moose.pm changes to Moose/Role.pm X-Git-Tag: 2.0100~140 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f9d92efb9241e99440095babcc70b63c954748a;p=gitmo%2FMoose.git copy over some Moose.pm changes to Moose/Role.pm --- diff --git a/lib/Moose/Role.pm b/lib/Moose/Role.pm index fb17925..1cbc9ff 100644 --- a/lib/Moose/Role.pm +++ b/lib/Moose/Role.pm @@ -214,22 +214,10 @@ Moose::Role offers a way to remove the keywords it exports, through the C method. You simply have to say C at the bottom of your code for this to work. -=head2 B<< Moose::Role->init_meta(for_class => $role, metaclass => $metaclass) >> - -The C method sets up the metaclass object for the role -specified by C. It also injects a a C accessor into -the role so you can get at this object. - -The default metaclass is L. You can specify an -alternate metaclass with the C parameter. - =head1 METACLASS -When you use Moose::Role, you can specify which metaclass to use: - - use Moose::Role -metaclass => 'My::Meta::Role'; - -You can also specify traits which will be applied to your role metaclass: +When you use Moose::Role, you can specify traits which will be applied to your +role metaclass: use Moose::Role -traits => 'My::Trait'; @@ -249,11 +237,12 @@ L 'apply_all_roles' or the role's metaclass: Doing this creates a new, mutable, anonymous subclass, applies the role to that, and reblesses. In a debugger, for example, you will see class names of the -form C< Class::MOP::Class::__ANON__::SERIAL::6 >, which means that doing a 'ref' -on your instance may not return what you expect. See L for 'DOES'. +form C< Moose::Meta::Class::__ANON__::SERIAL::6 >, which means that doing a +'ref' on your instance may not return what you expect. See L for +'DOES'. -Additional params may be added to the new instance by providing 'rebless_params'. -See L. +Additional params may be added to the new instance by providing +'rebless_params'. See L. =head1 CAVEATS