From: Don Armstrong Date: Tue, 23 Feb 2010 19:35:52 +0000 (-0800) Subject: * check for source definedness to forestall warning X-Git-Tag: release/2.6.0~422^2 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=3d302aae41d4d482b4a866e3df6f9b9a7af2d25a * check for source definedness to forestall warning --- diff --git a/Debbugs/Packages.pm b/Debbugs/Packages.pm index f43e8b5..b4b5ef7 100644 --- a/Debbugs/Packages.pm +++ b/Debbugs/Packages.pm @@ -223,8 +223,8 @@ sub binary_to_source{ } # avoid autovivification my $bin = $_binarytosource{$binary}; + next unless defined $bin; if (not @versions) { - next unless defined $bin; for my $ver (keys %{$bin}) { for my $ar (keys %{$bin->{$ver}}) { my $src = $bin->{$ver}{$ar}; @@ -283,6 +283,9 @@ sub binary_to_source{ if ($param{source_only}) { my %uniq; for my $s (@source) { + # we shouldn't need to do this, but do this temporarily to + # stop the warning. + next unless defined $s->[0]; $uniq{$s->[0]} = 1; } @result = sort keys %uniq;