3 use inc::Module::Install;
6 use Module::Install::XSUtil 0.21;
8 system($^X, 'tool/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.29;
20 # test_requires 'Test::Output' => 0.16; # too many dependencies!
23 recommends 'Class::C3';
27 'Class::Method::Modifiers::Fast' => 0.041,
28 'MouseX::AttributeHelpers' => 0.06,
31 while(my($mod, $least) = each %suggests){
33 if(!eval { $mod->VERSION($least) }){
34 my $ver = $mod->VERSION;
36 "WARNING: $mod is installed, but its version ($ver) is too old (< $least).\n",
37 " Please update $mod after installation of Mouse.\n",
44 require 'lib/Mouse/Spec.pm'; # for the version
46 #if(Mouse::Spec->MouseVersion =~ /_/){ # DEVEL RELEASE
47 # require Carp::Always; Carp::Always->import();
48 # include_deps 'Carp::Always';
51 # cc_available recognizes the '--pp' and '--xs' options
52 my $use_xs = ($] >= 5.008_001 && cc_available());
55 print "Mouse configured with XS.\n",
56 "NOTE: You can try --pp option to configure Mouse with Pure Perl.\n";
60 cc_src_paths('xs-src');
63 print "Mouse configured with Pure Perl.\n";
67 tests 't/*.t t/*/*.t';
71 repository 'git://git.moose.perl.org/Mouse.git';
73 clean_files 'lib/Mouse/Tiny.pm $(O_FILES)';
76 if (author_context()) {
77 my $require_version = Mouse::Spec->MooseVersion;
79 if (eval { require Moose; Moose->VERSION($require_version) }) {
80 print "You have Moose ", Moose->VERSION, ".\n";
81 if (eval { require Module::Install::AuthorTests }) {
82 do 'tool/create-moose-compatibility-tests.pl';
84 # see also ExtUtils::MM_Any::test_via_harness()
85 my $t_moose = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
86 .q{ "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
87 .q{ xt/compatibility/t/*/*.t } . "\n";
89 postamble qq{test_dynamic :: test_moose\n\n}
90 . qq{test_moose :: pure_all\n}
93 print "You don't have a M::I::AuthorTests.\n";
96 print "You don't have Moose $require_version. skipping moose compatibility test\n";
101 # see also ExtUtils::MM_Any::test_via_harness()
102 my $t_pp = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e}
103 .q{ "do 'tool/force-pp.pl'; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"}
104 .q{ $(TEST_FILES)} . "\n";
106 postamble qq{test_dynamic :: test_pp\n\n}
107 . qq{test_pp :: pure_all\n}
113 WriteAll check_nmake => 0;