From: Robert Buels Date: Wed, 12 Aug 2009 22:49:14 +0000 (-0700) Subject: doc patch, added mention of how attribute accessors count toward satisfying role... X-Git-Tag: 0.89~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92fcea04a34fed4fb9703ea57dafc363ecc81372;p=gitmo%2FMoose.git doc patch, added mention of how attribute accessors count toward satisfying role requires --- diff --git a/lib/Moose/Manual/Roles.pod b/lib/Moose/Manual/Roles.pod index 88d94d8..7108ded 100644 --- a/lib/Moose/Manual/Roles.pod +++ b/lib/Moose/Manual/Roles.pod @@ -27,6 +27,9 @@ own. You could have a role that consisted only of a list of required methods, in which case the role would be very much like a Java interface. +Note that attribute accessors also count as methods for the +purposes of satisfying the requirements of a role. + =head1 A SIMPLE ROLE Creating a role looks a lot like creating a Moose class: diff --git a/lib/Moose/Role.pm b/lib/Moose/Role.pm index ed4c136..46895b3 100644 --- a/lib/Moose/Role.pm +++ b/lib/Moose/Role.pm @@ -193,6 +193,9 @@ Moose::Role also offers two role-specific keyword exports: Roles can require that certain methods are implemented by any class which C the role. +Note that attribute accessors also count as methods for the purposes +of satisfying the requirements of a role. + =item B Roles can C other roles, in effect saying "I can never be combined