X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F800_shikabased%2F010-isa-or.t;h=0991ab753f240d15e7e71529f85848a853f39a4a;hb=3fa6f35df998618abdf763f4e4a060ba8f450a35;hp=8b45921af06336642d906c660dec052f6c6f00a9;hpb=0d9fea2202e3abf87e59f693afab640548faeef5;p=gitmo%2FMouse.git diff --git a/t/800_shikabased/010-isa-or.t b/t/800_shikabased/010-isa-or.t index 8b45921..0991ab7 100644 --- a/t/800_shikabased/010-isa-or.t +++ b/t/800_shikabased/010-isa-or.t @@ -6,7 +6,7 @@ use Test::More tests => 18; package Foo; use Mouse; use Mouse::Util::TypeConstraints; - subtype Baz => where { defined($_) && $_ eq 'Baz' }; + type Baz => where { defined($_) && $_ eq 'Baz' }; coerce Baz => from 'ArrayRef', via { 'Baz' }; has 'bar' => ( is => 'rw', isa => 'Str | Baz | Undef', coerce => 1 ); } @@ -53,10 +53,10 @@ is $f->bar, undef, 'bar is undef'; use Mouse; use Mouse::Util::TypeConstraints; - subtype 'Type1' => where { defined($_) && $_ eq 'Name' }; + type 'Type1' => where { defined($_) && $_ eq 'Name' }; coerce 'Type1', from 'Str', via { 'Names' }; - subtype 'Type2' => where { defined($_) && $_ eq 'Group' }; + type 'Type2' => where { defined($_) && $_ eq 'Group' }; coerce 'Type2', from 'Str', via { 'Name' }; has 'foo' => ( is => 'rw', isa => 'Type1|Type2', coerce => 1 ); @@ -76,7 +76,7 @@ is $foo->foo, 'Name', 'foo is Name'; use Mouse; use Mouse::Util::TypeConstraints; - subtype 'Type3' => where { defined($_) && $_ eq 'Name' }; + type 'Type3' => where { defined($_) && $_ eq 'Name' }; coerce 'Type3', from 'CodeRef', via { 'Name' }; has 'foo' => ( is => 'rw', isa => 'Type3|KLASS|Undef', coerce => 1 );