Author: larry
Date: Fri Oct 20 17:01:15 2006
New Revision: 13252
Modified:
doc/trunk/design/syn/S12.pod
Log:
"does" operator is non-associative according to S03. Leave it that way for now.
Modified: doc/trunk/design/syn/S12.pod
==
--- doc/trunk/design/syn/S12.pod(original)
+++ doc/trunk/design/syn/S12.podFri Oct 20 17:01:15 2006
@@ -12,9 +12,9 @@
Maintainer: Larry Wall <[EMAIL PROTECTED]>
Date: 27 Oct 2004
- Last Modified: 4 Oct 2006
+ Last Modified: 20 Oct 2006
Number: 12
- Version: 28
+ Version: 29
=head1 Overview
@@ -1017,10 +1017,17 @@
$fido does Sentry
-The C operator returns the object so you can nest mixins:
+The C operator is non-associative, so this is a syntax error:
$fido does Sentry does Tricks does TailChasing does Scratch;
+You can, however, say
+
+$fido does Sentry;
+$fido does Tricks;
+$fido does TailChasing;
+$fido does Scratch;
+
Unlike the compile-time role composition, each of these layers on a new
mixin with a new level of inheritance, creating a new anonymous class
for dear old Fido, so that a C<.chase> method from C hides a
@@ -1028,7 +1035,7 @@
You can also mixin a precomposed set of roles:
-$fido does Sentry | Tricks | TailChasing | Scratch;
+$fido does (Sentry, Tricks, TailChasing, Scratch);
This will level the playing field for collisions among the new set of roles,
and guarantees the creation of no more than one more anonymous class.