From 9ee2bb1a7c54b1866ff07ab9c157254810ee5205 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 28 Jan 2001 02:06:12 +0000 Subject: Retract #8552. p4raw-id: //depot/perl@8573 --- lib/Text/Wrap.pm | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'lib/Text') diff --git a/lib/Text/Wrap.pm b/lib/Text/Wrap.pm index 9241dfc7d3..04efe19296 100644 --- a/lib/Text/Wrap.pm +++ b/lib/Text/Wrap.pm @@ -25,9 +25,7 @@ sub wrap my ($ip, $xp, @t) = @_; my $r = ""; - - my $t = _linearize(@t); - + my $t = expand(join(" ",@t)); my $lead = $ip; my $ll = $columns - length(expand($ip)) - 1; my $nll = $columns - length(expand($xp)) - 1; @@ -63,18 +61,6 @@ sub wrap return $r; } -sub _linearize { - my @lines = expand(@_); - - # Join the lines together, adding in extra whitespace only where needed - # to keep words seperated. - my $text = join "", map { /\s+\Z/ ? $_ : $_.' ' } @lines[0..$#lines-1]; - $text .= $lines[-1]; - - return $text; -} - - sub fill { my ($ip, $xp, @raw) = @_; -- cgit v1.2.1