X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FCookbook.pod;h=7ea1cb2d2422c8c79bc99972cc0ffe3732867045;hb=ce21ecc578e3154f99399f49bde10e93bf390afa;hp=6050e59ef9d985a905c4574dd8846713d0c710a4;hpb=fbd7ad7aee6dbf262a6cc90a0e3c5d5fcdd9cfd3;p=gitmo%2FMoose.git diff --git a/lib/Moose/Cookbook.pod b/lib/Moose/Cookbook.pod index 6050e59..7ea1cb2 100644 --- a/lib/Moose/Cookbook.pod +++ b/lib/Moose/Cookbook.pod @@ -78,9 +78,12 @@ Demonstrates roles, which are also sometimes known as traits or mix-ins. Roles provide a method of code re-use which is orthogonal to subclassing. -=item L - Advanced Role Composition (TODO) +=item L - Advanced Role Composition - method exclusion and aliasing -I +Sometimes you just want to include part of a role in your +class. Sometimes you want the whole role but one if its methods +conflicts with one in your class. With method exclusion and aliasing, +you can work around these problems. =item L - Runtime Role Composition (TODO) @@ -103,9 +106,12 @@ metaclasses. Attribute metaclasses let you extend attribute declarations (with C) and behavior to provide additional attribute functionality. -=item L - The meta-attribute trait example (TODO) +=item L - The meta-attribute trait example -I +Extending Moose's attribute metaclass is a great way to add +functionality. However, attributes can only have one metaclass. +Applying roles to the attribute metaclass lets you provide +composable attribute functionality. =item L - The meta-instance example (TODO)