This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Create inversion list for Assigned code points
[perl5.git] / Porting / acknowledgements.pl
index 2094109..2d13564 100644 (file)
@@ -38,9 +38,11 @@ my $previous_version = previous_version();
 my $next_version     = next_version();
 my $development_time = development_time();
 
-my ( $changes, $files ) = changes_files();
+my ( $changes, $files, $code_changes, $code_files ) = changes_files();
 my $formatted_changes = commify( round($changes) );
 my $formatted_files   = commify( round($files) );
+my $formatted_code_changes = commify( round($code_changes) );
+my $formatted_code_files   = commify( round($code_files) );
 
 my $authors = authors();
 my $nauthors = $authors =~ tr/,/,/;
@@ -51,6 +53,10 @@ my $text
 since Perl $previous_version and contains approximately $formatted_changes
 lines of changes across $formatted_files files from $nauthors authors.
 
+Excluding auto-generated files, documentation and release tools, there
+were approximately $formatted_code_changes lines of changes to
+$formatted_code_files .pm, .t, .c and .h files.
+
 Perl continues to flourish into its third decade thanks to a vibrant
 community of users and developers. The following people are known to
 have contributed the improvements that became Perl $next_version:
@@ -119,6 +125,17 @@ sub _round {
 # version
 sub changes_files {
     my $output = qx(git diff --shortstat $since_until);
+    my $q = ($^O =~ /^(?:MSWin32|NetWare|VMS)$/io) ? '"' : "'";
+    my @filenames = qx(git diff --numstat $since_until | $^X -anle ${q}next if m{^dist/Module-CoreList} or not /\\.(?:pm|c|h|t)\\z/; print \$F[2]$q);
+    chomp @filenames;
+    my $output_code_changed = qx# git diff --shortstat $since_until -- @filenames #;
+
+    return ( _changes_from_cmd ( $output ),
+             _changes_from_cmd ( $output_code_changed ) );
+}
+
+sub _changes_from_cmd {
+    my $output = shift || die "No git diff command output";
 
     # 585 files changed, 156329 insertions(+), 53586 deletions(-)
     my ( $files, $insertions, $deletions )