my %opts;
getopts('csu', \%opts) or usage;
if ($opts{u}) {
- @ARGV == 0 or usage('no version version numbers should be speciied');
+ @ARGV == 0 or usage('no version version numbers should be specified');
# fake to stop warnings when calculating $oldx etc
@ARGV = qw(99.99.99 99.99.99);
}
],
[
qr{^(api_subversion(?:=|\s+)'?) (\d+) ('?) (?!\.)}x,
- sub { $2, "${1}0$3" },
- 0,
+ sub { $2, ($newy % 2) ? "$1$newz$3" : "${1}0$3" },
+ ($oldy % 2) ? $oldz : 0,
qr/config/,
],
[
qr{^(api_versionstring(?:=|\s+)'?) ([\d\.]+) ('?) (?!\.)}x,
- sub { $2, "$1$newx.$newy.0$3" },
- "$oldx.$oldy.0",
+ sub { $2, ($newy % 2) ? "$1$newx.$newy.$newz$3": "$1$newx.$newy.0$3" },
+ ($oldy % 2) ? "$oldx.$oldy.$oldz" : "$oldx.$oldy.0",
qr/config/,
],
[
[
qr{\b (PERL_SUBVERSION(?:=|\s+)'?) (\d+) ('?) (?!\.)}x,
sub { $2, "$1$newz$3"},
- $oldz,
+ ($oldy % 2) ? $oldz : 0,
],
[
qr{\b (PERL_API_SUBVERSION(?:=|\s+)'?) (\d+) ('?) (?!\.)}x,
- sub { $2, "${1}0$3"},
- 0,
+ sub { $2, ($newy % 2) ? "$1$newz$3" : "${1}0$3" },
+ $oldz,
],
# these two formats are in README.vms
[
undef,
],
+ # perl511, perl511.dll, perl511.lib, perl511s.lib, libperl511.a
+ [
+ qr{\b ((?:lib)?) perl (\d\d\d) (s?) \b }x,
+ sub {$2, "$1perl$newx$newy$3" },
+ "$oldx$oldy",
+ qr/makedef|win32|hints/, # makedef.pl, README.win32, win32/*, hints/*
+ ],
+
);
my %SKIP_FILES = map { ($_ => 1) } qw(
Changes
MANIFEST
+ Porting/epigraphs.pod
Porting/how_to_write_a_perldelta.pod
Porting/release_managers_guide.pod
- Porting/release_schedule.pod
+ Porting/release_schedule.pod
Porting/bump-perl-version
- Porting/mergelog
- Porting/mergelog-tool
pod.lst
pp_ctl.c
);
do_update();
}
else {
- usage('one of -c, -s or -u must be specifcied');
+ usage('one of -c, -s or -u must be specified');
}
exit 0;
elsif (/^\s+(\d+): -(.*)/) {
my $old;
($line, $old) = ($1,$2);
- die "$.: old line without preceeding filename\n"
+ die "$.: old line without preceding filename\n"
unless defined $file;
die "Dup line number: $line\n" if exists $changes{$file}{$line};
$changes{$file}{$line}[0] = $old;
my %contents;
for my $file (sort keys %changes) {
open my $fh, '<', $file or die "open '$file': $!\n";
+ binmode $fh;
$contents{$file} = [ <$fh> ];
chomp @{$contents{$file}};
close $fh or die "close: '$file': $!\n";
for my $file (sort keys %contents) {
my $nfile = "$file-new";
open my $fh, '>', $nfile or die "create '$nfile' failed: $!\n";
+ binmode $fh;
print $fh $_, "\n" for @{$contents{$file}};
close $fh or die "failed to close $nfile; aborting: $!\n";