Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 63 lines (52 sloc) 1.445 kb
#!/usr/bin/perl
# Copyright 2004-2006, Paul Johnson (pjcj@cpan.org)
# This software is free. It is licensed under the same terms as Perl itself.
# The latest version of this software should be available from my homepage:
# http://www.pjcj.net
use strict;
use warnings;
use Getopt::Long;
my $Options =
{
dry_run => 0,
ignore_failure => 0,
version => [],
};
sub get_options
{
die "Bad option" unless
GetOptions($Options, # Store the options in the Options hash.
qw(
dry_run!
ignore_failure!
version=s
));
$Options->{version} =
[ map { ($_, "$_-thr") }
qw( 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.4 ) ]
unless @{$Options->{version}};
$Options->{version} =
[ grep eval { !system "perl$_ -v" }, @{$Options->{version}} ];
}
sub sys
{
my ($command) = @_;
print "$command\n";
return if $Options->{dry_run};
my $ret = system $command;
die "command failed: $?" if $ret && !$Options->{ignore_failure};
}
get_options;
my $command = "@ARGV" or die "Usage: $0 [-v version] command\n";
for my $v (@{$Options->{version}})
{
my $perl = "perl$v";
sys "rm -rf t cover_db";
sys "$perl Makefile.PL";
sys "make clean";
sys "$perl Makefile.PL";
sys "make";
sys $command;
}
Jump to Line
Something went wrong with that request. Please try again.