4 use ExtUtils::MakeMaker;
9 # TODO -- Get MM->new to output less MakeMaker progress guff
10 my $mm = MM->new( { NAME => 'dummy' });
12 # TODO -- determine what "make" program to run.
16 # TODO -- need to decide how far back we go.
18 # find all version of Perl that are available
19 my @PerlBinaries = qw(
37 print "Searching for Perl binaries...\n" ;
40 my @path = $mm->path();
41 foreach my $perl (@PerlBinaries) {
42 # TODO -- find_perl will send a warning to STDOUT if it can't find
43 # the requested perl, so need to temporarily close STDOUT.
45 if (my $abs = $mm->find_perl($perl, ["perl$perl"], [@path], 0)) {
46 push @GoodPerls, $abs ;
48 if length $abs > $maxlen ;
52 foreach (@GoodPerls) { print "$_\n" }
56 # run each through the test harness
62 # prime the pump, so the first "make clean" will work.
63 runit("perl Makefile.PL") || die "Cannot run perl Makefile.PL\n" ;
65 foreach my $perl (@GoodPerls)
67 my $prefix = "$perl -- " if $verbose ;
68 print "Testing $perl " . ('.' x ($maxlen - length $perl)) ;
70 my $ok = runit("$MAKE clean") &&
71 runit("$perl Makefile.PL") &&
77 print "${prefix}ok\n";
81 print "${prefix}not ok\n" ;
86 print "\n\nPassed with $good of $total versions of Perl.\n";
92 # TODO -- portability alert!!
95 print "\n Running [$cmd]\n" if $verbose ;
96 my $file = "/tmp/abc.$$" ;
98 my $output = `$cmd 2>&1` ;
100 print " Output\n$output\n" if $verbose || $? ;
103 return 0 unless $verbose ;
104 warn " $cmd failed: $?\n" ;