diff --git a/dist/Module-CoreList/lib/Module/CoreList.pm b/dist/Module-CoreList/lib/Module/CoreList.pm index 95c37f0fe426..e0d741238737 100644 --- a/dist/Module-CoreList/lib/Module/CoreList.pm +++ b/dist/Module-CoreList/lib/Module/CoreList.pm @@ -12,7 +12,7 @@ sub _looks_like_invocant ($) { local $@; !!eval { $_[0]->isa(__PACKAGE__) } } sub _undelta { my ($delta) = @_; my (%expanded, $delta_from, $base, $changed, $removed); - for my $v (sort keys %$delta) { + for my $v (sort { $a <=> $b } keys %$delta) { ($delta_from, $changed, $removed) = @{$delta->{$v}}{qw( delta_from changed removed )}; $base = $delta_from ? $expanded{$delta_from} : {}; my %full = ( %$base, %{$changed || {}} ); @@ -54,7 +54,7 @@ sub first_release_raw { my @perls = $version ? grep { defined $version{$_}{ $module } && - $version{$_}{ $module } ge $version } keys %version + $version{$_}{ $module } >= $version } keys %version : grep { exists $version{$_}{ $module } } keys %version; return @perls; @@ -69,7 +69,7 @@ sub first_release_by_date { sub first_release { my @perls = &first_release_raw; return unless @perls; - return (sort { $a cmp $b } @perls)[0]; + return (sort { $a <=> $b } @perls)[0]; } sub find_modules { @@ -123,9 +123,9 @@ sub removed_from_by_date { sub removed_raw { shift if defined $_[1] and $_[1] =~ PKG_PATTERN and _looks_like_invocant $_[0]; my $mod = shift; - return unless my @perls = sort { $a cmp $b } first_release_raw($mod); + return unless my @perls = sort { $a <=> $b } first_release_raw($mod); my $last = pop @perls; - my @removed = grep { $_ > $last } sort { $a cmp $b } keys %version; + my @removed = grep { $_ > $last } sort { $a <=> $b } keys %version; return @removed; } @@ -430,11 +430,11 @@ sub changes_between { 5.041004 => '2024-09-20', 5.041005 => '2024-10-20', 5.041006 => '2024-11-20', - 5.041007 => '2024-12-20', + 41.007 => '2024-12-20', ); for my $version ( sort { $a <=> $b } keys %released ) { - my $family = int ($version * 1000) / 1000; + my $family = $version > 41 ? int($version) : int( $version * 1000 ) / 1000; push @{ $families{ $family }} , $version; } @@ -22478,7 +22478,7 @@ for my $version ( sort { $a <=> $b } keys %released ) { removed => { } }, - 5.041007 => { + 41.007 => { delta_from => 5.041006, changed => { 'B::Op_private' => '5.041007', diff --git a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm index 18b2d5c84a83..8c35f715e6e0 100644 --- a/dist/Module-CoreList/lib/Module/CoreList/Utils.pm +++ b/dist/Module-CoreList/lib/Module/CoreList/Utils.pm @@ -32,7 +32,7 @@ sub first_release_raw { my @perls = $version ? grep { exists $utilities{$_}{ $util } && - $utilities{$_}{ $util } ge $version } keys %utilities + $utilities{$_}{ $util } >= $version } keys %utilities : grep { exists $utilities{$_}{ $util } } keys %utilities; return grep { exists $Module::CoreList::released{$_} } @perls; @@ -47,7 +47,7 @@ sub first_release_by_date { sub first_release { my @perls = &first_release_raw; return unless @perls; - return (sort { $a cmp $b } @perls)[0]; + return (sort { $a <=> $b } @perls)[0]; } sub removed_from { @@ -63,10 +63,10 @@ sub removed_from_by_date { sub removed_raw { my $util = shift; $util = shift if eval { $util->isa(__PACKAGE__) }; - return unless my @perls = sort { $a cmp $b } first_release_raw($util); + return unless my @perls = sort { $a <=> $b } first_release_raw($util); @perls = grep { exists $Module::CoreList::released{$_} } @perls; my $last = pop @perls; - my @removed = grep { $_ > $last } sort { $a cmp $b } keys %utilities; + my @removed = grep { $_ > $last } sort { $a <=> $b } keys %utilities; return @removed; } @@ -2070,7 +2070,7 @@ my %delta = ( removed => { } }, - 5.041007 => { + 41.007 => { delta_from => 5.041006, changed => { },