qr/uconfig/,
],
+ # win32/Makefile.ce
+ [
+ qr/(PV\s*=\s*)(\d\d{2})\b$/,
+ sub { $2, "$1$newx$newy" },
+ "$oldx$oldy",
+ qr/Makefile\.ce/,
+ ],
);
my %SKIP_FILES = map { ($_ => 1) } qw(
Changes
+ intrpvar.h
MANIFEST
Porting/Maintainers.pl
Porting/acknowledgements.pl
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;