diff options
author | Simon Cozens <simon@netthink.co.uk> | 2000-12-27 02:30:03 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-28 22:59:16 +0000 |
commit | d32f2495b04e916e41d6514e2a6126c7223b49c9 (patch) | |
tree | d2bc308597a2f631eff0c83a1337d1f1582a352d /pp.c | |
parent | f72d64f00dcc19f7e88984b22d52340f7101e18f (diff) | |
download | perl-d32f2495b04e916e41d6514e2a6126c7223b49c9.tar.gz |
lvalue AUTOLOAD. No, really.
Message-ID: <20001227023003.A7677@deep-dark-truthful-mirror.perlhacker.org>
p4raw-id: //depot/perl@8243
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -385,8 +385,12 @@ PP(pp_rv2cv) if (cv) { if (CvCLONE(cv)) cv = (CV*)sv_2mortal((SV*)cv_clone(cv)); - if ((PL_op->op_private & OPpLVAL_INTRO) && !CvLVALUE(cv)) - DIE(aTHX_ "Can't modify non-lvalue subroutine call"); + if ((PL_op->op_private & OPpLVAL_INTRO)) { + if (gv && GvCV(gv) == cv && (gv = gv_autoload4(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv), FALSE))) + cv = GvCV(gv); + if (!CvLVALUE(cv)) + DIE(aTHX_ "Can't modify non-lvalue subroutine call"); + } } else cv = (CV*)&PL_sv_undef; |