From 5ce0178e8e6a35225316965a9dccd12fa35eb60d Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 28 May 2000 08:46:10 +0000 Subject: fix bogus redeclaration warning for "our" variables in different scopes p4raw-id: //depot/perl@6137 --- t/pragma/strict-vars | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't/pragma/strict-vars') diff --git a/t/pragma/strict-vars b/t/pragma/strict-vars index a764fb23d6..5ba579d969 100644 --- a/t/pragma/strict-vars +++ b/t/pragma/strict-vars @@ -387,6 +387,8 @@ EXPECT # multiple our declarations in same scope, same package, warning use strict 'vars'; use warnings; +{ our $x = 1 } +{ our $x = 0 } our $foo; { our $foo; @@ -394,9 +396,9 @@ our $foo; our $foo; } EXPECT -"our" variable $foo redeclared at - line 7. +"our" variable $foo redeclared at - line 9. (Did you mean "local" instead of "our"?) -Name "Foo::foo" used only once: possible typo at - line 9. +Name "Foo::foo" used only once: possible typo at - line 11. ######## # Make sure the strict vars failure still occurs -- cgit v1.2.1