From: Florian Ragwitz Date: Fri, 3 Jul 2009 23:31:45 +0000 (+0000) Subject: Merge branch 'check_conflicts' X-Git-Tag: 5.80025~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=f4c1afd4d4a0d0df15f750eaba9ea141c56409a2;hp=f913be31f216eecb9f104573e20daf96f5cdedf1 Merge branch 'check_conflicts' check_conflicts: Port to Module::Install::CheckConflicts. Create branch check_conflicts Conflicts: Makefile.PL --- diff --git a/Makefile.PL b/Makefile.PL index 1162175..4068be1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -93,7 +93,7 @@ print <<"EOF"; perl -MCPANPLUS -e 'install Catalyst::Devel' # or perl -MCPAN -e 'install Catalyst::Devel' - To get some commonly used plugins, as well as the TT view and DBIC + To get some commonly used plugins, as well as the TT view and DBIC model, install Task::Catalyst in the same way. Have fun! @@ -146,43 +146,3 @@ sub darwin_check_no_resource_forks { ' echo "to avoid getting resource forks in your dist."; exit 255; fi' }); } } - -sub check_conflicts { - my %conflicts = @_; - - my %conflicts_found; - for my $mod ( sort keys %conflicts ) { - eval "require($mod)"; - next if $@; - - my $installed = $mod->VERSION(); - $conflicts_found{$mod} = $installed if ( $installed le $conflicts{$mod} ); - } - - return unless scalar keys %conflicts_found; - - print <<"EOF"; - - WARNING: - - This version of Catalyst conflicts with the versions of - some components you have installed. - - You will need to upgrade these modules after installing - this version of Catalyst. - - List of the conflicting components and their installed versions: - -EOF - - foreach my $mod (keys %conflicts_found) { - print sprintf(" %s => %s\n", $mod, $conflicts_found{$mod}); - } - print "\n"; - - # More or less copied from Module::Build, via Moose - return if $ENV{PERL_MM_USE_DEFAULT}; - return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); - - sleep 4; -}