In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c58bf3ba21f311e34c38379fadc8097eb7bf6600?hp=d9dc8e0c5019810bfa3840ecadb302a2f01e01ae>

- Log -----------------------------------------------------------------
commit c58bf3ba21f311e34c38379fadc8097eb7bf6600
Author: Matthew Horsfall (alh) <[email protected]>
Date:   Mon Mar 16 10:14:11 2015 -0400

    [perl #124048] Sort and compare version numbers numerically.
    
    This fixes a case where on 5.x.10 dev versions of Perl,
    
      ./perl -Ilib Porting/corelist.pl cpan
    
    would cause 'delta_from' for that version to point to itself.
-----------------------------------------------------------------------

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

diff --git a/Porting/corelist.pl b/Porting/corelist.pl
index fcca6d4..ce4ff2b 100755
--- a/Porting/corelist.pl
+++ b/Porting/corelist.pl
@@ -366,10 +366,9 @@ sub make_corelist_delta {
   my %deltas;
   # Search for the release with the least amount of changes (this avoids having
   # to ask for where this perl was branched from).
-  for my $previous (reverse sort keys %$existing) {
+  for my $previous (reverse sort { $a <=> $b } keys %$existing) {
     # Shouldn't happen, but ensure we don't load weird data...
-    next if $previous > $version || $previous == $version && $previous eq 
$version;
-
+    next if $previous > $version || $previous == $version;
     my $delta = $deltas{$previous} = {};
     ($delta->{changed}, $delta->{removed}) = calculate_delta(
       $existing->{$previous}, \%versions);
@@ -400,9 +399,9 @@ sub make_coreutils_delta {
   my %deltas;
   # Search for the release with the least amount of changes (this avoids having
   # to ask for where this perl was branched from).
-  for my $previous (reverse sort keys %Module::CoreList::Utils::utilities) {
+  for my $previous (reverse sort { $a <=> $b } keys 
%Module::CoreList::Utils::utilities) {
     # Shouldn't happen, but ensure we don't load weird data...
-    next if $previous > $version || $previous == $version && $previous eq 
$version;
+    next if $previous > $version || $previous == $version;
 
     my $delta = $deltas{$previous} = {};
     ($delta->{changed}, $delta->{removed}) = calculate_delta(

--
Perl5 Master Repository

Reply via email to