diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-03 14:59:41 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-03 14:59:41 +0000 |
commit | c71fccf11fde00682b01a755429d9c2484b4a8fa (patch) | |
tree | 922818fb2930d53993ef47028f9f929abb40029c /t | |
parent | fea629d86f3fde9776b0fe77f054fb3a45d1f23b (diff) | |
download | perl-c71fccf11fde00682b01a755429d9c2484b4a8fa.tar.gz |
Integrate change #10394 from maintperl; lexical file scope leakage.
p4raw-link: @10394 on //depot/maint-5.6/perl: f8a08f7b8bd67b287f13d07e110e93e62aebd509
p4raw-id: //depot/perl@10395
p4raw-integrated: from //depot/maint-5.6/perl@10393 'copy in'
t/pragma/warn/universal (@5902..) 'merge in' perly.c (@8159..)
vms/perly_c.vms (@8169..) t/op/misc.t (@8636..) perly.y
(@9292..)
Diffstat (limited to 't')
-rwxr-xr-x | t/op/misc.t | 12 | ||||
-rw-r--r-- | t/pragma/warn/universal | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/t/op/misc.t b/t/op/misc.t index 90df19a420..4b4d8031d4 100755 --- a/t/op/misc.t +++ b/t/op/misc.t @@ -575,6 +575,18 @@ print qw(ab a\b a\\b); EXPECT aba\ba\b ######## +# lexicals declared after the myeval() definition should not be visible +# within it +sub myeval { eval $_[0] } +my $foo = "ok 2\n"; +myeval('sub foo { local $foo = "ok 1\n"; print $foo; }'); +die $@ if $@; +foo(); +print $foo; +EXPECT +ok 1 +ok 2 +######## # 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. diff --git a/t/pragma/warn/universal b/t/pragma/warn/universal index 6dbb1be4e0..d9b1883532 100644 --- a/t/pragma/warn/universal +++ b/t/pragma/warn/universal @@ -12,5 +12,3 @@ my $a = bless [] ; UNIVERSAL::isa $a, Jim ; EXPECT Can't locate package Joe for @main::ISA at - line 5. -Can't locate package Joe for @main::ISA. -Can't locate package Joe for @main::ISA. |