X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FRole.pm;h=0059eb63286a0d1936cdf5c74f44f21c4263e713;hp=59cccd228fdaa3f286b52ce21ef365b49f4f7045;hb=1820fffecb0bd1da64edc16ecde534178b841d14;hpb=284ca75b14da9b2685a78b7a0d4228512c8575c6 diff --git a/lib/Mouse/Role.pm b/lib/Mouse/Role.pm index 59cccd2..0059eb6 100644 --- a/lib/Mouse/Role.pm +++ b/lib/Mouse/Role.pm @@ -161,59 +161,60 @@ __END__ =head1 NAME -Mouse::Role - define a role in Mouse +Mouse::Role - The Mouse Role + +=head1 SYNOPSIS + + package MyRole; + use Mouse::Role; =head1 KEYWORDS -=head2 meta -> Mouse::Meta::Role +=head2 C<< meta -> Mouse::Meta::Role >> Returns this role's metaclass instance. -=head2 before (method|methods) => Code +=head2 C<< before (method|methods) -> CodeRef >> -Sets up a "before" method modifier. See L or +Sets up a B method modifier. See L or L. -=head2 after (method|methods) => Code +=head2 C<< after (method|methods) => CodeRef >> -Sets up an "after" method modifier. See L or +Sets up an B method modifier. See L or L. -=head2 around (method|methods) => Code +=head2 C<< around (method|methods) => CodeRef >> -Sets up an "around" method modifier. See L or +Sets up an B method modifier. See L or L. -=over 4 - -=item B +=head2 C -Sets up the "super" keyword. See L. +Sets up the B keyword. See L. -=item B +=head2 C<< override method => CodeRef >> -Sets up an "override" method modifier. See L. +Sets up an B method modifier. See L. -=item B +=head2 C -This is not supported and emits an error. See L. +This is not supported in roles and emits an error. See L. -=item B +=head2 C<< augment method => CodeRef >> -This is not supported and emits an error. See L. +This is not supported in roles and emits an error. See L. -=back - -=head2 has (name|names) => parameters +=head2 C<< has (name|names) => parameters >> Sets up an attribute (or if passed an arrayref of names, multiple attributes) to this role. See L. -=head2 confess error -> BOOM +=head2 C<< confess(error) -> BOOM >> L for your convenience. -=head2 blessed value -> ClassName | undef +=head2 C<< blessed(value) -> ClassName | undef >> L for your convenience. @@ -225,8 +226,12 @@ Importing Mouse::Role will give you sugar. =head2 unimport -Please unimport Mouse (C) so that if someone calls one of the +Please unimport (C<< no Mouse::Role >>) so that if someone calls one of the keywords (such as L) it will break loudly instead breaking subtly. +=head1 SEE ALSO + +L + =cut