diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-25 16:28:40 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-25 16:28:40 +0000 |
commit | 9e53291561fb0b9587025e8b98535441b489e207 (patch) | |
tree | a7c3b4efcd28a275e352efba839f19fb45cbd87b /t/run/fresh_perl.t | |
parent | 71e41b3a4c997410fc99bbdf7f8cdcb35863d5be (diff) | |
download | perl-9e53291561fb0b9587025e8b98535441b489e207.tar.gz |
Integrate changes 13474+13478+13584 from maintperl;
anon sub leakage.
p4raw-id: //depot/perl@14418
p4raw-edited: from //depot/maint-5.6/perl@14417 'ignore' op.c
(@13478..)
Diffstat (limited to 't/run/fresh_perl.t')
-rw-r--r-- | t/run/fresh_perl.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 41aa1eca58..d02eb70cff 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -573,6 +573,16 @@ EOT EXPECT ok ######## +# test that closures generated by eval"" hold on to the CV of the eval"" +# for their entire lifetime +$code = eval q[ + sub { eval '$x = "ok 1\n"'; } +]; +&{$code}(); +print $x; +EXPECT +ok 1 +######## # This test is here instead of pragma/locale.t because # the bug depends on in the internal state of the locale # settings and pragma/locale messes up that state pretty badly. |