Re: [perl #41071] require stringifies code references in tied @INC
[p5sagit/p5-mst-13.2.git] / t / op / attrs.t
index 10e2c24..7b20210 100644 (file)
@@ -1,7 +1,9 @@
-#!./perl -w
+#!./perl
 
 # Regression tests for attributes.pm and the C< : attrs> syntax.
 
+use warnings;
+
 BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
@@ -81,6 +83,10 @@ like $@, qr/^SCALAR package attribute may clash with future reserved word: ["']?
 eval 'my A $x : plugh plover;';
 like $@, qr/^SCALAR package attributes may clash with future reserved words: ["']?plugh["']? /;
 
+no warnings 'reserved';
+eval 'my A $x : plugh;';
+is $@, '';
+
 eval 'package Cat; my Cat @socks;';
 like $@, qr/^Can't declare class for non-scalar \@socks in "my"/;
 
@@ -147,9 +153,9 @@ eval_ok '
 
 # bug #15898
 eval 'our ${""} : foo = 1';
-like $@, qr/Can't declare scalar dereference in our/;
+like $@, qr/Can't declare scalar dereference in "our"/;
 eval 'my $$foo : bar = 1';
-like $@, qr/Can't declare scalar dereference in my/;
+like $@, qr/Can't declare scalar dereference in "my"/;
 
 
 my @code = qw(lvalue locked method);