diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-05 22:07:18 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-09-05 22:07:18 +0000 |
commit | cd06dffe59d60ee6a2fdd7c81f8cef42c7026b36 (patch) | |
tree | bf5d5d4e9d1c11e7d63fd97ce74470e8bedc88d3 /pp.c | |
parent | a2126434f8dd8eabb11a2219137816815758ea93 (diff) | |
download | perl-cd06dffe59d60ee6a2fdd7c81f8cef42c7026b36.tar.gz |
initial implementation of lvalue subroutines (slightly fixed
version of patch suggested by Ilya Zakharevich, which in turn
is based on the one suggested by Tuomas J. Lukka <lukka@iki.fi>)
p4raw-id: //depot/perl@4081
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -375,6 +375,8 @@ 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)) + Perl_croak(aTHX_ "Can't modify non-lvalue subroutine call"); } else cv = (CV*)&PL_sv_undef; |