From e7ea3e70155d0bea30720ba41eb6bb6742aac0d1 Mon Sep 17 00:00:00 2001 From: Ilya Zakharevich Date: Tue, 21 Jan 1997 10:26:32 +1200 Subject: patch for LWP 5.05 to make it play with both 5.003 and 5.003_20 + overload patch --- lib/diagnostics.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/diagnostics.pm') diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index b00349f7b0..05d11780ad 100644 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -326,8 +326,9 @@ EOFUNC #$lhs =~ s/\377([^\377]*)$/\Q$1\E\$/; $lhs =~ s/\377([^\377]*)$/\Q$1\E/; $lhs =~ s/\377//g; + $lhs =~ s/\.\*\?$/.*/; # Allow %s at the end to eat it all } - $transmo .= " s{^$lhs}\n {\Q$rhs\E}\n\t&& return 1;\n"; + $transmo .= " s{^$lhs}\n {\Q$rhs\E}s\n\t&& return 1;\n"; } else { $transmo .= " m{^\Q$header\E} && return 1;\n"; } @@ -506,7 +507,7 @@ sub unescape { sub shorten { my $line = $_[0]; - if (length $line > 79) { + if (length $line > 79 and index $line, "\n" == -1) { my $space_place = rindex($line, ' ', 79); if ($space_place != -1) { substr($line, $space_place, 1) = "\n\t"; -- cgit v1.2.1