Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
be explicit about the power of :$bar
  • Loading branch information
gfldex committed Jul 8, 2016
1 parent 4109e90 commit 9567745
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/Type/Pair.pod6
Expand Up @@ -17,7 +17,6 @@ There are many syntaxes for creating C<Pair>s:
'key' => 'value' # this...
:key<value> # ...means the same as this
:key<value1 value2> # But this is key => <value1 value2>
:$foo # short for foo => $foo
:foo(127) # short for foo => 127
:127foo # the same foo => 127
Expand All @@ -26,6 +25,12 @@ Variants of this are
:key # same as key => True
:!key # same as key => False
Any variable can be turned into a C<Pair> of it's name and it's value.
my $bar = 10;
my %h = :$bar;
dd %h; OUTPUT«Hash %h = {:bar(10)}␤»
=head1 Methods
=head2 method antipair
Expand Down

0 comments on commit 9567745

Please sign in to comment.