diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-28 11:27:46 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-28 11:27:46 +0000 |
commit | a3f914c54a06647534c0855205d45eb950aebdd4 (patch) | |
tree | 8bada15a2dcc58072ddcdefbe9a64796f0017be0 /pp.c | |
parent | 60ad88b8fe9480f2f097fca26f4f3a9f83a4f830 (diff) | |
download | perl-a3f914c54a06647534c0855205d45eb950aebdd4.tar.gz |
make $1 et al readonly under threads; make C<undef $1> fail like
C<$1 = undef> does
p4raw-id: //depot/perl@2335
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -762,8 +762,11 @@ PP(pp_undef) RETPUSHUNDEF; if (SvTHINKFIRST(sv)) { - if (SvREADONLY(sv)) - RETPUSHUNDEF; + if (SvREADONLY(sv)) { + dTHR; + if (PL_curcop != &PL_compiling) + croak(PL_no_modify); + } if (SvROK(sv)) sv_unref(sv); } |