diff options
author | Tony Cook <tony@develop-help.com> | 2020-11-03 14:03:32 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2020-11-03 14:03:32 +1100 |
commit | a3e693309fe5a17301c8ed638cbf3cdfee7253bc (patch) | |
tree | 1472d7bca4c67bea5340e74e6fcf6e5daa70aae4 /t/loc_tools.pl | |
parent | 5f7a2573adf235745587e5ca142987542502f760 (diff) | |
download | perl-a3e693309fe5a17301c8ed638cbf3cdfee7253bc.tar.gz |
don't read DATA when it is closed
This has been producing noise for a while, but some recent change
meant it started some warning tests failing.
Diffstat (limited to 't/loc_tools.pl')
-rw-r--r-- | t/loc_tools.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl index 57e4b2a65a..a87e7f63d3 100644 --- a/t/loc_tools.pl +++ b/t/loc_tools.pl @@ -13,6 +13,7 @@ use Config; use strict; use warnings; +use feature 'state'; eval { require POSIX; import POSIX 'locale_h'; }; my $has_locale_h = ! $@; @@ -446,7 +447,8 @@ sub find_locales ($;$) { } # The rest of the locales are in this file. - push @Data, <DATA>; close DATA; + state @my_data = <DATA>; close DATA if fileno DATA; + push @Data, @my_data; foreach my $line (@Data) { chomp $line; |