if (SvTYPE(hv) == SVt_PVHV) {
if (PL_op->op_private & OPpLVAL_INTRO)
- preeminent = SvRMAGICAL(hv) ? 1 : hv_exists_ent(hv, keysv, 0);
+ preeminent =
+ ( SvRMAGICAL(hv)
+ && !mg_find((SV*)hv, PERL_MAGIC_tied)
+ && !mg_find((SV*)hv, PERL_MAGIC_env)
+ ) ? 1 : hv_exists_ent(hv, keysv, 0);
+
he = hv_fetch_ent(hv, keysv, lval && !defer, hash);
svp = he ? &HeVAL(he) : 0;
}
sub TIEHASH { bless {}, $_[0] }
sub STORE { print "# STORE [@_]\n"; $_[0]->{$_[1]} = $_[2] }
sub FETCH { my $v = $_[0]->{$_[1]}; print "# FETCH [@_=$v]\n"; $v }
+ sub EXISTS { print "# EXISTS [@_]\n"; exists $_[0]->{$_[1]}; }
sub DELETE { print "# DELETE [@_]\n"; delete $_[0]->{$_[1]}; }
sub CLEAR { print "# CLEAR [@_]\n"; %{$_[0]} = (); }
}