[Catalyst-commits] r9002 - Catalyst-Runtime/5.80/trunk
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sun Jan 4 10:58:08 GMT 2009
Author: t0m
Date: 2009-01-04 10:58:08 +0000 (Sun, 04 Jan 2009)
New Revision: 9002
Modified:
Catalyst-Runtime/5.80/trunk/Makefile.PL
Log:
Nick the related modules version warning from Moose
Modified: Catalyst-Runtime/5.80/trunk/Makefile.PL
===================================================================
--- Catalyst-Runtime/5.80/trunk/Makefile.PL 2009-01-04 10:51:33 UTC (rev 9001)
+++ Catalyst-Runtime/5.80/trunk/Makefile.PL 2009-01-04 10:58:08 UTC (rev 9002)
@@ -119,3 +119,44 @@
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;
+}
More information about the Catalyst-commits
mailing list