summaryrefslogtreecommitdiffstats
path: root/perl-install/common.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-13 14:36:52 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-13 14:36:52 +0000
commit643921ac883be8af9dad01e441028d3564aea565 (patch)
tree0e72b712472030c8522ef0606147e4e8968cc8a5 /perl-install/common.pm
parente03f94cb575827ae939c90132604ee5af8545b7a (diff)
downloaddrakx-backup-do-not-use-643921ac883be8af9dad01e441028d3564aea565.tar
drakx-backup-do-not-use-643921ac883be8af9dad01e441028d3564aea565.tar.gz
drakx-backup-do-not-use-643921ac883be8af9dad01e441028d3564aea565.tar.bz2
drakx-backup-do-not-use-643921ac883be8af9dad01e441028d3564aea565.tar.xz
drakx-backup-do-not-use-643921ac883be8af9dad01e441028d3564aea565.zip
no_comment
Diffstat (limited to 'perl-install/common.pm')
-rw-r--r--perl-install/common.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 77567726a..449efb922 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -116,6 +116,7 @@ sub translate {
my ($s) = @_;
unless (defined %po::I18N::I18N) {
if (my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2)) {
+ local $@;
local $SIG{__DIE__} = 'none';
eval { require "po/$lang.pm" };
}
@@ -133,12 +134,13 @@ sub warp_text($;$) {
my ($text, $width) = shift;
$width ||= 80;
- my ($t, @l); foreach (split /(\s+)/, $text) {
- if (length "$t$_" > $width) {
+ my ($t, @l); foreach (split /\s+/, $text) {
+ if (length "$t $_" > $width) {
push @l, $t;
- $t = '';
+ $t = $_;
+ } else {
+ $t = "$t $_";
}
- $t .= $_;
}
@l, $t;
}