Integrate mainline
[p5sagit/p5-mst-13.2.git] / t / pragma / strict-vars
index d0e82c4..40b5557 100644 (file)
@@ -55,7 +55,7 @@ Execution of - aborted due to compilation errors.
 
 # strict vars - error
 use strict 'vars' ;
-$fred ;
+<$fred> ;
 EXPECT
 Global symbol "$fred" requires explicit package name at - line 4.
 Execution of - aborted due to compilation errors.
@@ -385,6 +385,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;
@@ -392,6 +394,17 @@ our $foo;
     our $foo;
 }
 EXPECT
-"our" variable $foo redeclared at - line 7.
-(Did you mean "local" instead of "our"?)
-Name "Foo::foo" used only once: possible typo at - line 9.
+"our" variable $foo redeclared at - line 9.
+       (Did you mean "local" instead of "our"?)
+Name "Foo::foo" used only once: possible typo at - line 11.
+########
+
+# Make sure the strict vars failure still occurs
+# now that the `@i should be written as \@i' failure does not occur
+# 20000522 mjd@plover.com (MJD)
+use strict 'vars';
+no warnings;
+"@i_like_crackers";
+EXPECT
+Global symbol "@i_like_crackers" requires explicit package name at - line 7.
+Execution of - aborted due to compilation errors.