3 use inc::Module::Install;
6 use Module::Install::XSUtil 0.17;
8 system($^X, 'author/generate-mouse-tiny.pl', 'lib/Mouse/Tiny.pm') == 0
9 or warn "Cannot generate Mouse::Tiny: $!";
12 all_from 'lib/Mouse.pm';
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_deps 'Test::Exception'; # work around 0.27_0x (its use of diehook might be wrong)
24 recommends 'MRO::Compat' if $] < 5.010;
26 require 'lib/Mouse/Spec.pm'; # for the version
28 if(Mouse::Spec->MouseVersion =~ /_/){ # DEVEL RELEASE
29 require Carp::Always; Carp::Always->import();
30 include_deps 'Carp::Always';
36 /^--pp$/ and $use_xs = 0;
37 /^--xs$/ and $use_xs = 1;
45 $use_xs = cc_available();
49 print "Mouse configured with XS.\n",
50 "NOTE: You can try --pp option to configure Mouse with Pure Perl.\n";
54 cc_src_paths('xs-src');
57 print "Mouse configured with Pure Perl.\n";
60 if (author_context()) {
61 my $require_version = Mouse::Spec->MooseVersion;
63 if (eval { require Moose; Moose->VERSION($require_version) }) {
64 if (eval { require Module::Install::AuthorTests }) {
65 do 'author/create-moose-compatibility-tests.pl';
66 recursive_author_tests('xt');
68 print "you don't have a M::I::AuthorTests.\n";
71 print "you don't have Moose $require_version. skipping moose compatibility test\n";
76 # see also ExtUtils::MM_Any::test_via_harness()
77 my $test_via_harness = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
78 .q{ "do 'author/force-pp.pl'; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
79 .q{ $(TEST_FILES)} . "\n";
81 postamble qq{test_dynamic :: test_pp\n\n}
82 . qq{test_pp :: pure_all\n}
83 . qq{\t} . $test_via_harness;
87 tests 't/*.t t/*/*.t';
89 clean_files 'lib/Mouse/Tiny.pm $(O_FILES)';
91 WriteAll check_nmake => 0;