#!/usr/bin/env perl use strict; use warnings; my ($build_dir, $report_path, $perlbrew) = @ARGV; my $logfile; my $build_dispatch = { 'dist.ini' => sub { print "Found dist.ini, using Dist::Zilla\n"; my $cmd =<> $logfile 2>&1 cpanm --installdeps . >> $logfile 2>&1 HARNESS_VERBOSE=1 dzil test >> $logfile 2>&1 CMD }, 'Build.PL' => sub { print "Found Build.PL, using Build.PL\n"; my $cmd =<> $logfile 2>&1 # ./Build installdeps is not available in older Module::Build's cpanm --installdeps . >> $logfile 2>&1 # Run this again in case our Build is out of date (suboptimal) perl Build.PL >> $logfile 2>&1 HARNESS_VERBOSE=1 ./Build test --verbose >> $logfile 2>&1 CMD }, 'Makefile.PL' => sub { print "Found Makefile.PL\n"; my $cmd =<> $logfile 2>&1 cpanm --installdeps . >> $logfile 2>&1 HARNESS_VERBOSE=1 make test >> $logfile 2>&1 CMD }, 'setup.pir' => sub { print "Found setup.pir\n"; my $cmd =<> $logfile 2>&1 CMD }, 'setup.nqp' => sub { print "Found setup.nqp\n"; my $cmd =<> $logfile 2>&1 CMD }, 'Configure.pl' => sub { print "Found Configure.pl\n"; my $cmd =<> $logfile 2>&1 cpanm --installdeps . >> $logfile 2>&1 HARNESS_VERBOSE=1 make test >> $logfile 2>&1 CMD }, 'Makefile' => sub { print "Found a Makefile\n"; my $cmd =<> $logfile 2>&1 CMD }, 'Rakefile' => sub { print "Found a Rakefile\n"; my $cmd =<> $logfile 2>&1 CMD }, };