develooper Front page | perl.perl5.porters | Postings from May 2004

Re: my $x->{foo} doesn't work

Thread Previous | Thread Next
From:
hv
Date:
May 21, 2004 07:02
Subject:
Re: my $x->{foo} doesn't work
Message ID:
200405211404.i4LE49B16766@zen.crypt.org
Shinya Hayakawa <hayakawa@livedoor.jp> wrote:
:Thanks.
:I rewrote the patch as follows.
:
:--- pp_hot.c.orig       2004-05-21 10:49:37.000000000 +0900
:+++ pp_hot.c    2004-05-21 18:43:46.000000000 +0900
:@@ -204,7 +204,7 @@
:     if (PL_op->op_flags & OPf_MOD) {
:        if (PL_op->op_private & OPpLVAL_INTRO)
:            SAVECLEARSV(PAD_SVl(PL_op->op_targ));
:-        else if (PL_op->op_private & OPpDEREF) {
:+        if (PL_op->op_private & OPpDEREF) {
:            PUTBACK;
:            vivify_ref(PAD_SVl(PL_op->op_targ), PL_op->op_private & OPpDEREF);
:            SPAGAIN;

I have nothing in principle against including this, except that it is
missing tests. Perhaps you could have a go at adding some tests to
explore the edge cases around this - a good starting point, for example,
would be to find a test case that exposes the problem with your first
attempt at this patch.

Hugo

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