commit:     1ff7d7b64958183748526fa221a1263ab02b5a91
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Aug 16 03:43:54 2025 +0000
Commit:     Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Sat Aug 16 03:43:54 2025 +0000
URL:        https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=1ff7d7b6

mkconfig: don't operate on refs of $language and $territory

Presently, the map_locale_attributes() subroutine creates references of
the $language and $territory variables, so as to be able to loop over -
and operate on - both. Yet one need not bother, since the for keyword
renders the topicaliser a temporary alias of each item in the list.

See-also: 87b724f3b5bf14ade06d3a15123e08677d05efbe
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 mkconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mkconfig b/mkconfig
index 4397ca3..5e54dbb 100755
--- a/mkconfig
+++ b/mkconfig
@@ -78,9 +78,9 @@ sub map_locale_attributes ($prefix) {
                my $data = read_binary("$top/$locale");
                if ($data =~ $regex) {
                        my ($language, $territory) = ($1, ucfirst $2);
-                       for my $ref (\$language, \$territory) {
-                               if ($ref->$* =~ m/[^\p{ASCII}]/) {
-                                       $ref->$* = to_ascii($ref->$*);
+                       for ($language, $territory) {
+                               if (m/[^\p{ASCII}]/) {
+                                       $_ = to_ascii($_);
                                }
                        }
                        for ($territory) {

Reply via email to