X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=blobdiff_plain;f=Makefile.PL;h=f0756cda07229b5b0638e489e2d9517f086a7b19;hp=09db26ceb7493331f2b58b59e50d8999ce123efb;hb=48ac876af2c1991bd6cdba0d54b775a121e01725;hpb=29d20ec6cc4678b23bda30aac38b99519879269c diff --git a/Makefile.PL b/Makefile.PL index 09db26c..f0756cd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,114 +1,35 @@ use strict; use warnings; -use inc::Module::Install 0.95; -use Module::Install::AuthorRequires; -use 5.008001; -check_broken_extratests(); -check_conflicts(); - -name 'Moose'; -perl_version '5.008001'; -all_from 'lib/Moose.pm'; -license 'perl'; - -requires 'Carp'; -requires 'Class::MOP' => '1.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'; - -test_requires 'Test::More' => '0.88'; -test_requires 'Test::Exception' => '0.27'; - -author_requires 'Test::Inline'; -author_requires 'File::Find::Rule'; -author_requires 'Module::Info'; -author_requires 'Test::Spelling'; -author_requires 'Test::Pod::Coverage'; -author_requires 'Test::NoTabs'; - -if ( is_maintainer() ) { - system( $^X, 'author/extract-inline-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 = ( - 'Devel::REPL' => '1.003008', - 'Fey::ORM' => '0.23', - 'Catalyst' => '5.80017', - 'MooseX::Aliases' => '0.07', - 'MooseX::AttributeHelpers' => '0.22', - 'MooseX::Attribute::Prototype' => '0.10', - 'MooseX::ClassAttribute' => '0.09', - 'MooseX::MethodAttributes' => '0.18', - 'MooseX::NonMoose' => '0.05', - 'MooseX::Params::Validate' => '0.05', - 'MooseX::Role::Cmd' => '0.06', - 'MooseX::Role::WithOverloading' => '0.04', - 'MooseX::Singleton' => '0.19', - 'MooseX::StrictConstructor' => '0.07', - 'MooseX::Types' => '0.19', - 'namespace::autoclean' => '0.08', - 'KiokuDB' => '0.41', - ); - - 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 +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; + } - $found = 1; - } + eval { require Test::Inline }; + if ($@) { + warn "You need to install Test::Inline to run this Makefile.PL\n"; + exit 1; } - return unless $found; + ExtUtils::MakeMaker::Dist::Zilla::Develop->import(); +} - # More or less copied from Module::Build - return if $ENV{PERL_MM_USE_DEFAULT}; - return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); +use lib 'inc'; - sleep 4; -} +use MMHelper; +use MyInline; -sub is_maintainer { - return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER}; -} +system( $^X, 'author/extract-inline-tests', '--quiet' ); -sub check_broken_extratests { - return unless is_maintainer(); +eval MMHelper::my_package_subs(); - if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) { - print STDERR <<'EOR'; -You have a broken version of Module::Install::ExtraTests installed. -Please upgrade to version 0.007 or newer and re-run Makefile.PL -EOR - exit 0; - } -} +WriteMakefile( + NAME => 'Moose', + test => { TESTS => 't/*.t t/*/*.t' }, + CCFLAGS => MMHelper::ccflags_static('dev'), + MMHelper::mm_args(), +);