diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2003-01-16 17:12:37 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-01-22 21:22:31 +0000 |
commit | 8716503d4f67eab8980805177dcbdf2c897aa42e (patch) | |
tree | 75dfd1eeaae16fe1ce44e888b71343ff0bf456ac /t/comp/our.t | |
parent | f0709b241ca4633837a71ebb25b49d6477a9b61f (diff) | |
download | perl-8716503d4f67eab8980805177dcbdf2c897aa42e.tar.gz |
Re: difference between my and our before introduction
Message-ID: <20030116171237.C420@fdgroup.com>
(with a small test tweak)
p4raw-id: //depot/perl@18571
Diffstat (limited to 't/comp/our.t')
-rw-r--r-- | t/comp/our.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/comp/our.t b/t/comp/our.t index 8029f613c5..69fbb03121 100644 --- a/t/comp/our.t +++ b/t/comp/our.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -print "1..6\n"; +print "1..7\n"; { package TieAll; @@ -48,3 +48,13 @@ is(TieAll->calls, '', 'our @x has no runtime effect'); {our (@x);} is(TieAll->calls, '', 'our (@x) has no runtime effect'); + + +$y = 1; +{ + my $y = 2; + { + our $y = $y; + is($y, 2, 'our shouldnt be visible until introduced') + } +} |