develooper Front page | perl.perl5.porters | Postings from August 2013

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
August 14, 2013 16:03
Subject:
Re: postfix dereference syntax
Message ID:
20130814160329.32051.qmail@lists-nntp.develooper.com
Ricardo Signes wrote:
> « $x->@* acts exactly like @$x » is the rule.  "Except in interpolation" would
> be the exception.

So we allow "$x->@*" and "$$x->@*" and "$x->$*->@*".

What about the brace forms?  How far does the equivalance of "@{...}"
and "...->@*" hold?

"@{$foo}"     --> "$foo->@*"
"@{$foo[0]}"  --> "$foo[0]->@*"
"@{*$foo}" ???
"@{$foo->**}" --> "$foo->**->@*"
"@{$foo->()}" --> "$foo->()->@*"
"@{$foo++}"   --> "$foo++->@*"
"@{$foo ? bar() : []}" => "$foo ? bar() : []->@*"


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About