+2007-12-12 Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-genchanges.pl: Use ||= instead of checking if the
+ variables are not defined.
+ * scripts/dpkg-gencontrol.pl: Likewise.
+ * scripts/update-alternatives.pl (fill_missing_slavepaths): Likewise.
+
2007-12-11 Raphael Hertzog <hertzog@debian.org>
* scripts/Dpkg/Deps.pm: Add a compare function that compares
foreach my $f (@f) {
my $sec = $f2seccf{$f};
- $sec = $sourcedefault{'Section'} if !defined($sec);
+ $sec ||= $sourcedefault{'Section'};
if (!defined($sec)) {
$sec = '-';
warning(_g("missing Section for binary package %s; using '-'"), $p);
"control file but %s in files list"),
$p, $sec, $f2sec{$f});
my $pri = $f2pricf{$f};
- $pri = $sourcedefault{'Priority'} if !defined($pri);
+ $pri ||= $sourcedefault{'Priority'};
if (!defined($pri)) {
$pri = '-';
warning(_g("missing Priority for binary package %s; using '-'"), $p);
$f{$_} = $v;
} elsif (m/^(Section|Priority|Homepage)$/) {
# Binary package stanzas can override these fields
- $f{$_} = $v if !defined($f{$_});
+ $f{$_} ||= $v;
} elsif (m/^Source$/) {
setsourcepackage($v);
}
{
for (my $j = 0; $j <= $#slavenames; $j++) {
for (my $i = 0; $i <= $#versions; $i++) {
- $slavepath{$i,$j} = '' if !defined $slavepath{$i,$j};
+ $slavepath{$i,$j} ||= '';
}
}
}