Message-ID: <lrae5f9d1m.fsf@caliper.ActiveState.com>
p4raw-id: //depot/perl@9734
SvTEMP_off(sv);
else
sv = &PL_sv_undef;
- if (av != PL_curstack && SvIMMORTAL(sv)) {
+ if (av != PL_curstack && sv == &PL_sv_undef) {
SV *lv = cx->blk_loop.iterlval;
if (lv && SvREFCNT(lv) > 1) {
SvREFCNT_dec(lv);
EXPECT
2 2 2
########
+# used to attach defelem magic too all immortal values,
+# which made restore of local $_ fail.
+foo(2>1);
+sub foo { bar() for @_; }
+sub bar { local $_; }
+print "ok\n";
+EXPECT
+ok
+########
@a = ($a, $b, $c, $d) = (5, 6);
print "ok\n"
if ($a[0] == 5 and $a[1] == 6 and !defined $a[2] and !defined $a[3]);