diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-12 15:44:07 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-12 15:44:07 +0000 |
commit | 19051cd51e0c7c13012869a6e7645df8a2119089 (patch) | |
tree | fc0c07da91ce8d71a0701ad9e9292d4fa6aa815e | |
parent | c7b16f7f897ab6b2da997faa3c422d688e1774fc (diff) | |
download | drakx-19051cd51e0c7c13012869a6e7645df8a2119089.tar drakx-19051cd51e0c7c13012869a6e7645df8a2119089.tar.gz drakx-19051cd51e0c7c13012869a6e7645df8a2119089.tar.bz2 drakx-19051cd51e0c7c13012869a6e7645df8a2119089.tar.xz drakx-19051cd51e0c7c13012869a6e7645df8a2119089.zip |
use matched values only if matching did success
-rw-r--r-- | perl-install/any.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index b03ee9691..a2b674f01 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -633,7 +633,7 @@ sub selectLanguage { $lang = first(lang::l2location($lang))."|$lang"; my %name2l = map { lang::l2name($_) => $_ } lang::list_langs(); - my $listval2val = sub { $_[0] =~ /\|(.*)/; $1 }; + my $listval2val = sub { $1 if $_[0] =~ /\|(.*)/ }; my @langs = map { my $l = $_; map { [ "$_|$l", $_, $l ] } lang::l2location($l) } lang::list_langs(); #- since gtk version will use images (function image2f) we need to sort differently @@ -649,7 +649,7 @@ when your installation is complete and you restart your system.")), $in->ask_from_($common, [ { val => \$lang, separator => '|', if_($using_images, image2f => sub { $name2l{$_[0]} =~ /^[a-z]/ ? ('', "langs/lang-$name2l{$_[0]}") : $_[0] }), - format => sub { $_[0] =~ /(.*\|)(.*)/; $1.lang::l2name($2) }, + format => sub { $1.lang::l2name($2) if $_[0] =~ /(.*\|)(.*)/ }, list => \@langs, sort => 0 }, if_($langs_, if_($::isInstall, { val => \$in->{locale}{utf8}, type => 'bool', text => N("Use Unicode by default"), advanced => 1 }), |