commit:     7ffc6634affc64903348544808bd286d4fc5d989
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Oct 13 04:52:47 2025 +0000
Commit:     Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Mon Oct 13 04:52:47 2025 +0000
URL:        https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=7ffc6634

Simplify the can_run() subroutine

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 locale-gen | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/locale-gen b/locale-gen
index d050490..2465cb2 100644
--- a/locale-gen
+++ b/locale-gen
@@ -690,8 +690,7 @@ sub has_mount_option ($target, $option) {
 }
 
 sub can_run ($bin) {
-       my @paths = path();
-       return any(sub { -f $_ && -x _ }, map +( "$_/$bin" ), @paths);
+       return any(sub { -f "$_/$bin" && -x _ }, path());
 }
 
 END {

Reply via email to