1 BEGIN{ $INC{'Module/Install/ExtraTests.pm'} = __FILE__ } # to disable the use of ExtrTests
4 use inc::Module::Install;
6 system($^X, 'author/generate-mouse-tiny.pl', 'lib/Mouse/Tiny.pm') == 0
7 or warn "Cannot generate Mouse::Tiny: $!";
10 all_from 'lib/Mouse.pm';
12 tests 't/*.t t/*/*.t';
14 # Scalar::Util < 1.14 has a bug.
15 # > Fixed looks_like_number(undef) to return false for perl >= 5.009002
16 requires 'Scalar::Util' => 1.14;
18 test_requires 'Test::More' => 0.88;
19 test_requires 'Test::Exception' => 0.27;
20 # test_requires 'Test::Output' => 0.16; # too many dependencies!
22 include 'Test::Exception'; # work around 0.27_0x (its use of diehook might be wrong)
24 recommends 'MRO::Compat' if $] < 5.010;
29 /^--pp$/ and $use_xs = 0;
30 /^--xs$/ and $use_xs = 1;
38 configure_requires 'ExtUtils::CBuilder';
39 require ExtUtils::CBuilder;
40 $use_xs = ExtUtils::CBuilder->new(quiet => 1)->have_compiler();
44 require Module::Install::XSUtil;
47 cc_src_paths('xs-src');
49 print "Mouse configured in XS (--xs)\n";
52 print "Mouse configured in Pure Perl (--pp)\n";
55 if (author_context()) {
56 local @INC = ('lib', @INC);
57 require 'lib/Mouse/Spec.pm';
58 my $require_version = Mouse::Spec->MooseVersion;
60 if (eval{ require Moose; Moose->VERSION($require_version) }) {
61 if (eval 'use Module::Install::AuthorTests; 1') {
62 do 'author/create-moose-compatibility-tests.pl';
63 recursive_author_tests('xt');
65 print "you don't have a M::I::AuthorTests.\n";
68 print "you don't have Moose $require_version. skipping moose compatibility test\n";
73 # see also ExtUtils::MM_Any::test_via_harness()
74 my $test_via_harness = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
75 .q{ "do 'author/force-pp.pl'; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
76 .q{ $(TEST_FILES)} . "\n";
78 postamble qq{test_dynamic :: test_pp\n\n}
79 . qq{test_pp :: pure_all\n}
80 . qq{\t} . $test_via_harness;
84 clean_files 'lib/Mouse/Tiny.pm';
86 WriteAll check_nmake => 0;