11 use Moose::Util::TypeConstraints;
14 type MyRef => where { ref($_) };
16 ::ok( !$@, '... successfully exported &type to Foo package' );
19 subtype MyArrayRef => as MyRef => where { ref($_) eq 'ARRAY' };
21 ::ok( !$@, '... successfully exported &subtype to Foo package' );
23 Moose::Util::TypeConstraints->export_type_constraints_as_functions();
25 ::ok( MyRef( {} ), '... Ref worked correctly' );
26 ::ok( MyArrayRef( [] ), '... ArrayRef worked correctly' );