diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-05 10:49:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-01-05 10:49:10 +0000 |
commit | c26abfa67c922434b29d744d55d428c8f0071e23 (patch) | |
tree | b78c0284540effd6a2453cf8ff8637304154eabc | |
parent | 8feb4e9f33850f8c93443f87f3039b93e7d666e1 (diff) | |
download | perl-c26abfa67c922434b29d744d55d428c8f0071e23.tar.gz |
Reword the setlocale() 1-arg case better.
p4raw-id: //depot/cfgperl@2561
-rw-r--r-- | ext/POSIX/POSIX.pod | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod index 6a4a61aca6..7b21810567 100644 --- a/ext/POSIX/POSIX.pod +++ b/ext/POSIX/POSIX.pod @@ -847,31 +847,35 @@ setjmp() is C-specific: use eval {} instead. =item setlocale -Modifies and queries program's locale. +Modifies and queries program's locale. The following examples assume + + use POSIX qw(setlocale LC_ALL LC_CTYPE); + +has been issued. The following will set the traditional UNIX system locale behavior (the second argument C<"C">). - $loc = POSIX::setlocale( &POSIX::LC_ALL, "C" ); + $loc = setlocale( LC_ALL, "C" ); -The following will query (the missing second argument) the current -LC_CTYPE category. +The following will query the current LC_CTYPE category. (No second +argument means 'query'.) - $loc = POSIX::setlocale( &POSIX::LC_CTYPE); + $loc = setlocale( LC_CTYPE ); The following will set the LC_CTYPE behaviour according to the locale environment variables (the second argument C<"">). Please see your systems L<setlocale(3)> documentation for the locale environment variables' meaning or consult L<perllocale>. - $loc = POSIX::setlocale( &POSIX::LC_CTYPE, ""); + $loc = setlocale( LC_CTYPE, "" ); The following will set the LC_COLLATE behaviour to Argentinian Spanish. B<NOTE>: The naming and availability of locales depends on your operating system. Please consult L<perllocale> for how to find out which locales are available in your system. - $loc = POSIX::setlocale( &POSIX::LC_ALL, "es_AR.ISO8859-1" ); + $loc = setlocale( LC_ALL, "es_AR.ISO8859-1" ); =item setpgid |