summaryrefslogtreecommitdiff
path: root/Porting/sync-with-cpan
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2016-12-30 16:04:35 +0000
committerAaron Crane <arc@cpan.org>2016-12-30 18:45:35 +0000
commit746bc9e17be02267078e17ac982eaff3ea41488d (patch)
tree7f7d56aef5f8dc8de77a43993f651841374d92aa /Porting/sync-with-cpan
parentec1d1ba057d560ff810890310034e7757e97a1b2 (diff)
downloadperl-746bc9e17be02267078e17ac982eaff3ea41488d.tar.gz
Porting/sync-with-cpan: remove needless loop
The de_exec() routine is only ever called with one argument at a time, so simplify it.
Diffstat (limited to 'Porting/sync-with-cpan')
-rwxr-xr-xPorting/sync-with-cpan9
1 files changed, 4 insertions, 5 deletions
diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan
index 5927300cd5..8da9419bc0 100755
--- a/Porting/sync-with-cpan
+++ b/Porting/sync-with-cpan
@@ -203,11 +203,10 @@ sub find_type_f {
# Equivalent of `chmod a-x`
sub de_exec {
- for my $filename ( @_ ) {
- my $mode= (stat $filename)[2] & 0777;
- if( $mode & 0111 ) { # exec-bit set
- chmod $mode & 0666, $filename;
- };
+ my ($filename) = @_;
+ my $mode = (stat $filename)[2] & 0777;
+ if ($mode & 0111) { # exec-bit set
+ chmod $mode & 0666, $filename;
}
}