From: Matt S Trout Date: Tue, 3 Apr 2012 18:17:45 +0000 (+0000) Subject: doc updates explaining why you need to ask for CMM X-Git-Tag: v1.000_900~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=adcb6c3d137e9bf582fb3b1818de995c5146e3c3;p=gitmo%2FRole-Tiny.git doc updates explaining why you need to ask for CMM --- diff --git a/Changes b/Changes index 57a3997..a8c7ecc 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ + - Document that Class::Method::Modifiers must be depended on separately + - Add a SEE ALSO section + 1.000000 - 2012-03-29 - Remove redundant code in create_class_with_roles - Minor doc fix to does_role diff --git a/lib/Role/Tiny.pm b/lib/Role/Tiny.pm index 8ddc074..eb4cb0b 100644 --- a/lib/Role/Tiny.pm +++ b/lib/Role/Tiny.pm @@ -266,6 +266,8 @@ Role::Tiny - Roles. Like a nouvelle cuisine portion size slice of Moose. sub bar { ... } + around baz => sub { ... } + 1; else where @@ -279,8 +281,13 @@ else where sub foo { ... } + # baz is wrapped in the around modifier by Class::Method::Modifiers + sub baz { ... } + 1; +If you wanted attributes as well, look at L. + =head1 DESCRIPTION C is a minimalist role composition tool. @@ -373,6 +380,11 @@ at a time to allow the code to remain as simple as possible. See L<< Class::Method::Modifiers/before method(s) => sub { ... } >> for full documentation. +Note that since you are not required to use method modifiers, +L is lazily loaded and we do not declare it as +a dependency. If your L role uses modifiers you must depend on +both L and L. + =head2 around around foo => sub { ... }; @@ -380,6 +392,11 @@ documentation. See L<< Class::Method::Modifiers/around method(s) => sub { ... } >> for full documentation. +Note that since you are not required to use method modifiers, +L is lazily loaded and we do not declare it as +a dependency. If your L role uses modifiers you must depend on +both L and L. + =head2 after after foo => sub { ... }; @@ -387,6 +404,21 @@ documentation. See L<< Class::Method::Modifiers/after method(s) => sub { ... } >> for full documentation. +Note that since you are not required to use method modifiers, +L is lazily loaded and we do not declare it as +a dependency. If your L role uses modifiers you must depend on +both L and L. + +=head1 SEE ALSO + +L is the attribute-less subset of L; L is +a meta-protocol-less subset of the king of role systems, L. + +If you don't want method modifiers and do want to be forcibly restricted +to a single role application per class, Ovid's L exists. But +Stevan Little (the L author) and I are both still convinced that +he's Doing It Wrong. + =head1 AUTHOR mst - Matt S. Trout (cpan:MSTROUT)