This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta - Remove all but one XXX notices
[perl5.git] / cpan / Devel-PPPort / devel / mktodo
CommitLineData
adfe19db
MHM
1#!/usr/bin/perl -w
2################################################################################
3#
4# mktodo -- generate baseline and todo files by running mktodo.pl
5#
6################################################################################
7#
49ef49fe 8# $Revision: 18 $
adfe19db 9# $Author: mhx $
49ef49fe 10# $Date: 2010/03/07 13:15:43 +0100 $
adfe19db
MHM
11#
12################################################################################
13#
49ef49fe 14# Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz.
adfe19db
MHM
15# Version 2.x, Copyright (C) 2001, Paul Marquess.
16# Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
17#
18# This program is free software; you can redistribute it and/or
19# modify it under the same terms as Perl itself.
20#
21################################################################################
22
23use strict;
24use Getopt::Long;
25
0c96388f
MHM
26require 'devel/devtools.pl';
27
28our %opt = (
29 base => 0,
ba120f6f 30 check => 1,
0c96388f 31 verbose => 0,
49ef49fe
CBW
32 install => '/tmp/perl/install/default',
33 blead => 'bleadperl',
adfe19db
MHM
34);
35
49ef49fe 36GetOptions(\%opt, qw( base check! verbose install=s blead=s blead-version=s )) or die;
adfe19db 37
0c96388f
MHM
38identify();
39
adfe19db
MHM
40my $outdir = 'parts/todo';
41
adfe19db
MHM
42my @perls = sort { $b->{version} <=> $a->{version} }
43 map { { version => `$_ -e 'printf "%.6f", \$]'`, path => $_ } }
49ef49fe
CBW
44 ($opt{blead}, glob "$opt{install}/*/bin/perl5.*");
45
46if (exists $opt{'blead-version'}) {
47 $perls[0]{version} = $opt{'blead-version'};
48}
adfe19db
MHM
49
50for (1 .. $#perls) {
51 $perls[$_]{todo} = $perls[$_-1]{version};
52}
53
54shift @perls;
55
56for (@perls) {
57 my $todo = do { my $v = $_->{todo}; $v =~ s/\D+//g; $v };
58 -e "$outdir/$todo" and next;
59 my @args = ('--perl', $_->{path}, '--todo', "$outdir/$todo", '--version', "$_->{todo}");
60 push @args, '--base' if $opt{base};
0c96388f 61 push @args, '--verbose' if $opt{verbose};
ba120f6f 62 push @args, '--nocheck' unless $opt{check};
0c96388f 63 runperl('devel/mktodo.pl', @args) or die "error running mktodo.pl [$!] [$?]\n";
adfe19db 64}
0c96388f 65