X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=d037924d5565e7faba59de2a1e7b04eb4ec8daf8;hb=6eb44fdcf15a451a04eda083d889cd2c2a4f0868;hp=c0af551634df3b7064422745a5cb6189303062f5;hpb=3f3e009e602ec89c1f724e3fabef114ddf68e6d3;p=gitmo%2FClass-MOP.git diff --git a/Makefile.PL b/Makefile.PL index c0af551..d037924 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,7 @@ use strict; use warnings; use inc::Module::Install; +use Module::Install::ExtraTests; use 5.008001; check_conflicts(); @@ -10,12 +11,6 @@ perl_version '5.008001'; all_from 'lib/Class/MOP.pm'; license 'perl'; -my %conflicts = ( - 'Moose' => '1.04', -); - -check_conflicts(%conflicts); - require Config; my $ccflags = ( $Config::Config{ccflags} || '' ) . ' -I.'; @@ -38,6 +33,7 @@ requires 'Task::Weaken'; test_requires 'File::Spec'; test_requires 'Test::More' => '0.88'; test_requires 'Test::Exception' => '0.27'; +test_requires 'Test::Requires' => '0.05'; repository 'git://git.moose.perl.org/Class-MOP.git'; add_metadata(x_authority => 'cpan:STEVAN'); @@ -77,6 +73,48 @@ EOM 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 = ( + 'Moose' => '1.04', + 'namespace::autoclean' => '0.08', + ); + + 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 Class::MOP conflicts with the version of + $mod ($installed) you have installed. + + You will need to upgrade $mod after installing + this version of Class::MOP. +*** + +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; +} + package MY; use Config;