From e0a2a718e89f9700d627f1e6a8eea8f21d2fbeb8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 10 Mar 2019 21:56:14 +0000 Subject: tl19 perl 5.28.1 for Windows, from Siep git-svn-id: svn://tug.org/texlive/trunk@50322 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/POSIX.pod | 75 +++++++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 10 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/POSIX.pod') diff --git a/Master/tlpkg/tlperl/lib/POSIX.pod b/Master/tlpkg/tlperl/lib/POSIX.pod index d3f9e8934f7..a319b0df3a3 100644 --- a/Master/tlpkg/tlperl/lib/POSIX.pod +++ b/Master/tlpkg/tlperl/lib/POSIX.pod @@ -24,7 +24,7 @@ interfaces. This document gives a condensed list of the features available in the POSIX module. Consult your operating system's manpages for general information on most features. Consult L for functions which are noted as being -identical to Perl's builtin functions. +identical or almost identical to Perl's builtin functions. The first section describes POSIX functions from the 1003.1 specification. The second section describes some classes for signal objects, TTY objects, @@ -81,8 +81,13 @@ if the handler does not return normally (it e.g. does a C). =item C -This is identical to Perl's builtin C function, returning -the absolute value of its numerical argument. +This is identical to Perl's builtin C function, returning the absolute +value of its numerical argument (except that C must be provided +an explicit value (rather than relying on an implicit C<$_>): + + $absolute_value = POSIX::abs(42); # good + + $absolute_value = POSIX::abs(); # throws exception =item C @@ -110,8 +115,13 @@ L. =item C -This is identical to Perl's builtin C function, -either for arming or disarming the C timer. +This is identical to Perl's builtin C function, either for arming or +disarming the C timer, except that C must be provided +an explicit value (rather than relying on an implicit C<$_>): + + POSIX::alarm(3) # good + + POSIX::alarm() # throws exception =item C @@ -203,13 +213,27 @@ integer value greater than or equal to the given numerical argument. =item C -This is identical to Perl's builtin C function, allowing -one to change the working (default) directory, see L. +This is identical to Perl's builtin C function, allowing one to +change the working (default) directory -- see L -- with the +exception that C must be provided an explicit value (rather +than relying on an implicit C<$_>): + + $rv = POSIX::chdir('path/to/dir'); # good + + $rv = POSIX::chdir(); # throws exception =item C This is identical to Perl's builtin C function, allowing -one to change file and directory permissions, see L. +one to change file and directory permissions -- see L -- with +the exception that C can only change one file at a time +(rather than a list of files): + + $c = chmod 0664, $file1, $file2; # good + + $c = POSIX::chmod 0664, $file1; # throws exception + + $c = POSIX::chmod 0664, $file1, $file2; # throws exception =item C @@ -915,6 +939,14 @@ containing the current underlying locale's formatting values. Users of this fun should also read L, which provides a comprehensive discussion of Perl locale handling, including L. +Prior to Perl 5.28, or when operating in a non thread-safe environment, +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. +Windows platforms starting with Visual Studio 2005 are mostly +thread-safe, but use of this function in those prior to Visual Studio +2015 can interefere with a thread that has called +L. Here is how to query the database for the B (Deutsch or German) locale. @@ -958,7 +990,15 @@ POSIX.1-2008 and are only available on systems that support them. =item C This is identical to Perl's builtin C function for -converting seconds since the epoch to a date see L. +converting seconds since the epoch to a date see L except +that C must be provided an explicit value (rather than +relying on an implicit C<$_>): + + @localtime = POSIX::localtime(time); # good + + @localtime = localtime(); # good + + @localtime = POSIX::localtime(); # throws exception =item C @@ -1772,7 +1812,10 @@ may not check for overflow, and therefore will never set C<$!>. C respects any POSIX C C settings, regardless of whether or not it is called from Perl code that is within -the scope of S>. +the scope of S>. 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 @@ -2433,6 +2476,18 @@ C<_POSIX_TZNAME_MAX> C<_POSIX_VDISABLE> C<_POSIX_VERSION> =back +=head1 RESOURCE CONSTANTS + +Imported with the C<:sys_resource_h> tag. + +=over 8 + +=item Constants + +C C C + +=back + =head1 SYSTEM CONFIGURATION =over 8 -- cgit v1.2.3