This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
loc_tools.pl: Cache results
Some of the functions in this file are slow, because it speculatively
tries various potential somewhat commonly-encountered locales to see
which ones actually work on this platform.
On many boxes, much of the potential list can be quickly gathered from a
call to a system command, but on other platforms, including Windows, the
list comes from trying all the possibilities in the <DATA> section of
the file, including permutations.
And the determination that each locale actually works takes time.
So this commit caches the list of available locales it finds, avoiding
doing all this work again if the calling test program calls it again.