summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-28 22:05:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-28 22:05:55 +0000
commitb881518d78374cbb36c0ad56c39aaca9fc97154d (patch)
tree1a432a18aad7a59a50e59425b898b5bf5f1c6040 /pp_sys.c
parent4282de365ad3986f7690c8ae5aeb465272208972 (diff)
downloadperl-b881518d78374cbb36c0ad56c39aaca9fc97154d.tar.gz
Retract #16820, #16819, #16810, #16669, #16531, #16530, #16501
to restore some level of sanity in the tied scalars can of worms. p4raw-id: //depot/perl@16845
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 880c327ad0..c199cf7842 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -827,7 +827,9 @@ PP(pp_tie)
if (sv_isobject(sv)) {
sv_unmagic(varsv, how);
/* Croak if a self-tie on an aggregate is attempted. */
- if (varsv == SvRV(sv) && how == PERL_MAGIC_tied)
+ if (varsv == SvRV(sv) &&
+ (SvTYPE(sv) == SVt_PVAV ||
+ SvTYPE(sv) == SVt_PVHV))
Perl_croak(aTHX_
"Self-ties of arrays and hashes are not supported");
sv_magic(varsv, sv, how, Nullch, 0);