From: Nicholas Clark Date: Thu, 12 Nov 2009 16:43:27 +0000 (+0000) Subject: Explicitly check that our $_; is special, and forced to main:: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6ec5370cb0aeb185d92b8fd2bad21bb10f75b30e;p=p5sagit%2Fp5-mst-13.2.git Explicitly check that our $_; is special, and forced to main:: --- diff --git a/t/op/mydef.t b/t/op/mydef.t index 444bf4a..e034c78 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'); +}