]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Common.pm
cleanup_eval_fail should match all croak messages; was missing /m
[debbugs.git] / Debbugs / Common.pm
index abc98dc6efe6f5d65191ae3f012004c4ff8891f1..6deaf4a73a400f8602fb1f601bd0371106636eb2 100644 (file)
@@ -435,11 +435,8 @@ sub __add_to_hash {
     binmode($fh,':encoding(UTF-8)');
     while (<$fh>) {
        chomp;
-        my @elements = split /\t/;
-        next unless @elements >=2;
-        # we do this because the source maintainer file contains the
-        # archive location, which we don't care about
-        my ($key,$value)=($elements[0],$elements[-1]);
+        next unless m/^(\S+)\s+(\S.*\S)\s*$/;
+        my ($key,$value)=($1,$2);
        $key = lc $key;
        $forward->{$key}= $value;
        if (defined $reverse) {
@@ -940,7 +937,7 @@ sub cleanup_eval_fail {
     # ditch the "at foo/bar/baz.pm line 5"
     $error =~ s/\sat\s\S+\sline\s\d+//;
     # ditch croak messages
-    $error =~ s/^\t+.+\n?//g;
+    $error =~ s/^\t+.+\n?//mg;
     # ditch trailing multiple periods in case there was a cascade of
     # die messages.
     $error =~ s/\.+$/\./;