diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 13:22:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-07 13:22:28 +0000 |
commit | c2f200920f04dba0874c054038770a91a71fbba5 (patch) | |
tree | 7448485cea94afcd511535b592b1f061c543f3b9 /perl-install/standalone/drakfont | |
parent | 0a813b0ea3c7c30ca81e79b6303f5141e95fee4b (diff) | |
download | drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.gz drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.bz2 drakx-c2f200920f04dba0874c054038770a91a71fbba5.tar.xz drakx-c2f200920f04dba0874c054038770a91a71fbba5.zip |
use "if any" instead of "if grep", and various other occurences of "any", "every", "partition"
Diffstat (limited to 'perl-install/standalone/drakfont')
-rwxr-xr-x | perl-install/standalone/drakfont | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 9449bc97d..959b4b055 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -243,7 +243,7 @@ sub search_windows_font { return 0; } } - !$replace && grep(/$i/, @installed_fonts) and next; + !$replace && any { /$i/ } @installed_fonts and next; grep (/$i$/, @font_list) or push @font_list, "$win_dir/$_->[1]/fonts/$i"; } @@ -285,8 +285,7 @@ sub search_dir_font { if (is_a_font($i)) { push @font_list_tmp, "$i"; foreach my $i (@font_list_tmp) { - !$replace && grep(/$i/, @installed_fonts) - and next; + !$replace && any { /$i/ } @installed_fonts and next; grep /$i/, @font_list or push @font_list, "$fn/$i"; } } @@ -294,7 +293,7 @@ sub search_dir_font { } else { if (is_a_font($fn)) { - !$replace && grep(/$fn/, @installed_fonts) and next; + !$replace && any { /$fn/ } @installed_fonts and next; !grep /$fn/, (@installed_fonts) and push @font_list, "$fn"; } } |