Message-Id: <
200405250006.06387.hayakawa@livedoor.jp>
Allow autovivification of (my $x)->{foo}
p4raw-id: //depot/perl@22874
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;
# $RCSfile: my.t,v $
-print "1..33\n";
+print "1..34\n";
sub foo {
my($a, $b) = @_;
eval { my $x = opth };
print "not " if $@;
print "ok 33\n";
+
+
+sub foo3 {
+ ++my $x->{foo};
+ print "not " if defined $x->{bar};
+ ++$x->{bar};
+}
+eval { foo3(); foo3(); };
+print "not " if $@;
+print "ok 34\n";
+