X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=69807fe3d89f61efb4bc807d0e80ae20b218441c;hb=846f8ad9245c0255623cc14decd7127450a7a765;hp=c3fd652c56309cf5634fe0e715e632aa568c5b63;hpb=e3aa160d9207c554c5ac9882a9a78ed9e2da3cc9;p=gitmo%2FMoo.git diff --git a/Makefile.PL b/Makefile.PL index c3fd652..69807fe 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,6 +2,8 @@ use strict; use warnings FATAL => 'all'; use 5.008001; use ExtUtils::MakeMaker; + +check_conflicts(); (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; my %BUILD_DEPS = (); @@ -16,7 +18,7 @@ my %RUN_DEPS = ( 'strictures' => 1.004003, 'Module::Runtime' => 0.012, 'Role::Tiny' => 1.002004, - 'Devel::GlobalDestruction' => 0.09, + 'Devel::GlobalDestruction' => 0.11, ); # have to do this since old EUMM dev releases miss the eval $VERSION line @@ -43,10 +45,14 @@ my %extra_info = ( WriteMakefile( NAME => 'Moo', VERSION_FROM => 'lib/Moo.pm', + CONFIGURE_REQUIRES => { + 'Dist::CheckConflicts' => '0.02', + }, PREREQ_PM => { %RUN_DEPS, ($] >= 5.010 ? () : ('MRO::Compat' => 0)), ($mymeta_works ? () : (%BUILD_DEPS)), + 'Dist::CheckConflicts' => '0.02', }, ($mymeta_works ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong @@ -66,9 +72,49 @@ WriteMakefile( META_MERGE => { no_index => { directory => [ 'xt' ] - } + }, + x_breaks => { + # enter conflicting data here, *and* in Moo::Conflicts + 'HTML::Restrict' => '2.1.5', + }, }, ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), LICENSE => 'perl', + 'EXE_FILES' => [ + 'bin/moo-outdated', + ], ); + +# copied from Moose-2.0801/Makefile.PL +sub check_conflicts { + if ( eval { require 'lib/Moo/Conflicts.pm'; 1; } ) { + if ( eval { Moo::Conflicts->check_conflicts; 1 } ) { + return; + } + else { + my $err = $@; + $err =~ s/^/ /mg; + warn "***\n$err***\n"; + } + } + else { + print <<'EOF'; +*** + Your toolchain doesn't support configure_requires, so + Dist::CheckConflicts hasn't been installed yet. You should check for + conflicting modules manually using the 'moo-outdated' script that is + installed with this distribution once the installation finishes. +*** +EOF + } + + return if $ENV{AUTOMATED_TESTING} || $ENV{NONINTERACTIVE_TESTING}; + + # 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; +} +