[Chicago-talk] Multiple installs
Andy Lester
andy at petdance.com
Fri Nov 14 12:10:45 CST 2003
Since I have to test Test::Harness on all Perls back to 5.4.0, I have
many installed on my box at home. It's pretty simple once you get
everything compiled up nice.
I config 'em with a script like this:
./Configure \
-des \
-Dprefix=/var/perl/5.4.0 \
-Dmydomain=.petdance.com \
-Dcf_email=andy at petdance.com \
-Dperladmin=andy at petdance.com
Then I symlink 'em:
ln -s /var/perl/5.4.0/bin/perl /usr/local/bin/perl5.4.0
And then I can have my handy little testall script do the tests on all:
#!/usr/bin/perl -w
# This isn't meant to be installed, just used by the maintainer.
my @vers = qw( 5.4.0 5.5.3 5.6.0 5.6.1 5.8.0 5.8.1 5.8.2 blead );
@vers = ( @vers, shuffle( @vers ), reverse( @vers ) );
for my $perlver ( @vers ) {
my $perl = "perl$perlver";
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;
}
HTH,
xoa
--
Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance
More information about the Chicago-talk
mailing list