For blead, bump-perl-version should consider SUBVERSION as API_SUBVERSION
authorFlorian Ragwitz <rafl@debian.org>
Thu, 22 Jul 2010 15:37:20 +0000 (17:37 +0200)
committerSteffen Mueller <smueller@cpan.org>
Fri, 23 Jul 2010 10:24:35 +0000 (12:24 +0200)
This makes the API version of a blead release equivalent to its full version
number. For example, for 5.13.3, the API version was 5.13.0 before, and is
5.13.0 now.

This does not change anything for stable releases. The API version of 5.14.1
will still be 5.14.0.

Blead releases don't guarantee API stability. While they don't introduce API
breakage on every release, they do so often enough to want to err on the safe
side instead of making false claims in PERL_API_*.

Porting/bump-perl-version

index 04999e7..d7aabba 100755 (executable)
@@ -118,14 +118,14 @@ my @maps =  (
     ],
     [
        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/,
     ],
     [
@@ -142,12 +142,12 @@ my @maps =  (
     [
        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
     [