X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=b014ca941d6bb22e0fb14318558cb68d9d59247c;hb=1451ea2d5301f3691432c3ae1296f51153afac18;hp=9cf0e8e64d755bcb81c16f3ae0ba685f17727110;hpb=edb20ed3aaf578b6784f7e0a52ed8c00f05f2718;p=catagits%2FCatalyst-Runtime.git diff --git a/Makefile.PL b/Makefile.PL index 9cf0e8e..b014ca9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -35,6 +35,7 @@ requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness requires 'MRO::Compat'; test_requires 'Class::Data::Inheritable'; +test_requires 'Test::MockObject'; if ( ( exists $ENV{AGGREGATE_TESTS} && !$ENV{AGGREGATE_TESTS}) || (!exists $ENV{AGGREGATE_TESTS} && !can_use('Test::Aggregate', '0.34_01'))) { @@ -119,3 +120,48 @@ print <<"EOF"; Have fun! EOF + +check_conflicts(); + +# Nicked straight from Moose! +sub check_conflicts { + my %conflicts = ( + 'Catalyst::Action::RenderView' => '0.08', + 'Catalyst::Plugin::DebugCookie' => '0.999002', + 'Catalyst::Plugin::Authentication' => '0.100092', + 'CatalystX::Imports' => '0.03', + 'Catalyst-Plugin-HashedCookies' => '1.03', + ); + + 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 Catalyst conflicts with the version of + $mod ($installed) you have installed. + + You will need to upgrade $mod after installing + this version of Catalyst. +*** + +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; +}