From: Abigail Date: Thu, 23 May 2002 07:53:33 +0000 (-0700) Subject: Re: [ID 20020523.001] POSIX::sleep not POSIX compliant X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ab27a20d8a21f3a809f28b58523b172cd26afd8;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20020523.001] POSIX::sleep not POSIX compliant Message-ID: <20020523075333.A14658@ucan.foad.org> p4raw-id: //depot/perl@16752 --- diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index b94de21..05634f0 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -720,7 +720,7 @@ sub setvbuf { sub sleep { usage "sleep(seconds)" if @_ != 1; - CORE::sleep($_[0]); + $_[0] - CORE::sleep($_[0]); } sub unlink { diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod index 4544a09..786df4c 100644 --- a/ext/POSIX/POSIX.pod +++ b/ext/POSIX/POSIX.pod @@ -1145,9 +1145,12 @@ See also L. =item sleep -This is identical to Perl's builtin C function -for suspending the execution of the current for process -for certain number of seconds, see L. +This is functionally identical to Perl's builtin C function +for suspending the execution of the current for process for certain +number of seconds, see L. There is one signifanct +difference, however: C returns the number or +B seconds, while the C returns the +number of slept seconds. =item sprintf diff --git a/pod/perldelta.pod b/pod/perldelta.pod index f0e5356..bb7842d 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -513,6 +513,12 @@ my __PACKAGE__ $obj now works. =item * +POSIX::sleep() now returns the number of I seconds +(as thex POSIX standard says), as opposed to CORE::sleep() which +returns the number of slept seconds. + +=item * + The printf() and sprintf() now support parameter reordering using the C<%\d+\$> and C<*\d+\$> syntaxes. For example