diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-13 02:31:47 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-13 02:31:47 +0000 |
commit | 68a4a7e45ed01889c35c30188ba30508bfc1e5b5 (patch) | |
tree | 4a3fac7b1b30d1ad679e5c5f2fce698c4bd8df05 /pp_sys.c | |
parent | 2f2d036aac7a6d378d15faf96ae8ed621bef910c (diff) | |
download | perl-68a4a7e45ed01889c35c30188ba30508bfc1e5b5.tar.gz |
Self-ties are unsupported currently, stopgap patch from Alan Burlison.
p4raw-id: //depot/perl@7213
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -794,7 +794,10 @@ PP(pp_tie) POPSTACK; if (sv_isobject(sv)) { sv_unmagic(varsv, how); - sv_magic(varsv, (SvRV(sv) == varsv ? Nullsv : sv), how, Nullch, 0); + /* Croak if a self-tie is attempted */ + if (varsv == SvRV(sv)) + Perl_croak(aTHX_ "Self-ties are not supported"); + sv_magic(varsv, sv, how, Nullch, 0); } LEAVE; SP = PL_stack_base + markoff; |