summaryrefslogtreecommitdiff
path: root/scripts/dpkg-source.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2013-11-08 06:28:14 +0100
committerGuillem Jover <guillem@debian.org>2013-12-04 07:09:42 +0100
commitbd281a3259a499217326ad4b3b1a2973a83d7434 (patch)
treec749b66dc5079cc05369d0b92942a1ce59440fff /scripts/dpkg-source.pl
parentee37c9202bb80ea4ee50bf463df1495eaf0d3a7c (diff)
downloaddpkg-bd281a3259a499217326ad4b3b1a2973a83d7434.tar.gz
perl: Switch to use low precedence boolean operators for error checks
This will make it safe to remove parenthesis around builtins.
Diffstat (limited to 'scripts/dpkg-source.pl')
-rwxr-xr-xscripts/dpkg-source.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index 7e2d0fa39..615831417 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -109,14 +109,14 @@ if (defined($options{opmode}) &&
} else {
$dir = File::Spec->catdir(shift(@ARGV));
}
- stat($dir) || syserr(_g('cannot stat directory %s'), $dir);
+ stat($dir) or syserr(_g('cannot stat directory %s'), $dir);
if (not -d $dir) {
error(_g('directory argument %s is not a directory'), $dir);
}
if ($dir eq '.') {
# . is never correct, adjust automatically
$dir = basename(cwd());
- chdir('..') || syserr(_g("unable to chdir to `%s'"), '..');
+ chdir('..') or syserr(_g("unable to chdir to `%s'"), '..');
}
# --format options are not allowed, they would take precedence
# over real command line options, debian/source/format should be used
@@ -354,8 +354,8 @@ if ($options{opmode} =~ /^(-b|--print-format|--(before|after)-build|--commit)$/)
# Select the format to use
if (not defined $build_format) {
if (-e "$dir/debian/source/format") {
- open(my $format_fh, '<', "$dir/debian/source/format") ||
- syserr(_g('cannot read %s'), "$dir/debian/source/format");
+ open(my $format_fh, '<', "$dir/debian/source/format")
+ or syserr(_g('cannot read %s'), "$dir/debian/source/format");
$build_format = <$format_fh>;
chomp($build_format) if defined $build_format;
error(_g('%s is empty'), "$dir/debian/source/format")