3 use inc::Module::Install;
5 system($^X, 'author/generate-mouse-tiny.pl', 'lib/Mouse/Tiny.pm') == 0
6 or warn "Cannot generate Mouse::Tiny: $!";
9 all_from 'lib/Mouse.pm';
11 tests 't/*.t t/*/*.t';
13 # Scalar::Util < 1.14 has a bug.
14 # > Fixed looks_like_number(undef) to return false for perl >= 5.009002
15 requires 'Scalar::Util' => 1.14;
17 configure_requires 'ExtUtils::CBuilder';
19 test_requires 'Test::More' => 0.88;
20 test_requires 'Test::Exception' => 0.27;
21 # test_requires 'Test::Output' => 0.16; # too many dependencies!
23 include_deps 'Test::Exception'; # work around 0.27_0x (its use of diehook might be wrong)
25 recommends 'MRO::Compat' if $] < 5.010;
27 require 'lib/Mouse/Spec.pm'; # for the version
29 if(Mouse::Spec->MouseVersion =~ /_/){ # DEVEL RELEASE
30 require Carp::Always; Carp::Always->import();
31 include_deps 'Carp::Always';
37 /^--pp$/ and $use_xs = 0;
38 /^--xs$/ and $use_xs = 1;
47 require ExtUtils::CBuilder;
48 ExtUtils::CBuilder->new(quiet => 1)->have_compiler();
53 print "Mouse configured with XS.\n",
54 "NOTE: You can try --pp option to configure Mouse with Pure Perl.\n";
57 require Module::Install::XSUtil;
58 Module::Install::XSUtil->VERSION(0.15); # for co-developpers
62 cc_src_paths('xs-src');
65 print "Mouse configured with Pure Perl.\n";
68 if (author_context()) {
69 my $require_version = Mouse::Spec->MooseVersion;
71 if (eval{ require Moose; Moose->VERSION($require_version) }) {
72 if (eval 'use Module::Install::AuthorTests; 1') {
73 do 'author/create-moose-compatibility-tests.pl';
74 recursive_author_tests('xt');
76 print "you don't have a M::I::AuthorTests.\n";
79 print "you don't have Moose $require_version. skipping moose compatibility test\n";
84 # see also ExtUtils::MM_Any::test_via_harness()
85 my $test_via_harness = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
86 .q{ "do 'author/force-pp.pl'; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
87 .q{ $(TEST_FILES)} . "\n";
89 postamble qq{test_dynamic :: test_pp\n\n}
90 . qq{test_pp :: pure_all\n}
91 . qq{\t} . $test_via_harness;
95 clean_files 'lib/Mouse/Tiny.pm $(O_FILES)';
97 WriteAll check_nmake => 0;