X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=36093c161ac0acf397e42486d2d3714695450d0b;hb=d2bda7a771a59fe37149c47c3234a1d43502dff1;hp=724374bde47ca14adab8ae1162adf807b0b3c4d0;hpb=87f55e332bbf7d977b22ce000fe0f669991bcef4;p=gitmo%2FMoose.git diff --git a/Makefile.PL b/Makefile.PL index 724374b..36093c1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,78 +1,20 @@ use strict; use warnings; -use inc::Module::Install; -use 5.008001; -check_conflicts(); +use ExtUtils::MakeMaker::Dist::Zilla::Develop; -name 'Moose'; -perl_version '5.008001'; -all_from 'lib/Moose.pm'; -license 'perl'; +use lib 'inc'; -requires 'Carp'; -requires 'Class::MOP' => '0.92_01'; -requires 'Data::OptList' => '0'; -requires 'List::MoreUtils' => '0.12'; -requires 'Scalar::Util' => '1.19'; -requires 'Sub::Exporter' => '0.980'; -requires 'Sub::Name' => '0'; -requires 'Task::Weaken' => '0'; -requires 'Try::Tiny' => '0.02'; +use MMHelper; +use MyInline; -test_requires 'Test::More' => '0.88'; -test_requires 'Test::Exception' => '0.27'; +system( $^X, 'author/extract-inline-tests', '--quiet' ); -if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) { - system( $^X, 'author/extract-inline-tests' ); -} +eval MMHelper::my_package_subs(); -extra_tests(); -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::ClassAttribute' => '0.09', - 'MooseX::Singleton' => '0.19', - 'MooseX::StrictConstructor' => '0.07', - 'MooseX::Params::Validate' => '0.05', - 'Fey::ORM' => '0.23', - ); - - 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"; - -*** - This version of Moose conflicts with the version of - $mod ($installed) you have installed. - - You will need to upgrade $mod after installing - this version of Moose. -*** - -EOF - - $found = 1; - } - } - - return unless $found; - - # More or less copied from Module::Build - return if $ENV{PERL_MM_USE_DEFAULT}; - return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); - - sleep 4; -} +WriteMakefile( + NAME => 'Moose', + test => { TESTS => 't/*.t t/*/*.t' }, + CCFLAGS => MMHelper::ccflags_static('dev'), + MMHelper::mm_args(), +);