diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-02-24 11:56:47 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-02-24 22:38:05 -0700 |
commit | 5b1f18a75ba6ee80f801b8f8226103f1495701fa (patch) | |
tree | 79d9dcd310aafef1752ce6f3812873f8d9d3f49f /lib/locale.t | |
parent | ecb4de39577c95734821743685366f6fe7f59a2d (diff) | |
download | perl-5b1f18a75ba6ee80f801b8f8226103f1495701fa.tar.gz |
lib/locale.t: Change an array to a hash
This is more naturally a hash in that it is a list of numbers, not
necessarily consecutive, and each time through the loop the same number
was getting pushed, so had multiple entries for each by the time it was
finished.
Diffstat (limited to 'lib/locale.t')
-rw-r--r-- | lib/locale.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/locale.t b/lib/locale.t index 42dde69fdb..ae92eec8f4 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -41,7 +41,7 @@ my $acceptable_fold_failure_percentage = ($^O =~ / ^ ( MSWin32 | AIX ) $ /ix) : 5; # The list of test numbers of the problematic tests. -my @problematical_tests; +my %problematical_tests; use Dumpvalue; @@ -1342,7 +1342,7 @@ foreach my $Locale (@Locale) { report_multi_result($Locale, $locales_test_number, \@f); foreach ($first_casing_test_number..$locales_test_number) { - push @problematical_tests, $_; + $problematical_tests{$_} = 1; } @@ -1841,7 +1841,7 @@ foreach my $Locale (@Locale) { } } report_multi_result($Locale, $locales_test_number, \@f); - push @problematical_tests, $locales_test_number; + $problematical_tests{$locales_test_number} = 1; } # [perl #109318] @@ -1894,7 +1894,7 @@ foreach $test_num ($first_locales_test_number..$final_locales_test_number) { print "# It usually indicates a problem in the environment,\n"; print "# not in Perl itself.\n"; } - if ($Okay{$test_num} && grep { $_ == $test_num } @problematical_tests) { + if ($Okay{$test_num} && grep { $_ == $test_num } keys %problematical_tests) { no warnings 'experimental::autoderef'; # Round to nearest .1% my $percent_fail = (int(.5 + (1000 * scalar(keys $Problem{$test_num}) |