From 6e36e5d6b1d55a4a3bc3796c11e6d306a72d139f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 17 Jun 2004 23:50:45 +0000 Subject: kill warnings --- perl-install/lang.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install/lang.pm') diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 5695022ab..c1371ecf9 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -904,7 +904,7 @@ sub system_locales_to_ourlocale { $h->{main}; $locale->{lang} .= '@' . $h->{variant} if $h->{variant}; $locale->{country} = analyse_locale_name($locale_country)->{country}; - $locale->{utf8} = $h->{encoding} eq 'UTF-8'; + $locale->{utf8} = $h->{encoding} && $h->{encoding} eq 'UTF-8'; #- safe fallbacks $locale->{lang} ||= 'en_US'; $locale->{country} ||= 'US'; @@ -913,6 +913,7 @@ sub system_locales_to_ourlocale { sub read { my ($prefix, $user_only) = @_; + $prefix ||= ""; my ($f1, $f2) = ("$prefix$ENV{HOME}/.i18n", "$prefix/etc/sysconfig/i18n"); my %h = getVarsFromSh($user_only && -e $f1 ? $f1 : $f2); system_locales_to_ourlocale($h{LC_MESSAGES} || 'en_US', $h{LC_MONETARY} || 'en_US'); -- cgit v1.2.1