From: Gurusamy Sarathy Date: Mon, 20 Mar 2000 16:27:13 +0000 (+0000) Subject: autovivify open($fh[0],...) properly X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=afd1915d434259c875b8da032bfece22c20f714f;p=p5sagit%2Fp5-mst-13.2.git autovivify open($fh[0],...) properly p4raw-id: //depot/perl@5836 --- diff --git a/op.c b/op.c index 0cdeb92..3d55126 100644 --- a/op.c +++ b/op.c @@ -5520,6 +5520,13 @@ Perl_ck_fun(pTHX_ OP *o) name = GvNAME(gv); len = GvNAMELEN(gv); } + else if (kid->op_type == OP_AELEM + || kid->op_type == OP_HELEM) + { + name = "__ANONIO__"; + len = 10; + mod(kid,type); + } if (name) { SV *namesv; targ = pad_alloc(OP_RV2GV, SVs_PADTMP); diff --git a/pp.c b/pp.c index 30476bd..a59664e 100644 --- a/pp.c +++ b/pp.c @@ -205,7 +205,7 @@ PP(pp_rv2gv) if (SvROK(sv)) goto wasref; } - if (!SvOK(sv)) { + if (!SvOK(sv) && sv != &PL_sv_undef) { /* If this is a 'my' scalar and flag is set then vivify * NI-S 1999/05/07 */