[debhelper-devel] [debhelper] 01/01: Optimise a few stat calls

Niels Thykier nthykier at moszumanska.debian.org
Sat Jun 18 21:19:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit a149f01b29568262b0dbea63716471e748e5b98e
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Jun 18 21:18:29 2016 +0000

    Optimise a few stat calls
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 2 +-
 dh_perl                    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 531f3d2..5c20c63 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -1308,7 +1308,7 @@ sub install_dh_config_file {
 	$mode = 0644 if not defined($mode);
 
 	if (!compat(8) and -x $source) {
-		my @sstat = stat($source) || error("cannot stat $source: $!");
+		my @sstat = stat(_) || error("cannot stat $source: $!");
 		open(my $tfd, '>', $target) || error("cannot open $target: $!");
 		chmod($mode, $tfd) || error("cannot chmod $target: $!");
 		open(my $sfd, '-|', $source) || error("cannot run $source: $!");
diff --git a/dh_perl b/dh_perl
index c6088d4..4f13dc0 100755
--- a/dh_perl
+++ b/dh_perl
@@ -108,7 +108,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 
 	# find scripts
 	find sub {
-		return unless -f and (-x or /\.pl$/);
+		return unless -f and (-x _ or /\.pl$/);
 		return if $File::Find::dir=~/\/usr\/share\/doc\//;
 
 		return unless open(my $fd, '<', $_);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list