From bcb8f0e81fd4f3ff4e9c5cf62b09223b964ff276 Mon Sep 17 00:00:00 2001 From: Ricardo SIGNES Date: Mon, 19 May 2008 06:14:02 -0400 Subject: [PATCH] correct errors / omissions in documenting DOES Message-ID: <20080519141402.GA54401@knight.local> p4raw-id: //depot/perl@33869 --- lib/UNIVERSAL.pm | 5 +++-- pod/perlobj.pod | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.7.4