[EMAIL PROTECTED] wrote:
Author: larry
Date: Thu Sep  6 09:31:16 2007
New Revision: 14447

+
+C<< infix:<andthen> >>, proceed on success
+
+    test1() andthen test2()
+
+Returns the left argument if the left argument indicates failure
+(that is, if the result is undefined).  Otherwise it
+evaluates and returns the right argument.
+
+If the right side is a block or pointy block, the result of the left
+side is bound to any arguments of the block.  If the right side is
+not a block, a block scope is assumed around the right side, and the
+result of the left side is implicitly bound to C<$_> for the scope
+of the right side.  That is,
+
+    test1() andthen test2()
+
+is equivalent to
+
+    test1() andthen -> $_ { test2() }
+
+There is no corresponding high-precedence version.
+
 =back
+C<< infix:<orelse> >>, proceed on failure
- $value err $default
+    test1() orelse test2()
-Returns the left argument if it's defined, otherwise evaluates and
-returns the right argument.  In list context forces a false return
-to mean C<()>.  See C<//> above for high-precedence version.
+Returns the left argument if the left argument indicates success
+(that is, if the result is defined).  Otherwise it evaluates and
+returns the right argument.
+
+If the right side is a block or pointy block, the result of the left
+side is bound to any arguments of the block.  If the right side is
+not a block, a block scope is assumed around the right side, and the
+result of the left side is implicitly bound to C<$!> for the scope
+of the right side.  That is,
+
+    test1() orelse test2()
+
+is equivalent to
+
+    test1() orelse -> $! { test2() }
+
+(The low-precedence C<//> operator is similar, but does not set C<$!> or
+treat blocks specially.)
=back
Do the results of andthen and orelse really bind to ANY arguments of the second block? If the second block has two parameters it makes more sense to me for the results to bind to the first parameter and nothing to bind to the second parameter.

Joe Gottman

Reply via email to