Browse files

First attempt at speccing "samewith"

  • Loading branch information...
1 parent c313c29 commit a888b089ab07c39deb5b972270c01d76919ed100 @lizmat lizmat committed Aug 8, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 S12-objects.pod
@@ -974,6 +974,7 @@ of the candidate list:
nextsame; # redispatch with the original arguments (no return)
nextwith(); # redispatch with no arguments (no return)
nextwith(1,2,3); # redispatch with a new set of arguments (no return)
+ samewith(1,2,3); # same dispatcher with new arguments (no return)
For dispatches using C<.> and C<.?>, the return value is the
C<Capture> returned by the first method completed without deferring.
@@ -1014,6 +1015,12 @@ This confusion could arise since we use C<nextsame> semantics at
least three different ways: single dispatch, multiple dispatch,
and routine wrapper dispatch.]
+The C<samewith> redispatches the method call using the current dispatcher: this
+is mainly intended if you have one "worker" method, and several "frontend"
+methods in the same class to avoid code duplication. The frontend methods then
+mangle the parameters before sending them off to the worker method with
=head1 Parallel dispatch
Any of the method call forms may be turned into a hyperoperator by

0 comments on commit a888b08

Please sign in to comment.