Author: larry Date: Mon Jan 22 17:46:46 2007 New Revision: 13536 Modified: doc/trunk/design/syn/S03.pod
Log: Debrainoization suggested by John Macdonald++. Modified: doc/trunk/design/syn/S03.pod ============================================================================== --- doc/trunk/design/syn/S03.pod (original) +++ doc/trunk/design/syn/S03.pod Mon Jan 22 17:46:46 2007 @@ -371,10 +371,18 @@ may be declared to take extra arguments only if they are named-only arguments.) -=item * The C<&&> and C<||> operators are smarter about list context and -return C<()> on failure in list context rather than C<Bool::False>. Note -that this applies only to the left argument--the right argument is always -returned verbatim if the left succeeds. +=item * The C<&&> and C<||> operators are smarter about list context +and return C<()> on failure in list context rather than C<Bool::False>. +The operators still short-circuit, but if either operator would return +a false value, it is converted to the null list in list context so +that the false results are self-deleting. (If this self-deleting +behavior is not desired, put the expression into item context rather +than list context.) This self-deletion is a behavior of the operators +themselves, not a general property of boolean values in list context, so + + @foo = true($a||$b); + +is guaranteed to insert exactly one boolean value into C<@foo>. =back