http://svn.perl.org/modules/Test-Harness/trunk/bin/testall

#!/usr/bin/perl -w

use warnings;
use strict;

# This isn't meant to be installed, just used by the maintainer.

my @vers = qw(
    5.004_05
    5.005_03
    5.6.0 5.6.1 5.6.2
    5.8.0 5.8.1 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8
    5.9.1 5.9.2 5.9.3
);
@vers = ( @vers, shuffle( @vers ) );

for my $perlver ( @vers ) {
    my $bin = "perl";
    $bin .= $perlver if $perlver ge "5.9.1";
    my $perl = "/var/perl/$perlver/bin/$bin";

    warn "\n\n\n# Testing $perl\n";
    execute( "make realclean" );
    do_or_die( $perl, "Makefile.PL" );
    do_or_die( "make test" );
}

sub execute {
    print "@_", "\n";
    system( @_ );
}

sub do_or_die {
    print "@_", "\n";
    system( @_ ) == 0 or die "Failed executing @_";
}

sub shuffle {
    my @list = @_;
    my $i = @list;
    while ($i) {
        my $j = rand $i--;
        @list[$i, $j] = @list[$j, $i];
    }
    return @list;
}


--
Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance




Reply via email to