summaryrefslogtreecommitdiff
path: root/Porting/acknowledgements.pl
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2014-02-10 18:38:07 -0500
committerRicardo Signes <rjbs@cpan.org>2014-02-10 18:41:40 -0500
commit2e4654b2df94e55f0beb5614331dcf983118989c (patch)
treef0194156fe7c130f4642a633eda9efb539c68ff9 /Porting/acknowledgements.pl
parent636564c5b1e7e39a81bb531739bae9a7fe32d5f2 (diff)
downloadperl-2e4654b2df94e55f0beb5614331dcf983118989c.tar.gz
tweak Porting/acknowledgements.pl to avoid awk and grep
Rather than assuming that we are on a unix system with the standard kit, we can rely on this neat little programming language that provides their behavior and is already assumed to be present!
Diffstat (limited to 'Porting/acknowledgements.pl')
-rw-r--r--Porting/acknowledgements.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/Porting/acknowledgements.pl b/Porting/acknowledgements.pl
index 2cd66c9339..13718a790b 100644
--- a/Porting/acknowledgements.pl
+++ b/Porting/acknowledgements.pl
@@ -125,7 +125,9 @@ 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)\$') #;
+ my @filenames = qx(git diff --numstat $since_until | perl -anle 'next if m{^dist/Module-CoreList} or not /\\.(?:pm|c|h|t)\\z/; print \$F[2]');
+ chomp @filenames;
+ my $output_code_changed = qx# git diff --shortstat $since_until -- @filenames #;
return ( _changes_from_cmd ( $output ),
_changes_from_cmd ( $output_code_changed ) );