diff options
author | Karl Williamson <khw@cpan.org> | 2017-11-14 21:33:43 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-11-14 21:52:07 -0700 |
commit | aa2bc4d385298947b20667efc390d3182feaebe1 (patch) | |
tree | bd9e3574b60db410ca3b122fb3befe0b2f42f2bf /ext/POSIX/lib/POSIX.pod | |
parent | 5579633cf51e50d6cd8e79c7c2593fbd06d39b67 (diff) | |
download | perl-aa2bc4d385298947b20667efc390d3182feaebe1.tar.gz |
POSIX.pod: Add cautions about locale use
Diffstat (limited to 'ext/POSIX/lib/POSIX.pod')
-rw-r--r-- | ext/POSIX/lib/POSIX.pod | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod index 0d7a1a0809..712132bd57 100644 --- a/ext/POSIX/lib/POSIX.pod +++ b/ext/POSIX/lib/POSIX.pod @@ -939,6 +939,9 @@ containing the current underlying locale's formatting values. Users of this fun should also read L<perllocale>, which provides a comprehensive discussion of Perl locale handling, including L<a section devoted to this function|perllocale/The localeconv function>. +It should not be used in a threaded application unless it's certain that +the underlying locale is C or POSIX. This is because it otherwise +changes the locale, which globally affects all threads simultaneously. Here is how to query the database for the B<de> (Deutsch or German) locale. @@ -1804,7 +1807,10 @@ may not check for overflow, and therefore will never set C<$!>. C<strtod> respects any POSIX C<setlocale()> C<LC_TIME> settings, regardless of whether or not it is called from Perl code that is within -the scope of S<C<use locale>>. +the scope of S<C<use locale>>. This means it should not be used in a +threaded application unless it's certain that the underlying locale is C +or POSIX. This is because it otherwise changes the locale, which +globally affects all threads simultaneously. To parse a string C<$str> as a floating point number use |