develooper Front page | perl.perl5.porters | Postings from July 2011

Re: Why views are useful, and why their syntax doesn't matter much

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
July 7, 2011 07:15
Subject:
Re: Why views are useful, and why their syntax doesn't matter much
Message ID:
CAHhgV8j6os82oqmZ2Eeii9o3Ht2pvXh65aQt5a8CikDaJDN4Hw@mail.gmail.com
On Thu, Jul 7, 2011 at 2:31 PM, Nicholas Clark <nick@ccl4.org> wrote:
> Also, right now, I think that only read-only views of read-write scalars
> will work. SvREADONLY() doesn't currently mean anything on arrays, hashes
> (typeglobs etc). Even worse, SVf_READONLY is hijacked on hashes to mean
> "restricted hash", so they would have to be moved out of the way to allow
> anything.

SvREADONLY works fine on arrays. The situation with hashes is
something that annoys me, not in the last place because it's almost
but not quite the right thing.

> Which suggests that "shallow" is a reasonable answer.

Which is exactly what it currently does.

Leon

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