From: Ricardo SIGNES Date: Mon, 19 May 2008 10:14:02 +0000 (-0400) Subject: correct errors / omissions in documenting DOES X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bcb8f0e81fd4f3ff4e9c5cf62b09223b964ff276;p=p5sagit%2Fp5-mst-13.2.git correct errors / omissions in documenting DOES Message-ID: <20080519141402.GA54401@knight.local> p4raw-id: //depot/perl@33869 --- diff --git a/lib/UNIVERSAL.pm b/lib/UNIVERSAL.pm index 0d6fbe0..6c75665 100644 --- a/lib/UNIVERSAL.pm +++ b/lib/UNIVERSAL.pm @@ -117,8 +117,9 @@ invocant performs the operations, merely that it does. (C of course mandates an inheritance relationship. Other relationships include aggregation, delegation, and mocking.) -By default, classes in Perl only perform the C role. To mark that -your own classes perform other roles, override C appropriately. +By default, classes in Perl only perform the C role, as well as the +role of all classes in their inheritance. In other words, by default C +responds identically to C. There is a relationship between roles and classes, as each class implies the existence of a role of the same name. There is also a relationship between diff --git a/pod/perlobj.pod b/pod/perlobj.pod index b6638e8..b0592ff 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -407,6 +407,13 @@ X X C returns the name of the package the argument has been blessed into, or C. +=item DOES(ROLE) + +C returns I if its object claims to perform the role C. + +By default, the response to C is the same as the response to ISA. For +more information on C and other universal methods, see L. + =item can(METHOD) X