Message-ID: <
20030807145335.GF26683@fdgroup.com>
p4raw-id: //depot/perl@20559
SvREFCNT_dec(sv); /* Cast current value to the winds. */
/* preserve pad nature, but also mark as not live
* for any closure capturing */
- SvFLAGS(*(SV**)ptr) |= padflags & SVs_PADSTALE;
+ SvFLAGS(*(SV**)ptr) |= padflags | SVs_PADSTALE;
}
break;
case SAVEt_DELETE:
EXPECT
Variable "$x" is not available at (eval 1) line 2.
########
+use warnings 'closure' ;
+{
+ my $x = 1;
+ $y = \$x; # force abandonment rather than clear-in-place at scope exit
+ sub f2 { eval '$x' }
+}
+f2();
+EXPECT
+Variable "$x" is not available at (eval 1) line 2.
+########
# pad.c
no warnings 'closure' ;
sub x {