From 643921ac883be8af9dad01e441028d3564aea565 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 13 Aug 1999 14:36:52 +0000 Subject: no_comment --- perl-install/common.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install/common.pm') 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; } -- cgit v1.2.1