diff options
author | Aaron Crane <arc@cpan.org> | 2016-12-30 16:04:35 +0000 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2016-12-30 18:45:35 +0000 |
commit | 746bc9e17be02267078e17ac982eaff3ea41488d (patch) | |
tree | 7f7d56aef5f8dc8de77a43993f651841374d92aa /Porting/sync-with-cpan | |
parent | ec1d1ba057d560ff810890310034e7757e97a1b2 (diff) | |
download | perl-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-x | Porting/sync-with-cpan | 9 |
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; } } |