Hi, On Friday 21 May 2004 11:04 pm, hv@crypt.org wrote: > 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. I wrote the patch which includes the tests. Thank you so much for your resposes to my recent mail. Would please indicate me if there were any mistakes. --- pp_hot.c.orig 2004-05-21 10:49:37.000000000 +0900 +++ pp_hot.c 2004-05-24 21:20:41.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; --- t/op/my.t.orig 2004-05-24 20:27:08.000000000 +0900 +++ t/op/my.t 2004-05-25 00:01:53.000000000 +0900 @@ -2,7 +2,7 @@ # $RCSfile: my.t,v $ -print "1..31\n"; +print "1..32\n"; sub foo { my($a, $b) = @_; @@ -99,3 +99,12 @@ # Supposed to be copy-on-write via force_normal after a THINKFIRST check. print "$full $fonts{nok}\n"; } + +sub foo3 { + ++my $x->{foo}; + print "not " if defined $x->{bar}; + ++$x->{bar}; +} +eval { foo3(); foo3(); }; +print "not " if $@; +print "ok 32\n"; -- Shinya Hayakawa hayakawa@livedoor.jpThread Previous | Thread Next