Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add long names to signature
  • Loading branch information
gfldex committed Jun 17, 2016
1 parent 79b198d commit 85c37a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/Type/Signature.pod
Expand Up @@ -400,6 +400,15 @@ However, this unpacking of objects as their attributes is only the default
behavior. To make an object get destructured differently, change its
L<C<Capture>> method.
=head2 C<Long Names>
To avoid to have some arguments to be considered for multiple dispatch
separate them with a double semi-colon.
multi sub f(Int $i, Str $s;; :$b) { dd $i, $s, $b };
f(10, 'answer');
# OUTPUT«10␤"answer"␤Any $b = Any␤»
=head2 X<Capture Parameters|parameter,|>
Prefixing a parameter with a vertical bar C<|> makes the parameter a
Expand Down

0 comments on commit 85c37a8

Please sign in to comment.