From: Ricardo Signes Date: Sat, 5 Oct 2013 18:41:04 +0000 (-0400) Subject: tweak postfix deref docs, update for glob deref X-Git-Tag: upstream/5.20.0~1599^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=864eb29a6a74eabfce596a70a91c04fc7dd82db2;p=platform%2Fupstream%2Fperl.git tweak postfix deref docs, update for glob deref --- diff --git a/pod/perlref.pod b/pod/perlref.pod index e9f7974..f96463b 100644 --- a/pod/perlref.pod +++ b/pod/perlref.pod @@ -771,10 +771,14 @@ left-to-right. The following equivalencies are defined: $aref->@*; # same as @{ $aref } $href->%*; # same as %{ $href } $cref->&*; # same as &{ $cref } + $gref->&*; # same as *{ $cref } Note especially that C<< $cref->&* >> is I equivalent to C<< -$cref->() >>, and can serve different purposes. C<< $gref->** >> is not -(yet?) implemented. +$cref->() >>, and can serve different purposes. + +Glob elements can be extracted through the postfix dereferencing feature: + + $gref->*{SCALAR}; # same as *{ $gref }{SCALAR} Postfix array and scalar dereferencing I be used in interpolating strings (double quotes or the C operator), but only if the @@ -788,15 +792,16 @@ dereferencing notation, with the following equivalencies: $aref->@[ ... ]; # same as @$aref[ ... ] $href->@{ ... }; # same as @$href{ ... } -Postfix key/value pair slicing is not I implemented, but will -behave as expected: +Postfix key/value pair slicing, added in 5.20.0 and documented in +LValue Hash Slices section of perldata|perldata/"Key/Value Hash +Slices">, also behaves as expected: $aref->%[ ... ]; # same as %$aref[ ... ] $href->%{ ... }; # same as %$href{ ... } As with postfix array, postfix value slice dereferencing I be used in interpolating strings (double quotes or the C operator), but only -if the additional C feature is enabled. +if the additional C L is enabled. =head1 SEE ALSO