Re: [patch] GvSHARED
[p5sagit/p5-mst-13.2.git] / t / op / attrs.t
index e89c2cb..e8e11b3 100644 (file)
@@ -4,7 +4,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    @INC = '../lib';
 }
 
 sub NTESTS () ;
@@ -63,12 +63,12 @@ mytest;
 BEGIN {++$ntests}
 
 my $anon1;
-eval '$anon1 = sub ($) : locked,,method { $_[0]++ }';
+eval '$anon1 = sub ($) : locked:method { $_[0]++ }';
 mytest;
 BEGIN {++$ntests}
 
 my $anon2;
-eval '$anon2 = sub : locked , method { $_[0]++ }';
+eval '$anon2 = sub : locked : method { $_[0]++ }';
 mytest;
 BEGIN {++$ntests}
 
@@ -142,15 +142,20 @@ eval 'my A $x : plugh plover;';
 mytest qr/^SCALAR package attributes may clash with future reserved words: ["']?plugh["']? /;
 BEGIN {++$ntests}
 
+eval 'package Cat; my Cat @socks;';
+mytest qr/^Can't declare class for non-scalar \@socks in "my"/;
+BEGIN {++$ntests}
+
 sub X::MODIFY_CODE_ATTRIBUTES { die "$_[0]" }
 sub X::foo { 1 }
 *Y::bar = \&X::foo;
 *Y::bar = \&X::foo;    # second time for -w
-eval 'package Z; sub Y::bar : locked';
+eval 'package Z; sub Y::bar : foo';
 mytest qr/^X at /;
 BEGIN {++$ntests}
 
-my @attrs = eval 'attributes::get \&Y::bar';
+eval 'package Z; sub Y::baz : locked {}';
+my @attrs = eval 'attributes::get \&Y::baz';
 mytest '', "@attrs", "locked";
 BEGIN {++$ntests}