# $ Porting/bump-perl-version -u < /tmp/scan
#
# (so line 52 of Porting/config.sh is now updated)
+#
+# The -i option can be used to combine these two steps (if you prefer to make
+# all of the changes at once and then edit the results via git).
# This utility 'knows' about certain files and formats, and so can spot
# 'hidden' version numbers, like PERL_SUBVERSION=9.
#
# Note there are various files and directories that it skips; these are
# ones that are unlikely to contain anything needing bumping, but which
-# will generate lots fo false positives (eg pod/*). These are listed on
+# will generate lots of false positives (eg pod/*). These are listed on
# STDERR as they are skipped.
use strict;
qr/uconfig/,
],
- # rename perl-5^.15^.1.dirperl-5_15_1.dir in README.vms
+ # win32/Makefile.ce
[
- qr{\sperl-(\d+)_(\d+)_(\d+)\.dir}x,
- sub { " perl-${1}_${2}_${3}.dir", " perl-${newx}_${newy}_${newz}.dir" },
- " perl-${oldx}_${oldy}_{$oldz}.dir",
- qr/README.vms/,
+ qr/(PV\s*=\s*)(\d\d{2})\b$/,
+ sub { $2, "$1$newx$newy" },
+ "$oldx$oldy",
+ qr/Makefile\.ce/,
],
-
);
MANIFEST
Porting/Maintainers.pl
Porting/acknowledgements.pl
+ Porting/corelist-perldelta.pl
Porting/epigraphs.pod
Porting/how_to_write_a_perldelta.pod
Porting/release_managers_guide.pod
pp_ctl.c
);
my @SKIP_DIRS = qw(
+ dist
ext
lib
pod
sub do_scan {
for my $file (@mani_files) {
- next if grep $file =~ m{$_/}, @SKIP_DIRS;
+ next if grep $file =~ m{^$_/}, @SKIP_DIRS;
if ($SKIP_FILES{$file}) {
warn "(skipping $file)\n";
next;
while (my $line = <$fh>) {
my $oldline = $line;
+ my $line_changed = 0;
for my $map (@maps) {
my ($pat, $sub, $expected, $file_pat) = @$map;
}
$line =~ s/$pat/$replacement/
or die "Internal error: substitution failed: [$pat]\n";
+ if ($line ne $oldline) {
+ $line_changed = 1;
+ last;
+ }
}
$new_contents .= $line if $opts{i};
- if ($line ne $oldline) {
+ if ($line_changed) {
$file_changed = 1;
if ($opts{s}) {
print "\n$file\n" unless $header;