Skip to content

Commit 8cf921a

Browse files
committed
Link to Pair type and slurpy arguments.
1 parent 74fe834 commit 8cf921a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ Replaced by C«+<» and C«+>» .
648648
In Perl 5, C«=>» acted just like a comma, but also quoted its left-hand
649649
side.
650650
651-
In Perl 6, C«=>» is the Pair operator, which is quite different in
651+
In Perl 6, C«=>» is the L<Pair|/type/Pair> operator, which is quite different in
652652
principle, but works the same in many situations.
653653
654654
If you were using C«=>» in hash initialization, or in passing arguments to
@@ -664,8 +664,10 @@ of a list, or in passing arguments to a sub that expects a flat list of
664664
KEY, VALUE, KEY, VALUE, then continuing to use C«=>» may break your code.
665665
The easiest workaround is to change the fat comma to a regular comma, and
666666
manually add quotes to its left-hand side. Or, you can change the sub's API
667-
to slurp a hash. A better long-term solution is to change the sub's API to
668-
expect Pairs. However, this requires you to change all sub calls at once.
667+
to L<slurp a hash|/type/Signature#Slurpy_(A.K.A._Variadic)_Parameters>.
668+
A better long-term solution is to change the sub's API to
669+
expect L<Pair|/type/Pair>s; however, this requires you to change
670+
all sub calls at once.
669671
670672
=begin code :lang<perl5>
671673
# Perl 5

0 commit comments

Comments
 (0)