provide a more limited change-count for acknowledgements.pl
authorGavin Shelley <columbusmonkey@me.com>
Mon, 10 Feb 2014 23:19:14 +0000 (18:19 -0500)
committerRicardo Signes <rjbs@cpan.org>
Mon, 10 Feb 2014 23:41:39 +0000 (18:41 -0500)
AUTHORS
Porting/acknowledgements.pl

diff --git a/AUTHORS b/AUTHORS
index 941fbf3..b4e451d 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -404,6 +404,7 @@ Garry T. Williams           <garry@zvolve.com>
 Gary Clark                     <GaryC@mail.jeld-wen.com>
 Gary L. Armstrong
 Gary Ng                                <71564.1743@compuserve.com>
+Gavin Shelley                  <columbusmonkey@me.com>
 Gene Sullivan                  <genesullivan50@yahoo.com>
 Geoffrey T. Dairiki            <dairiki@dairiki.org>
 Geoffrey F. Green              <geoff-public@stuebegreen.com>
index 2094109..2cd66c9 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,14 @@ sub _round {
 # version
 sub changes_files {
     my $output = qx(git diff --shortstat $since_until);
+    my $output_code_changed = qx# git diff --shortstat $since_until -- \$(git diff --numstat $since_until |awk '{print \$3}' | grep -v ^dist/Module-CoreList | grep -E '\.(pm|c|h|t)\$') #;
+
+    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 )