diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-28 02:06:12 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-28 02:06:12 +0000 |
commit | 9ee2bb1a7c54b1866ff07ab9c157254810ee5205 (patch) | |
tree | c7fd211cebe3d47da94dc472d56f053f8b4a64e1 /lib/Text | |
parent | 41123dfdac2a292c8e128568f2262a373b14c931 (diff) | |
download | perl-9ee2bb1a7c54b1866ff07ab9c157254810ee5205.tar.gz |
Retract #8552.
p4raw-id: //depot/perl@8573
Diffstat (limited to 'lib/Text')
-rw-r--r-- | lib/Text/Wrap.pm | 16 |
1 files changed, 1 insertions, 15 deletions
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) = @_; |