From eff080fb9dc7c676c56b42df866336e65fd1ff64 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 14 Jun 2007 14:58:02 +0100 Subject: [PATCH] * Fix undefined name issues in Debbugs::Estraier * Properly extract the bug message --- Debbugs/Estraier.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Debbugs/Estraier.pm b/Debbugs/Estraier.pm index 47457f2..f169926 100644 --- a/Debbugs/Estraier.pm +++ b/Debbugs/Estraier.pm @@ -33,7 +33,7 @@ use Debbugs::Log; #use Params::Validate; use Search::Estraier; use Date::Manip; -use Debbugs::Common qw(getbuglocation getbugcomponent); +use Debbugs::Common qw(getbuglocation getbugcomponent make_list); use Debbugs::Status qw(readbug); use Debbugs::MIME qw(parse); @@ -121,7 +121,7 @@ sub add_bug_message{ $doc = new Search::Estraier::Document if not defined $doc; my $message = parse($bug_message); - $doc->add_text(join('',values %{$message})); + $doc->add_text(join('',make_list(values %{$message}))); # * @id : the ID number determined automatically when the document is registered. # * @uri : the location of a document which any document should have. @@ -140,17 +140,17 @@ sub add_bug_message{ my @attr = qw(status subject date submitter package tags severity); # parse the date my ($date) = $bug_message =~ /^Date:\s+(.+?)\s*$/mi; - $doc->add_attr('@cdate' => $date); + $doc->add_attr('@cdate' => $date) if defined $date; # parse the title my ($subject) = $bug_message =~ /^Subject:\s+(.+?)\s*$/mi; - $doc->add_attr('@title' => $subject); + $doc->add_attr('@title' => $subject) if defined $subject; # parse the author my ($author) = $bug_message =~ /^From:\s+(.+?)\s*$/mi; - $doc->add_attr('@author' => $author); + $doc->add_attr('@author' => $author) if defined $author; # create the uri $doc->add_attr('@uri' => $uri); foreach my $attr (@attr) { - $doc->add_attr($attr => $status->{$attr}); + $doc->add_attr($attr => $status->{$attr}) if defined $status->{$attr}; } print STDERR "adding $uri\n" if $DEBUG; # Try a bit harder if estraier is returning timeouts -- 2.39.2