6 use Test::More tests => 4;
12 use Moose::Util::TypeConstraints;
15 type MyRef => where { ref($_) };
17 ::ok( !$@, 'successfully exported &type to Foo package' );
20 subtype MyArrayRef => as MyRef => where { ref($_) eq 'ARRAY' };
22 ::ok( !$@, 'successfully exported &subtype to Foo package' );
24 Moose::Util::TypeConstraints->export_type_constraints_as_functions();
26 ::ok( MyRef( {} ), 'Ref worked correctly' );
27 ::ok( MyArrayRef( [] ), 'ArrayRef worked correctly' );