X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=Makefile.PL;fp=Makefile.PL;h=dff623f0534edeeb98839f0530d7eb982eb52ef0;hp=cc7b77e263c2b589c447ed7dcf674a61506b62ae;hb=f47ebad05fd22958e781dd9e5a9db2ce1eaf9c6c;hpb=0001057938c23a77b0bb6879974c385d613e76cf diff --git a/Makefile.PL b/Makefile.PL index cc7b77e..dff623f 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,7 +13,6 @@ use inc::Module::Install 0.99; # for co-developpers use Module::Install::XSUtil 0.24; use Module::Install::AuthorTests; -use Module::Install::TestAssemble; system($^X, 'tool/generate-mouse-tiny.pl', 'lib/Mouse/Tiny.pm') == 0 or warn "Cannot generate Mouse::Tiny: $!"; @@ -86,27 +85,39 @@ repository 'git://git.moose.perl.org/Mouse.git'; clean_files 'lib/Mouse/Tiny.pm $(O_FILES) test-mydeps-*.log'; -if ($Module::Install::AUTHOR) { +if (author_context()) { my $require_version = Mouse::Spec->MooseVersion; if (eval { require Moose; Moose->VERSION($require_version) }) { print "You have Moose ", Moose->VERSION, ".\n"; - do 'tool/create-moose-compatibility-tests.pl'; - test_assemble - tests => ['xt/compatibility/t/*/*.t'], - target => 'test', - alias => 'test_moose', - ; + if (eval { require Module::Install::AuthorTests }) { + do 'tool/create-moose-compatibility-tests.pl'; + # repeat testing + # see also ExtUtils::MM_Any::test_via_harness() + my $t_moose = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e} + .q{ "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"} + .q{ xt/compatibility/t/*/*.t } . "\n"; + + postamble qq{test_dynamic :: test_moose\n\n} + . qq{test_moose :: pure_all\n} + . qq{\t} . $t_moose; + } else { + print "You don't have a M::I::AuthorTests.\n"; + } } else { print "You don't have Moose $require_version. skipping moose compatibility test\n"; } if($use_xs){ - test_assemble - env => { PERL_ONLY => 1 }, - target => 'test', - alias => 'test_pp', - ; + # repeat testing + # see also ExtUtils::MM_Any::test_via_harness() + my $t_pp = q{$(FULLPERLRUN) -MExtUtils::Command::MM -e} + .q{ "do 'tool/force-pp.pl'; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')"} + .q{ $(TEST_FILES)} . "\n"; + + postamble qq{test_dynamic :: test_pp\n\n} + . qq{test_pp :: pure_all\n} + . qq{\t} . $t_pp; } }