From 7f73a9f140198d1b3d1c2f2b62d4fd14dc5667c3 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 19 Jul 2005 14:12:38 +0000 Subject: Extend the the "our variable redeclared" warning to the case: our $x; our $x; and add more tests p4raw-id: //depot/perl@25187 --- t/lib/strict/vars | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't/lib/strict') diff --git a/t/lib/strict/vars b/t/lib/strict/vars index 06d9e0059e..16deab9837 100644 --- a/t/lib/strict/vars +++ b/t/lib/strict/vars @@ -372,14 +372,14 @@ EXPECT 20 ######## -# multiple our declarations in same scope, same package, no warning +# multiple our declarations in same scope, same package, warning use strict 'vars'; use warnings; our $foo; ${foo} = 10; our $foo; EXPECT - +"our" variable $foo redeclared at - line 7. ######## # multiple our declarations in same scope, same package, warning @@ -389,6 +389,7 @@ use warnings; { our $x = 0 } our $foo; { + our $foo; our $foo; package Foo; our $foo; @@ -396,6 +397,7 @@ our $foo; EXPECT "our" variable $foo redeclared at - line 9. (Did you mean "local" instead of "our"?) +"our" variable $foo redeclared at - line 10. ######## --FILE-- abc -- cgit v1.2.1