diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-08 18:35:48 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-08 18:35:48 +0000 |
commit | faa7e5bbaa1a624cf61859998ab6ab0a1323ed35 (patch) | |
tree | 517d38c6e942b647e70d697aa0ce84e049de56eb /t/comp | |
parent | e4783991709775389a3fc70c841522b0165cd076 (diff) | |
download | perl-faa7e5bbaa1a624cf61859998ab6ab0a1323ed35.tar.gz |
do FILE should not see outside lexicals (from Rick Delaney
<rick@consumercontact.com>)
p4raw-id: //depot/perl@5620
Diffstat (limited to 't/comp')
-rwxr-xr-x | t/comp/require.t | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/t/comp/require.t b/t/comp/require.t index efce899edc..1d92687355 100755 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -7,7 +7,7 @@ BEGIN { # don't make this lexical $i = 1; -print "1..19\n"; +print "1..20\n"; sub do_require { %INC = (); @@ -113,7 +113,18 @@ do_require "1"; print "# $@\nnot " if $@; print "ok ",$i++,"\n"; -END { 1 while unlink 'bleah.pm'; } +# do FILE shouldn't see any outside lexicals +my $x = "ok $i\n"; +write_file("bleah.do", <<EOT); +\$x = "not ok $i\\n"; +EOT +do "bleah.do"; +dofile(); +sub dofile { do "bleah.do"; }; +print $x; +$i++; + +END { 1 while unlink 'bleah.pm'; 1 while unlink 'bleah.do'; } # ***interaction with pod (don't put any thing after here)*** |