2 # soak: Test Devel::PPPort with multiple versions of Perl.
4 # Author: Paul Marquess
11 use ExtUtils::MakeMaker;
14 my $VERSION = "1.000";
19 # TODO -- determine what "make" program to run.
22 my $result = GetOptions(
23 "verbose" => \$verbose,
30 { @GoodPerls = @ARGV }
32 { @GoodPerls = FindPerls() }
35 foreach (@GoodPerls) {
37 if length $_ > $maxlen ;
41 # run each through the test harness
47 # prime the pump, so the first "make clean" will work.
48 runit("perl Makefile.PL") || die "Cannot run perl Makefile.PL\n" ;
50 foreach my $perl (@GoodPerls)
52 my $prefix = "$perl -- " if $verbose ;
53 print "Testing $perl " . ('.' x ($maxlen - length $perl)) ;
55 my $ok = runit("$MAKE clean") &&
56 runit("$perl Makefile.PL") &&
62 print "${prefix}ok\n";
66 print "${prefix}not ok\n" ;
71 print "\n\nPassed with $good of $total versions of Perl.\n\n";
77 # TODO -- portability alert!!
80 print "\n Running [$cmd]\n" if $verbose ;
81 my $output = `$cmd 2>&1` ;
82 $output = "\n" unless defined $output;
84 print "\n Output\n$output\n" if $verbose || $? ;
87 warn " Running '$cmd' failed: $?\n" ;
97 usage: soak [OPT] [perl...]
100 -m make - the name of the make program. Default "make"
109 # TODO -- need to decide how far back we go.
110 # TODO -- get list of user releases prior to 5.004
112 # find all version of Perl that are available
113 my @PerlBinaries = qw(
135 print "Searching for Perl binaries...\n" ;
138 my $mm = MM->new( { NAME => 'dummy' });
139 my @path = $mm->path();
141 # find_perl will send a warning to STDOUT if it can't find
142 # the requested perl, so need to temporarily silence STDOUT.
143 tie(*STDOUT, 'NoSTDOUT');
145 foreach my $perl (@PerlBinaries) {
146 if (my $abs = $mm->find_perl($perl, ["perl$perl"], [@path], 0)) {
147 push @GoodPerls, $abs ;
153 foreach (@GoodPerls) { print " $_\n" }
162 our @ISA = qw(Tie::Handle);