summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-24 08:52:17 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-24 08:52:17 +0000
commited18d4ad1743445dc1c49d65b5a64a0c73510edd (patch)
tree208804d71c3bfa46c1bd1c681dd0609f7835e24d /perl-install/common.pm
parent33280055c72fd53c4f85db213d7415ca0a064a7e (diff)
downloaddrakx-backup-do-not-use-ed18d4ad1743445dc1c49d65b5a64a0c73510edd.tar
drakx-backup-do-not-use-ed18d4ad1743445dc1c49d65b5a64a0c73510edd.tar.gz
drakx-backup-do-not-use-ed18d4ad1743445dc1c49d65b5a64a0c73510edd.tar.bz2
drakx-backup-do-not-use-ed18d4ad1743445dc1c49d65b5a64a0c73510edd.tar.xz
drakx-backup-do-not-use-ed18d4ad1743445dc1c49d65b5a64a0c73510edd.zip
no_comment
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($) {