Change 33869 by [EMAIL PROTECTED] on 2008/05/19 15:51:00

        Subject: [PATCH] correct errors / omissions in documenting DOES
        From: Ricardo SIGNES <[EMAIL PROTECTED]>
        Date: Mon, 19 May 2008 10:14:02 -0400
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/lib/UNIVERSAL.pm#18 edit
... //depot/perl/pod/perlobj.pod#34 edit

Differences ...

==== //depot/perl/lib/UNIVERSAL.pm#18 (text) ====
Index: perl/lib/UNIVERSAL.pm
--- perl/lib/UNIVERSAL.pm#17~28403~     2006-06-20 01:16:58.000000000 -0700
+++ perl/lib/UNIVERSAL.pm       2008-05-19 08:51:00.000000000 -0700
@@ -117,8 +117,9 @@
 mandates an inheritance relationship.  Other relationships include aggregation,
 delegation, and mocking.)
 
-By default, classes in Perl only perform the C<UNIVERSAL> role.  To mark that
-your own classes perform other roles, override C<DOES> appropriately.
+By default, classes in Perl only perform the C<UNIVERSAL> role, as well as the
+role of all classes in their inheritance.  In other words, by default C<DOES>
+responds identically to C<isa>.
 
 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

==== //depot/perl/pod/perlobj.pod#34 (text) ====
Index: perl/pod/perlobj.pod
--- perl/pod/perlobj.pod#33~31107~      2007-04-30 02:22:58.000000000 -0700
+++ perl/pod/perlobj.pod        2008-05-19 08:51:00.000000000 -0700
@@ -407,6 +407,13 @@
 C<blessed> returns the name of the package the argument has been
 blessed into, or C<undef>.
 
+=item DOES(ROLE)
+
+C<DOES> returns I<true> if its object claims to perform the role C<ROLE>.
+
+By default, the response to C<DOES> is the same as the response to ISA.  For
+more information on C<DOES> and other universal methods, see L<UNIVERSAL>.
+
 =item can(METHOD)
 X<can>
 
End of Patch.

Reply via email to