Make C<undef ~~ 0> and C<undef ~~ ""> not match (like in 5.10.0)
[p5sagit/p5-mst-13.2.git] / t / op / attrs.t
index f124e8d..92b5b9e 100644 (file)
@@ -2,15 +2,19 @@
 
 # Regression tests for attributes.pm and the C< : attrs> syntax.
 
-use warnings;
-
 BEGIN {
+    if ($ENV{PERL_CORE_MINITEST}) {
+       print "1..0 # skip: miniperl can't load attributes\n";
+       exit 0;
+    }
     chdir 't' if -d 't';
     @INC = '../lib';
     require './test.pl';
 }
 
-plan 83;
+use warnings;
+
+plan 84;
 
 $SIG{__WARN__} = sub { die @_ };
 
@@ -82,7 +86,10 @@ eval 'my A $x : plugh;';
 is $@, '';
 
 eval 'package Cat; my Cat @socks;';
-like $@, qr/^Can't declare class for non-scalar \@socks in "my"/;
+like $@, '';
+
+eval 'my Cat %nap;';
+like $@, '';
 
 sub X::MODIFY_CODE_ATTRIBUTES { die "$_[0]" }
 sub X::foo { 1 }
@@ -149,14 +156,15 @@ like $@, qr/Can't declare scalar dereference in "my"/;
 
 
 my @code = qw(lvalue method);
-my @other = qw(shared unique);
-my @deprecated = qw(locked);
+my @other = qw(shared);
+my @deprecated = qw(locked unique);
 my %valid;
 $valid{CODE} = {map {$_ => 1} @code};
 $valid{SCALAR} = {map {$_ => 1} @other};
 $valid{ARRAY} = $valid{HASH} = $valid{SCALAR};
 my %deprecated;
 $deprecated{CODE} = { locked => 1 };
+$deprecated{ARRAY} = $deprecated{HASH} = $deprecated{SCALAR} = { unique => 1 };
 
 our ($scalar, @array, %hash);
 foreach my $value (\&foo, \$scalar, \@array, \%hash) {