summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-13 02:31:47 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-13 02:31:47 +0000
commit68a4a7e45ed01889c35c30188ba30508bfc1e5b5 (patch)
tree4a3fac7b1b30d1ad679e5c5f2fce698c4bd8df05 /pp_sys.c
parent2f2d036aac7a6d378d15faf96ae8ed621bef910c (diff)
downloadperl-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 5fa86d62aa..9329ffdb40 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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;