From: David Golden Date: Thu, 1 Oct 2009 21:46:53 +0000 (-0400) Subject: Add tool to generate updated module list for perldelta X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=603f4ea09018f6c4f3ec7d60f99d99ff037a0414;p=p5sagit%2Fp5-mst-13.2.git Add tool to generate updated module list for perldelta --- diff --git a/Porting/corelist-perldelta.pl b/Porting/corelist-perldelta.pl new file mode 100755 index 0000000..b3aa772 --- /dev/null +++ b/Porting/corelist-perldelta.pl @@ -0,0 +1,28 @@ +#!perl +use 5.010; +use strict; +use warnings; +use lib 'Porting'; +use Maintainers qw/%Modules/; +use Module::CoreList; + +my $corelist = \%Module::CoreList::version; +my @versions = sort keys %$corelist; + +# by default, compare latest two version in CoreList; +my ($old, $new) = @ARGV; +$old ||= $versions[-2]; +$new ||= $versions[-1]; + +say "=head2 Updated Modules\n"; +say "=over 4\n"; + +for my $mod ( sort { lc $a cmp lc $b } keys %Modules ) { + my $old_ver = $corelist->{$old}{$mod}; + my $new_ver = $corelist->{$new}{$mod}; + next unless defined $old_ver && defined $new_ver && $old_ver ne $new_ver; + say "=item C<$mod>\n"; + say "Upgraded from version $old_ver to $new_ver.\n"; +} + +say "=back\n";