X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FRole%2FTiny.pm;h=eb4cb0b9bf6da723b6f2c4d11c48ad9a5b55d978;hb=adcb6c3d137e9bf582fb3b1818de995c5146e3c3;hp=8ddc074a458e6e1f5c17196e948377914c6cd2f9;hpb=385f50873b724645e2fea1da9d53baea5f6d782c;p=gitmo%2FRole-Tiny.git 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)