3 if(grep{ $_ eq '--author' } @ARGV){
4 print "$^X -S cpanm < author/requires.cpanm\n";
5 system "$^X -S cpanm < author/requires.cpanm";
11 use inc::Module::Install 0.99;
14 use Module::Install::XSUtil 0.24;
15 use Module::Install::AuthorTests;
17 system($^X, 'tool/generate-mouse-tiny.pl', 'lib/Mouse/Tiny.pm') == 0
18 or warn "Cannot generate Mouse::Tiny: $!";
21 all_from 'lib/Mouse.pm';
23 # Scalar::Util < 1.14 has a bug.
24 # > Fixed looks_like_number(undef) to return false for perl >= 5.009002
25 requires 'Scalar::Util' => 1.14;
27 test_requires 'Test::More' => 0.88;
32 'MouseX::AttributeHelpers' => 0.06,
35 while(my($mod, $least) = each %suggests){
37 if(!eval { $mod->VERSION($least) }){
38 my $ver = $mod->VERSION;
40 "WARNING: $mod is installed, but its version ($ver) is too old (< $least).\n",
41 " Please update $mod after installation of Mouse.\n",
48 # cc_want deals with the '--pp' and '--xs' options
49 my $use_xs = ($] >= 5.008_001 && want_xs());
52 print "Mouse configured with XS.\n",
53 "NOTE: You can try --pp option to configure Mouse with Pure Perl.\n";
57 cc_src_paths('xs-src');
60 print "Mouse configured with Pure Perl.\n";
64 tests 't/*.t t/*/*.t';
67 repository 'git://git.moose.perl.org/Mouse.git';
69 if ($Module::Install::AUTHOR) {
70 require 'lib/Mouse/Spec.pm'; # for the version
71 my $require_version = Mouse::Spec->MooseVersion;
73 if (eval { require Moose; Moose->VERSION($require_version) }) {
74 print "You have Moose ", Moose->VERSION, ".\n";
75 if (eval { require Module::Install::AuthorTests }) {
76 do 'tool/create-moose-compatibility-tests.pl';
78 # see also ExtUtils::MM_Any::test_via_harness()
79 my $t_moose = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
80 .q{ "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
81 .q{ xt/compatibility/t/*/*.t } . "\n";
83 postamble qq{test_dynamic :: test_moose\n\n}
84 . qq{test_moose :: pure_all\n}
87 print "You don't have a M::I::AuthorTests.\n";
90 print "You don't have Moose $require_version. skipping moose compatibility test\n";
95 # see also ExtUtils::MM_Any::test_via_harness()
96 my $t_pp = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
97 .q{ "do 'tool/force-pp.pl'; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
98 .q{ $(TEST_FILES)} . "\n";
100 postamble qq{test_dynamic :: test_pp\n\n}
101 . qq{test_pp :: pure_all\n}
107 lib/Mouse/Tiny.pm $(O_FILES) test-mydeps-*.log
109 cover_db xs-src/*.gc{v,no,da}
112 WriteAll check_nmake => 0;