2 ################################################################################
4 # soak -- Test Devel::PPPort with multiple versions of Perl.
6 # Original Author: Paul Marquess
8 ################################################################################
12 # $Date: 2005/01/31 08:10:55 +0100 $
14 ################################################################################
16 # Version 3.x, Copyright (C) 2004-2005, Marcus Holland-Moritz.
17 # Version 2.x, Copyright (C) 2001, Paul Marquess.
18 # Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
20 # This program is free software; you can redistribute it and/or
21 # modify it under the same terms as Perl itself.
23 ################################################################################
29 use ExtUtils::MakeMaker;
32 my $VERSION = "1.000";
37 # TODO -- determine what "make" program to run.
40 my $result = GetOptions(
41 "verbose" => \$verbose,
48 { @GoodPerls = @ARGV }
50 { @GoodPerls = FindPerls() }
53 foreach (@GoodPerls) {
55 if length $_ > $maxlen ;
59 # run each through the test harness
65 # prime the pump, so the first "make realclean" will work.
66 runit("perl Makefile.PL") || die "Cannot run perl Makefile.PL\n" ;
68 foreach my $perl (@GoodPerls)
70 my $prefix = $verbose ? "$perl -- " : '';
71 print "Testing $perl " . ('.' x ($maxlen - length $perl)) ;
73 my $ok = runit("$MAKE realclean") &&
74 runit("$perl Makefile.PL") &&
75 # runit("$perl Makefile.PL --with-apicheck") &&
81 print "${prefix}ok\n";
85 print "${prefix}not ok\n" ;
90 print "\n\nPassed with $good of $total versions of Perl.\n\n";
96 # TODO -- portability alert!!
99 print "\n Running [$cmd]\n" if $verbose ;
100 my $output = `$cmd 2>&1` ;
101 $output = "\n" unless defined $output;
103 print "\n Output\n$output\n" if $verbose || $? ;
106 warn " Running '$cmd' failed: $?\n" ;
116 usage: soak [OPT] [perl...]
119 -m make - the name of the make program. Default "make"
128 # TODO -- need to decide how far back we go.
129 # TODO -- get list of user releases prior to 5.004
131 # find all version of Perl that are available
132 my @PerlBinaries = qw(
154 print "Searching for Perl binaries...\n" ;
157 my $mm = MM->new( { NAME => 'dummy' });
158 my @path = $mm->path();
160 # find_perl will send a warning to STDOUT if it can't find
161 # the requested perl, so need to temporarily silence STDOUT.
162 tie(*STDOUT, 'NoSTDOUT');
164 foreach my $perl (@PerlBinaries) {
165 if (my $abs = $mm->find_perl($perl, ["perl$perl"], [@path], 0)) {
166 push @GoodPerls, $abs ;
172 foreach (@GoodPerls) { print " $_\n" }
181 our @ISA = qw(Tie::Handle);