From: Damian Conway [EMAIL PROTECTED] > If it were allowed, it would probably be done > via properties instead: > > sub hidden (str $name, int $force, int $override is aka($force)) > { ... }
How does this method affect the non-parameter-based calling scheme? It looks like it is possible to use three arguments in the call to hidden(). While this doesn't matter for this case, it might if another named argument was tacked on to the end, like this: sub hidden (str $name, int $force, int $override is aka($force), int $pretty_print); print hidden('name',1,1); #<-- What does this do? I think that the slight modification of Damian's original solution is the best: sub hidden (str $name, int $force is aka('override')) { ... } Then there is no question that "override" is Just Another Name for "force" (eliminating weird things like "$force is aka(@override)"), the problem of argument order in normal sub calls goes away, and there is a happy minimum of extra syntax. By the way, thanks for pointing out the original discussion; I haven't been on the list long enough to have known that it existed. Peter Behroozi