warn "Bumping $old_version -> $new_decimal\n";
+my $file_match = qr{^(?:
+ Makefile\.PL
+ |lib[/\\].*\.(?:pod|pm)
+ |bin[/\\].*
+ |script[/\\].*
+)$}x;
+
my %files;
if ($git) {
if (system "git diff --quiet --cached HEAD") {
for (`git ls-files`) {
chomp;
next
- unless /^lib\/.*\.(?:pod|pm)$/ || /^Makefile\.PL$/;
+ unless /$file_match/;
$files{$_} = `git show HEAD:"$_"`;
}
}
next
unless -f;
next
- unless /^lib\/.*\.(?:pod|pm)$/ || /^Makefile\.PL$/;
+ unless /(?:\.[\/\\])?$file_match/;
open my $fh, '<', $_
or die "can't open $_: $!";
$files{$_} = do { local $/; <$fh> };
close $fh;
},
- }, 'lib');
+ }, '.');
}
my $FILE_RE = qr{