1 use inc::Module::Install;
4 all_from 'lib/Mouse.pm';
8 # Scalar::Util < 1.14 has a bug.
9 # > Fixed looks_like_number(undef) to return false for perl >= 5.009002
10 requires 'Scalar::Util' => 1.14;
12 build_requires 'Test::Exception';
13 build_requires 'Test::More';
15 if ($Module::Install::AUTHOR) {
16 if (eval "package foo; use Moose; 1;") {
17 if (eval 'use Module::Install::AuthorTests; 1') {
18 create_moose_compatibility_test();
19 recursive_author_tests('xt');
21 print "you don't have a M::I::AuthorTests.\n";
24 print "you don't have a moose. skipping moose compatibility test\n";
31 sub create_moose_compatibility_test {
33 Path::Class->import('file', 'dir');
35 # some test does not pass... currently skip it.
37 '016-trigger.t' => "trigger's argument is incompatble :(",
38 '020-load-class.t' => "&Moose::is_class_loaded doesn't exists",
39 '019-handles.t' => 'incompatible',
40 '025-more-isa.t' => 'Class::MOP::is_class_loaded is not compatible with Mouse::is_class_loaded',
41 '029-new.t' => 'Class->new(undef) incompatible',
42 '010-isa-or.t' => 'Mouse has a [BUG]',
43 '044-attribute-metaclass.t' => 'Moose::Meta::Attribute does not have a "create"',
44 '047-attribute-metaclass-role.t' => 'Moose::Meta::Attribute does not have a "create"',
45 '201-squirrel.t' => 'skip Squirrel',
46 '202-squirrel-role.t' => 'Squirrel is ...',
47 '400-define-role.t' => 'incompatibility',
48 '600-tiny-tiny.t' => "Moose doesn't support ::Tiny",
49 '601-tiny-mouse.t' => "Moose doesn't support ::Tiny",
50 '602-mouse-tiny.t' => "Moose doesn't support ::Tiny",
51 '031_roles_applied_in_create.t' => 'wtf?',
58 return if $f =~ /\.sw[po]$/;
59 return if $SKIP_TEST{$f->basename};
61 my $dstfile = dir('xt', 'compatibility')->file($f);
62 $dstfile->dir->mkpath();
64 my $fh = $dstfile->openw();