],
[
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
[
],
# 5.8.9
[
- qr{\b $oldx\.$oldy\.$oldz \b}x,
+ qr{ $oldx\.$oldy\.$oldz \b}x,
sub {"", "$newx.$newy.$newz"},
undef,
],
# 5.008009
[
- qr{\b $old_decimal \b}x,
+ qr{ $old_decimal \b}x,
sub {"", sprintf "%d.%03d%03d", $newx, $newy, $newz },
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/mergelog
- Porting/mergelog-tool
+ Porting/release_managers_guide.pod
+ Porting/release_schedule.pod
+ Porting/bump-perl-version
pod.lst
+ pp_ctl.c
);
my @SKIP_DIRS = qw(
ext
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";