summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm23
1 files changed, 14 insertions, 9 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index ca6d9840d..78533befc 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -173,18 +173,23 @@ sub untranslate($@) {
}
sub warp_text($;$) {
- my ($text, $width) = shift;
+ my ($text, $width) = @_;
$width ||= 80;
-
- my ($t, @l); foreach (split /\s+/, $text) {
- if (length "$t $_" > $width) {
- push @l, $t;
- $t = $_;
- } else {
- $t = "$t $_";
+
+ my @l;
+ foreach (split "\n", $text) {
+ my $t;
+ foreach (split /\s+/, $_) {
+ if (length "$t $_" > $width) {
+ push @l, $t;
+ $t = $_;
+ } else {
+ $t = "$t $_";
+ }
}
+ push @l, $t;
}
- @l, $t;
+ @l;
}
sub getVarsFromSh($) {