This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add tool to generate updated module list for perldelta
[perl5.git] / Porting / corelist-perldelta.pl
CommitLineData
603f4ea0
DG
1#!perl
2use 5.010;
3use strict;
4use warnings;
5use lib 'Porting';
6use Maintainers qw/%Modules/;
7use Module::CoreList;
8
9my $corelist = \%Module::CoreList::version;
10my @versions = sort keys %$corelist;
11
12# by default, compare latest two version in CoreList;
13my ($old, $new) = @ARGV;
14$old ||= $versions[-2];
15$new ||= $versions[-1];
16
17say "=head2 Updated Modules\n";
18say "=over 4\n";
19
20for my $mod ( sort { lc $a cmp lc $b } keys %Modules ) {
21 my $old_ver = $corelist->{$old}{$mod};
22 my $new_ver = $corelist->{$new}{$mod};
23 next unless defined $old_ver && defined $new_ver && $old_ver ne $new_ver;
24 say "=item C<$mod>\n";
25 say "Upgraded from version $old_ver to $new_ver.\n";
26}
27
28say "=back\n";