Add conflicting checks to Makefile.PL
gfx [Fri, 15 Jan 2010 06:01:05 +0000 (15:01 +0900)]
Makefile.PL

index 314ab75..6623628 100755 (executable)
@@ -25,6 +25,24 @@ if($] < 5.010) {
     recommends 'Class::C3';
 }
 
+my %suggests = (
+    'Class::Method::Modifiers::Fast' => 0.041,
+    'MouseX::AttributeHelpers'       => 0.06,
+);
+
+while(my($mod, $least) = each %suggests){
+    if(can_use($mod)){
+        if(!eval { $mod->VERSION($least) }){
+            my $ver = $mod->VERSION;
+            warn("\n",
+                "WARNING: $mod is installed, but its version ($ver) is too old (< $least).\n",
+                "         Please update $mod after installation of Mouse.\n",
+                "\n"
+            );
+        }
+    }
+}
+
 require 'lib/Mouse/Spec.pm'; # for the version
 
 #if(Mouse::Spec->MouseVersion =~ /_/){ # DEVEL RELEASE