File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,21 @@ XXX Remove this section if F<Porting/corelist-perldelta.pl> did not add any cont
125125
126126=item *
127127
128- L<XXX > has been upgraded from version A.xx to B.yy .
128+ L<Time::HiRes > has been upgraded from version 1.9778 to 1.9779 .
129129
130- XXX If there was something important to note about this change, include that here.
130+ The subsecond-resolution C<sleep> function provided by L<Time::HiRes> now has
131+ the same prototype as perl's built-in L<sleep function|perlfunc/sleep>. This
132+ means it now requires a scalar argument, not a list, just like C<CORE::sleep>:
133+
134+ use Time::HiRes qw(sleep);
135+
136+ sleep(1, "foo", "bar"); # Syntax error.
137+ # It used to silently ignore the extra arguments.
138+
139+ my @t = 42;
140+ sleep @t;
141+ # Evaluates @t in scalar context (giving the number of elements)
142+ # and sleeps for one second. It used to sleep for 42 seconds.
131143
132144=back
133145
You can’t perform that action at this time.
0 commit comments