MOAR workarounds - freeze CMM at a usable version
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 30_before_script.bash
index acb4880..a2df851 100755 (executable)
@@ -42,15 +42,28 @@ if [[ "$CLEANTEST" = "true" ]]; then
   # So instead we still use our stock (possibly old) CPAN, and add some
   # handholding
   if ! CPAN_is_sane ; then
-    for m in B/BI/BINGOS/ExtUtils-MakeMaker-6.72.tar.gz ExtUtils::CBuilder R/RS/RSAVAGE/Tree-DAG_Node-1.13.tgz Module::Build ; do
+    for m in \
+ExtUtils::MakeMaker \
+ExtUtils::CBuilder \
+R/RS/RSAVAGE/Tree-DAG_Node-1.13.tgz \
+Module::Build \
+E/ET/ETHER/Class-Method-Modifiers-2.04.tar.gz \
+; do
       run_or_err "Pre-installing $m" "cpan $m"
+      if ! perl -e '
+
+eval ( q{require } . (
+  $ARGV[0] =~ m{ \/ .*? ([^\/]+) $ }x
+    ? do { my @p = split (/\-/, $1); pop @p; join "::", @p }
+    : $ARGV[0]
+) ) or ( print $@ and exit 1)' "$m" 2> /dev/null ; then
+
+        echo_err -e "$m installation failed\n$LASTOUT"
+        exit 1
+      fi
     done
   fi
 
-  if ! perl -MModule::Build -e 1 &> /dev/null ; then
-    echo_err -e "Module::Build installation failed\n$LASTOUT"
-    exit 1
-  fi
 
   # DBI has by far the longest test runtime - run less tests
   # FIXME horrible horrible hack, need to implement in DBI itself
@@ -71,7 +84,7 @@ else
   # (e.g. once Carp is upgraded there's no more Carp::Heavy,
   # while a File::Path upgrade may cause a parallel EUMM run to fail)
   #
-  parallel_installdeps_notest B/BI/BINGOS/ExtUtils-MakeMaker-6.72.tar.gz
+  parallel_installdeps_notest ExtUtils::MakeMaker
   parallel_installdeps_notest File::Path
   parallel_installdeps_notest Carp
   parallel_installdeps_notest Module::Build ExtUtils::Depends