2 use warnings FATAL => 'all';
5 use MooseX::Types::Path::Class qw(Dir File);
6 use Moose::Util::TypeConstraints;
12 # check that Dir is a subtype of Path::Class::Dir, etc...
15 $tc = find_type_constraint(Dir);
16 isa_ok( $tc, 'Moose::Meta::TypeConstraint' );
17 ok( $tc->is_subtype_of('Path::Class::Dir'),
18 'Dir is subtype of Path::Class::Dir'
20 $tc = find_type_constraint(File);
21 isa_ok( $tc, 'Moose::Meta::TypeConstraint' );
22 ok( $tc->is_subtype_of('Path::Class::File'),
23 'File is subtype of Path::Class::File'