X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=Makefile.PL;h=4ea6d0d8cbf8870c7f82b973503f33c193efaf36;hp=9cf0e8e64d755bcb81c16f3ae0ba685f17727110;hb=64d969197ee915ca489db95a9ceac4b91a9078ea;hpb=54bee50ff7b3e30e2c370eb6249e021229cb9c6b diff --git a/Makefile.PL b/Makefile.PL index 9cf0e8e..4ea6d0d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -119,3 +119,44 @@ print <<"EOF"; Have fun! EOF + +check_conflicts(); + +# Nicked straight from Moose! +sub check_conflicts { + my %conflicts = ( + 'Catalyst::Plugin::Authentication' => '0.100092', + ); + + 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; +}