From: Don Armstrong Date: Mon, 16 Apr 2018 23:30:58 +0000 (-0700) Subject: use the bin_to_src cache in get_bug_statuses X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=247985907fc20038d9e5526154cc0689c94f1126 use the bin_to_src cache in get_bug_statuses --- diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 38d6453..45b01a9 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -1321,6 +1321,10 @@ sub get_bug_statuses { my %param = validate_with(params => \@_, spec => $spec, ); + my $bin_to_src_cache = {}; + if (defined $param{binary_to_source_cache}) { + $bin_to_src_cache = $param{binary_to_source_cache}; + } my %status; my %statuses; if (defined $param{schema}) { @@ -1391,8 +1395,9 @@ sub get_bug_statuses { $status->{source} = binary_to_source(binary=>[split /\s*,\s*/, $status->{package}], source_only => 1, - exists $param{binary_to_source_cache}? - (cache =>$param{binary_to_source_cache}):(), + cache => $bin_to_src_cache, + defined $param{schema}? + (schema => $param{schema}):(), ); $status->{"package"} = 'unknown' if ($status->{"package"} eq '');