summaryrefslogtreecommitdiff
path: root/lib/diagnostics.pm
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.ohio-state.edu>1997-01-21 10:26:32 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-25 15:58:00 +1200
commite7ea3e70155d0bea30720ba41eb6bb6742aac0d1 (patch)
treeeced55218bc1fc8626006cea8162ac9db29e39f1 /lib/diagnostics.pm
parent9e3a2af888982d0a201149cbcdbf3feb6771acb4 (diff)
downloadperl-e7ea3e70155d0bea30720ba41eb6bb6742aac0d1.tar.gz
patch for LWP 5.05 to make it play with both 5.003 and 5.003_20 + overload patch
Diffstat (limited to 'lib/diagnostics.pm')
-rw-r--r--lib/diagnostics.pm5
1 files changed, 3 insertions, 2 deletions
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";