X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=f0756cda07229b5b0638e489e2d9517f086a7b19;hb=dfa11004a2d5ffded0323bb85317ed444a90d2ac;hp=6cb56b56bf8b7cc1bbadfc333acc184a9b82ea5f;hpb=7b0e66e77f4d8ecd63286b323fcfaf92dc2fdc3b;p=gitmo%2FMoose.git diff --git a/Makefile.PL b/Makefile.PL index 6cb56b5..f0756cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,73 +1,35 @@ use strict; use warnings; -use inc::Module::Install; -check_conflicts(); - -name 'Moose'; -all_from 'lib/Moose.pm'; -license 'perl'; - -# prereqs -requires 'perl' => '5.008'; -requires 'Scalar::Util' => '1.19'; -requires 'Carp'; -requires 'Class::MOP' => '0.74'; -requires 'List::MoreUtils' => '0.12'; -requires 'Sub::Exporter' => '0.972'; -requires 'Task::Weaken' => '0'; - -# only used by oose.pm, not Moose.pm :P -requires 'Filter::Simple' => '0'; - -# things the tests need -build_requires 'Test::More' => '0.77'; -build_requires 'Test::Exception' => '0.21'; -build_requires 'Test::LongString'; - -tests_recursive(); - -WriteAll(); - -# Use the cpan-smolder-stable script in the Moose svn root to figure -# out what on CPAN will break with the latest Moose, then update this -# before a release. -sub check_conflicts { - my %conflicts = ( - 'MooseX::Singleton' => '0.12', - 'MooseX::Params::Validate' => '0.05', - 'Fey::ORM' => '0.12', - ); - - my $found = 0; - for my $mod ( sort keys %conflicts ) { - eval "require $mod"; - next if $@; - - my $installed = $mod->VERSION(); - if ( $installed le $conflicts{$mod} ) { - - print <<"EOF"; +BEGIN { + eval { require ExtUtils::MakeMaker::Dist::Zilla::Develop }; + if ($@) { + warn + "You need to install ExtUtils::MakeMaker::Dist::Zilla::Develop to run this Makefile.PL\n"; + exit 1; + } -*** - This version of Moose conflicts with the version of - $mod ($installed) you have installed. + eval { require Test::Inline }; + if ($@) { + warn "You need to install Test::Inline to run this Makefile.PL\n"; + exit 1; + } - You will need to upgrade $mod after installing - this version of Moose. -*** + ExtUtils::MakeMaker::Dist::Zilla::Develop->import(); +} -EOF +use lib 'inc'; - $found = 1; - } - } +use MMHelper; +use MyInline; - return unless $found; +system( $^X, 'author/extract-inline-tests', '--quiet' ); - # More or less copied from Module::Build - return if $ENV{PERL_MM_USE_DEFAULT}; - return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); +eval MMHelper::my_package_subs(); - sleep 4; -} +WriteMakefile( + NAME => 'Moose', + test => { TESTS => 't/*.t t/*/*.t' }, + CCFLAGS => MMHelper::ccflags_static('dev'), + MMHelper::mm_args(), +);