use strict;
use warnings FATAL => 'all';
-our $VERSION = '1.003002'; # 1.3.2
+our $VERSION = '1.003002';
$VERSION = eval $VERSION;
our %INFO;
chomp(my $LATEST = qx(grep '^[0-9]' Changes | head -1 | awk '{print \$1}'));
my @parts = split /\./, $LATEST;
+if (@parts == 2) {
+ @parts[1,2] = $parts[1] =~ /(\d{1,3})(\d{1,3})/;
+}
my $OLD_DECIMAL = sprintf('%i.%03i%03i', @parts);
my @new_parts = @parts;
$new_parts[$bump_this]++;
+$new_parts[$_] = 0 for ($bump_this+1 .. 2);
my $NEW_DECIMAL = sprintf('%i.%03i%03i', @new_parts);
warn "Bumping $OLD_DECIMAL -> $NEW_DECIMAL\n";
-my $PM_FILE = 'lib/Moo.pm';
+for my $PM_FILE (qw(
+ lib/Moo.pm
+ lib/Moo/Role.pm
+ lib/Sub/Defer.pm
+ lib/Sub/Quote.pm
+)) {
+ my $file = do { local (@ARGV, $/) = ($PM_FILE); <> };
-my $file = do { local (@ARGV, $/) = ($PM_FILE); <> };
+ $file =~ s/(?<=\$VERSION = ')${\quotemeta $OLD_DECIMAL}/${NEW_DECIMAL}/
+ or die "unable to bump version number in $PM_FILE";
-$file =~ s/(?<=\$VERSION = ')${\quotemeta $OLD_DECIMAL}/${NEW_DECIMAL}/;
+ open my $out, '>', $PM_FILE;
-open my $out, '>', $PM_FILE;
-
-print $out $file;
+ print $out $file;
+}