(I couldn't get a test that worked, and accidentally included my
failed attempt in the patch).
p4raw-link: @31447 on //depot/perl:
efa785391fea9e6aff4c999b27ad62b7d8f9ea99
p4raw-id: //depot/perl@31448
use Config;
require './test.pl'; # for runperl()
-print "1..188\n";
+print "1..187\n";
my $test = 1;
sub test (&) {
test { $flag == 1 };
}
-# although the 'my $x if ...' form is deprecated, it must still work.
-# Ensure that cloning a stale var gives a new undef value rather than
-# sharing the old value
-
-{
- sub f {
- my $a = 1 if $_[0];
- return sub { \$a };
- }
- my $c1 = f(1);
- my $c2 = f(0);
- my $r1 = $c1->();
- my $r2 = $c2->();
- warn "r1=$r1 r2=$r2\n";
- test { !defined $$r2 };
- test { $r1 ne $r2 };
-}
-