... and devrel 0.08249_03
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 12_authordeps.pl
index 3fd592c..152a390 100644 (file)
@@ -36,7 +36,7 @@ EOW
 
   # exclude the rdbms_* groups which are for DBIC users
   $opt_testdeps = {
-    map { %{$reqs_for_group{$_}} } grep { !/^rdbms_/ } keys %reqs_for_group
+    map { %{$reqs_for_group{$_}} } grep { !/^rdbms_|^dist_/ } keys %reqs_for_group
   };
 
   print "Including all optional deps\n";
@@ -94,6 +94,12 @@ END {
     Meta->write;
   }
 
+  # strip possible crlf from META
+  if ($^O eq 'MSWin32' or $^O eq 'cygwin') {
+    local $ENV{PERLIO} = 'unix';
+    system( $^X, qw( -MExtUtils::Command -e dos2unix -- META.yml),  );
+  }
+
   # test that we really took things away (just in case, happened twice somehow)
   if (! -f 'META.yml') {
     warn "No META.yml generated?! aborting...\n";
@@ -102,6 +108,12 @@ END {
   }
   my $meta = do { local @ARGV = 'META.yml'; local $/; <> };
 
+  $meta =~ /^\Qname: DBIx-Class\E$/m or do {
+    warn "Seemingly malformed META.yml...?\n";
+    unlink 'Makefile';
+    exit 1;
+  };
+
   # this is safe as there is a fatal check earlier in the main Makefile.PL
   # to make sure there are no duplicates (i.e. $opt_testdeps does not contain
   # any real dependencies)