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

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Eric Brine
Date:
August 15, 2013 14:03
Subject:
Re: postfix dereference syntax
Message ID:
CALJW-qGya-wNiWuWfeBCpQfLv5UbeOoWmK1V2FXnKoKbp9QQZQ@mail.gmail.com
On Wed, Aug 14, 2013 at 12:03 PM, Father Chrysostomos <sprout@cpan.org>wrote:

> 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() : []->@*"
>
>
Just like ${...}[0] => ...->[0]

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