In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c27d84d919f5c9d4d5292351d434abd2f16e2358?hp=8e5dcc37de4ab79d8ec6f30798947ae97355ff2a>

- Log -----------------------------------------------------------------
commit c27d84d919f5c9d4d5292351d434abd2f16e2358
Author: Aaron Crane <a...@cpan.org>
Date:   Thu Mar 20 17:13:56 2014 +0000

    Porting/corelist-perldelta.pl: fix bug with 5.*.10 releases
    
    The two aliases of the new Perl version (in this case, "5.01901" and
    "5.019010") were being selected as the two versions to compare.
    Unsurprisingly, those two versions have the same modules, so the
    generated summary of changes was empty.

M       Porting/corelist-perldelta.pl

commit 54e78c5ec34cae9d6093009691509ca0113b52fd
Author: Aaron Crane <a...@cpan.org>
Date:   Thu Mar 20 17:13:39 2014 +0000

    Porting/corelist-perldelta.pl: fix minor POD error

M       Porting/corelist-perldelta.pl

commit 29900347a7633145c3b5b33b6635d3e72f1afe87
Author: Aaron Crane <a...@cpan.org>
Date:   Thu Mar 20 17:12:57 2014 +0000

    Porting/corelist-perldelta.pl: fix typo in error message

M       Porting/corelist-perldelta.pl
-----------------------------------------------------------------------

Summary of changes:
 Porting/corelist-perldelta.pl | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/Porting/corelist-perldelta.pl b/Porting/corelist-perldelta.pl
index fd0b2e2..da02e7a 100755
--- a/Porting/corelist-perldelta.pl
+++ b/Porting/corelist-perldelta.pl
@@ -34,6 +34,7 @@ corelist sections of the last perldelta and the next 
perldelta.
 
 Currently no information about Removed Modules is displayed in any of the
 modes.
+
 =cut
 
 my %sections = (
@@ -58,9 +59,7 @@ sub run {
   );
 
   # by default, compare latest two version in CoreList;
-  my @versions = sort keys %Module::CoreList::version;
-  my $old = $versions[-2];
-  my $new = $versions[-1];
+  my ($old, $new) = latest_two_perl_versions();
 
   # use the provided versions if present
   # @ARGV >=2 means [old_version] [new_version] [path/to/file]
@@ -68,7 +67,7 @@ sub run {
     ($old, $new) = (shift @ARGV, shift @ARGV);
     die "$old is an invalid version\n" if not exists
       $Module::CoreList::version{$old};
-    die "$new is an invalid verison\n" if not exists
+    die "$new is an invalid version\n" if not exists
       $Module::CoreList::version{$new};
   }
 
@@ -88,6 +87,23 @@ sub run {
   exit 0;
 }
 
+sub latest_two_perl_versions {
+
+  my @versions = sort keys %Module::CoreList::version;
+
+  my $new = pop @versions;
+
+  # If a fully-padded version number ends in a zero (as in "5.019010"), that
+  # version shows up in %Module::CoreList::version both with and without its
+  # trailing zeros. So skip all versions that are numerically equal to $new.
+  pop @versions while @versions && $versions[-1] == $new;
+
+  die "Too few distinct core versions in %Module::CoreList::version ?!\n"
+    if !@versions;
+
+  return $versions[-1], $new;
+}
+
 # Given two perl versions, it returns a list describing the core distributions 
that have changed.
 # The first three elements are hashrefs corresponding to new, updated, and 
removed modules
 # and are of the form (mostly, see the special remarks about removed):

--
Perl5 Master Repository

Reply via email to