Re: References to hash elements?

[email protected] (Leopold Toetsch)
Newsgroups perl.perl6.internals,perl.ponie.dev
Message-ID <[email protected]>
Arthur Bergman <[email protected]> wrote:
> Hi,

> I am wondering how the references to hash elements are planned to be
> done? The call to set_ must somehow be delayed until the time is right.

> $foo = \$hash{key};

> $$foo = "bar";

> $has{key} is now "bar"

There was some discussion WRT that issue months ago. Currently the
implementation is wrong IMHO. When $hash{key} doesn't exist a new
PerlUndef is returned (which is fine) but it should be stored in the
hash too, so that assigning to $foo does The Rigth Thing.
(Parrot aggregates have reference semantics, so ...)

> On another note, is there going to be a PMC flag for tainted data?

I can imagine, that these get a different vtable which propagates
taintness on.

> Arthur

leo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.