X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FSpec%2FRole.pod;h=7dbfcfe0913f906bc42e37851c4b95f833c06518;hb=d939e016559e9796651f35533c8bd8dfc5ccdfc3;hp=b44667a7fcad36243512c0a3d1311fe1dc215548;hpb=3e19778d44d48d46fbbf0c32c10ee9b11371225d;p=gitmo%2FMoose.git diff --git a/lib/Moose/Spec/Role.pod b/lib/Moose/Spec/Role.pod index b44667a..7dbfcfe 100644 --- a/lib/Moose/Spec/Role.pod +++ b/lib/Moose/Spec/Role.pod @@ -7,6 +7,8 @@ Moose::Spec::Role - Formal spec for Role behavior =head1 DESCRIPTION +B This document is currently incomplete. + =head2 Components of a Role =over 4 @@ -262,6 +264,25 @@ It is important to note that Role::FooBar is simply fufilling the required C method, and **NOT** overriding C. This is an important distinction to make. +Now here is another example of a (correct) type of overriding, this +time using the I option. + + package Role::Foo; + use Moose::Role; + + sub foo { ... } + + package Role::FooBar; + use Moose::Role; + + with 'Role::Foo' => { excludes => 'foo' }; + + sub foo { ... } + sub bar { ... } + +By specifically excluding the C method during composition, +we allow B to define it's own version of C. + =back =head1 SEE ALSO