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

Re: postfix dereference syntax

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
August 13, 2013 01:02
Subject:
Re: postfix dereference syntax
Message ID:
20130813010232.29006.qmail@lists-nntp.develooper.com
David Nicol wrote:
> New and improved postfix syntax test file

Getting better.  I still see no tests for ->*{ and ->%{.

In one place I see you use $ref->**->{IO}.

$ref->**->{IO} is equivalent to *$ref->{IO}, which is equivalent to
(\%{*$ref})->{IO} and similar to *$ref{HASH}->{IO} (except the latter
does not autovivify).

Maybe you meant $ref->*{IO} or $ref->**->*{IO}, which mean *$ref{IO}
and *{*$ref}{IO}, respectively, which both do the same thing (*{} is
idempotent).

And how about some fun, like:

is (\_->$*, \$_);
is (\_->*{SCALAR}->$*, \$_);
is (\_->**->*{SCALAR}->$*, \$_);


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