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!
# 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 ) );