Skip to content

Commit

Permalink
Update Pair.pod
Browse files Browse the repository at this point in the history
Add some more examples of the adverbial form
  • Loading branch information
salortiz committed Feb 10, 2016
1 parent 861648f commit c08878c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions doc/Type/Pair.pod
Expand Up @@ -11,16 +11,20 @@ atomic units in C<Hash>es, and they are also used in conjunction with named
arguments and parameters.
X<:> X<< => >> X<:!>
There are three syntaxes for C<Pair>s:
There are many syntaxes for creating C<Pair>s:
'key' => 'value' # this...
:key<value> # ...means the same as this
:$foo # short for foo => $foo
Pair.new('key','value) # The canonical way
'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
Variants of this are
:key # same as key => True
:!key # same as key => False
:key # same as key => True
:!key # same as key => False
=head1 Methods
Expand Down

0 comments on commit c08878c

Please sign in to comment.