use Getopt::Long;
require './devel/devtools.pl';
+require './parts/ppptools.pl';
our %opt = (
base => 0, # If specified, this will generate base files, not todo ones
my $perls_ref = get_and_sort_perls(\%opt);
# Go through all the perls, creating a todo file for it.
-for (@${perls_ref}) {
- my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
- my @args = ('--perl', $_->{path}, '--version', "$_->{todo}");
+for (my $i = 0; $i < @$perls_ref; $i++) {
+ my $this_perl = @{$perls_ref}[$i];
+ my @args = ('--perl', $this_perl->{path},
+ '--version', $this_perl->{version},
+ '--todo-dir', $outdir
+ );
- push @args, '--blead' if $_ == $perls_ref->[0]; # First one is blead
- push @args, '--todo', $_->{'todo'};
+ push @args, '--blead' if $i == 0; # First one is blead
+ push @args, '--todo', $this_perl->{'todo'};
push @args, '--base' if $opt{base};
push @args, "--debug=$opt{debug}" if $opt{debug};
push @args, '--verbose' if $opt{verbose};
base => 0, # Don't use ppport.h when generating
verbose => 0,
check => 1,
+ 'todo-dir' => "",
todo => "", # If no --todo, this is a blead perl
shlib => 'blib/arch/auto/Devel/PPPort/PPPort.so',
);
GetOptions(\%opt, qw(
-perl=s todo=s blead version=s shlib=s debug=i base verbose check!
+perl=s todo=i blead todo-dir=s version=s shlib=s debug=i base verbose check!
)) or die;
identify();
my $todo_file;
my $todo_version;
if ($opt{todo}) {
- $todo_file = $opt{todo};
- $todo_version = $opt{version};
+ $todo_file = "$opt{'todo-dir'}/$opt{todo}";
+ $todo_version = format_version_line($opt{todo});
}
print "\n", ident_str(), "\n\n";