diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-11-12 16:43:27 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-11-12 17:37:26 +0000 |
commit | 6ec5370cb0aeb185d92b8fd2bad21bb10f75b30e (patch) | |
tree | ec1d3f004aba56513e7c0feb6aa9002f2a466aae | |
parent | 7faed49a94b8f6f7d3276b2b8e26e07f700b71f6 (diff) | |
download | perl-6ec5370cb0aeb185d92b8fd2bad21bb10f75b30e.tar.gz |
Explicitly check that our $_; is special, and forced to main::
-rw-r--r-- | t/op/mydef.t | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/t/op/mydef.t b/t/op/mydef.t index 444bf4ae38..e034c78d3a 100644 --- a/t/op/mydef.t +++ b/t/op/mydef.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -print "1..70\n"; +print "1..72\n"; my $test = 0; sub ok ($@) { @@ -198,3 +198,21 @@ my $file = tempfile(); ::ok( $_ ne 'fqdb', 'unqualified $_ is in main' ); ::ok( q/$_/ ne 'fqdb', 'unqualified, evaled $_ is in main' ); } + +{ + $clank_est::qunckkk = 3; + our $qunckkk; + $qunckkk = 4; + package clank_est; + our $qunckkk; + ::ok($qunckkk == 3, 'regular variables are not forced to main'); +} + +{ + $whack::_ = 3; + our $_; + $_ = 4; + package whack; + our $_; + ::ok($_ == 4, '$_ is "special", and always forced to main'); +} |