This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
loc_tools.pl: Simplify an expression
authorKarl Williamson <khw@cpan.org>
Mon, 16 Nov 2020 15:52:59 +0000 (08:52 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 16 Nov 2020 16:21:17 +0000 (09:21 -0700)
Suggested by Graham Knop

t/loc_tools.pl

index a87e7f6..15f5448 100644 (file)
@@ -322,7 +322,8 @@ sub locales_enabled(;$) {
         if ($has_LC_ALL) {
             push @categories_numbers, $category_number{'ALL'};
         }
-        $_[0]->@* = @categories_numbers;
+
+        @$categories_ref = @categories_numbers;
     }
 
     return 1;