{
package Foo;
use Mouse;
- use Mouse::TypeRegistry;
+ use Mouse::Util::TypeConstraints;
subtype 'Type1' => as 'Str' => where { blessed($_) };
has str_obj => (
);
- subtype 'Type4';
+ type 'Type4';
has any => (
is => 'rw',
isa => 'Type4',
is ref($f2->as_only), 'Obj1';
my $f3 = eval { Foo->new( any => Obj1->new ) };
+die $@ if $@;
isa_ok $f3, 'Foo';
is ref($f3->any), 'Obj1';