This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add new release to perlhist
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
8424e368 5perldelta - what is new for perl v5.31.1
d407e309 6
862f380b 7=head1 DESCRIPTION
261e14b0 8
8424e368 9This document describes differences between the 5.31.0 release and the 5.31.1
862f380b 10release.
261e14b0 11
8424e368
S
12If you are upgrading from an earlier release such as 5.30.0, first read
13L<perl5310delta>, which describes differences between 5.30.0 and 5.31.0.
14
8424e368
S
15=head1 Incompatible Changes
16
54e2fcd9 17=head2 Use of L<C<vec>|perlfunc/vec EXPR,OFFSET,BITS> on strings with code points above 0xFF is forbidden
8424e368 18
54e2fcd9
KE
19Such strings are represented internally in UTF-8, and C<vec> is a
20bit-oriented operation that will likely give unexpected results on those
21strings. This was deprecated in perl 5.28.0.
8424e368 22
0240db1e
KE
23=head2 Use of code points over 0xFF in string bitwise operators
24
25Some uses of these were already illegal after a previous deprecation
26cycle. The remaining uses are now prohibited, having been deprecated in perl
275.28.0. See L<perldeprecation>.
28
53f11efa
KE
29=head2 C<Sys::Hostname::hostname()> does not accept arguments
30
31This usage was deprecated in perl 5.28.0 and is now fatal.
32
862f380b 33=head1 Modules and Pragmata
d407e309 34
a0348300 35=head2 Updated Modules and Pragmata
8424e368 36
a0348300 37=over 4
8424e368 38
a0348300 39=item *
8424e368 40
a0348300 41L<Class::Struct> has been upgraded from version 0.65 to 0.66.
8424e368 42
a0348300
KE
43=item *
44
45L<Compress::Raw::Bzip2> has been upgraded from version 2.084 to 2.086.
8424e368
S
46
47=item *
48
a0348300 49L<Compress::Raw::Zlib> has been upgraded from version 2.084 to 2.086.
8424e368 50
a0348300 51=item *
8424e368 52
a0348300 53L<CPAN> has been upgraded from version 2.22 to 2.27.
7b97bf55 54
a0348300
KE
55=item *
56
57L<DB_File> has been upgraded from version 1.843 to 1.852.
58
59=item *
60
61L<Devel::PPPort> has been upgraded from version 3.52 to 3.53.
62
63=item *
64
65L<ExtUtils::CBuilder> has been upgraded from version 0.280231 to 0.280232.
66
67=item *
68
69L<ExtUtils::MakeMaker> has been upgraded from version 7.34 to 7.36.
70
71=item *
72
73L<I18N::LangTags> has been upgraded from version 0.43 to 0.44.
7b97bf55 74
9409f532 75=item *
7b97bf55 76
cc1cbb06
TC
77L<IO> has been upgraded from version 1.40 to 1.41.
78
da1830f5 79The supplied I<TO> is now always honoured on calls to the send()
a0348300
KE
80method. L<[perl #133936]|https://rt.perl.org/Ticket/Display.html?id=133936>
81
82=item *
83
470f8a35 84L<IO::Compress> has been upgraded from version 2.084 to 2.086.
a0348300
KE
85
86=item *
87
88L<Module::CoreList> has been upgraded from version 5.20190524 to 5.20190620.
89
90=item *
91
92L<overload> has been upgraded from version 1.30 to 1.31.
93
94=item *
95
96L<Pod::Simple> has been upgraded from version 3.36 to 3.38.
97
98=item *
99
100L<podlators> has been upgraded from version 4.11 to 4.12.
101
102=item *
103
104L<POSIX> has been upgraded from version 1.88 to 1.89.
105
106=item *
107
108L<SelfLoader> has been upgraded from version 1.25 to 1.26.
cc1cbb06
TC
109
110=item *
111
a04f48a5 112L<Storable> has been upgraded from version 3.15 to 3.16.
8424e368 113
a04f48a5
TC
114Regular expressions objects weren't properly counted for object id
115purposes on retrieve. This would corrupt the resulting structure, or
a0348300
KE
116cause a runtime error in some cases. L<[perl #134179]|https://rt.perl.org/Ticket/Display.html?id=134179>
117
118=item *
119
120L<Sys::Hostname> has been upgraded from version 1.22 to 1.23.
121
122=item *
123
124L<Test::Simple> has been upgraded from version 1.302162 to 1.302164.
125
126=item *
127
128L<Tie::File> has been upgraded from version 1.02 to 1.03.
129
130=item *
131
132L<Tie::Hash::NamedCapture> has been upgraded from version 0.10 to 0.11.
133
134=item *
135
136L<Time::HiRes> has been upgraded from version 1.9760 to 1.9761.
137
138=item *
139
140L<Unicode::Normalize> has been upgraded from version 1.26 to 1.27.
141
142=item *
143
144L<Unicode::UCD> has been upgraded from version 0.72 to 0.73.
145
146=item *
147
148L<warnings> has been upgraded from version 1.44 to 1.45.
149
150=item *
151
152L<XS::APItest> has been upgraded from version 1.00 to 1.01.
8424e368
S
153
154=back
155
156=head2 Removed Modules and Pragmata
157
158=over 4
159
160=item *
161
c57372c9 162Pod::Parser has been removed from the core distribution.
a0348300
KE
163It still is available for download from CPAN. This resolves L<[perl
164#119439]|https://rt.perl.org/Ticket/Display.html?id=119439>.
8424e368
S
165
166=back
167
168=head1 Documentation
169
8424e368
S
170=head2 Changes to Existing Documentation
171
172We have attempted to update the documentation to reflect the changes
173listed in this document. If you find any we have missed, send email
174to L<perlbug@perl.org|mailto:perlbug@perl.org>.
175
8424e368
S
176Additionally, the following selected changes have been made:
177
860a458f
KE
178=head3 L<perlguts>
179
180=over 4
181
182=item *
183
184Documentation about embed.fnc flags has been removed. F<embed.fnc> now has
185sufficient comments within it. Anyone changing that file will see those
186comments first, so entries here are now redundant.
187
188=back
189
aee7952a 190=head3 L<perlpod>
8424e368
S
191
192=over 4
d407e309 193
d407e309
S
194=item *
195
a0348300 196Advice has been added regarding the usage of C<< ZE<lt>E<gt> >>.
8424e368
S
197
198=back
199
8424e368
S
200=head1 Configuration and Compilation
201
8424e368
S
202=over 4
203
204=item *
205
e38204e0
KE
206F<autodoc.pl>
207
208This tool that regenerates L<perlintern> and L<perlapi> has been overhauled
209significantly, restoring consistency in flags used in F<embed.fnc> and
210L<Devel::PPPort> and allowing removal of many redundant C<=for apidoc>
211entries in code.
8424e368
S
212
213=back
214
8424e368
S
215=head1 Platform Support
216
8424e368
S
217=head2 Discontinued Platforms
218
8424e368
S
219=over 4
220
2b8a1552 221=item Windows CE
8424e368 222
2b8a1552 223Support for building perl on Windows CE has now been removed.
8424e368
S
224
225=back
226
8424e368
S
227=head1 Internal Changes
228
8424e368
S
229=over 4
230
231=item *
232
fb55ce6b 233L<eval_pv()|perlapi/eval_pv> no longer stringifies the exception when
a0348300 234C<croak_on_error> is true. L<[perl #134175]|https://rt.perl.org/Ticket/Display.html?id=134175>
8424e368
S
235
236=back
237
238=head1 Selected Bug Fixes
239
8424e368
S
240=over 4
241
242=item *
243
09b83c41 244Setting C<$)> now properly sets supplementary group ids if you have
a0348300 245the necessary privileges. L<[perl #134169]|https://rt.perl.org/Ticket/Display.html?id=134169>
b9d9f9ab
TC
246
247=item *
248
fd0b39e2
TC
249close() on a pipe now preemptively clears the PerlIO object from the
250IO SV. This prevents a second attempt to close the already closed
251PerlIO object if a signal handler calls die() or exit() while close()
a0348300 252is waiting for the child process to complete. L<[perl #122112]|https://rt.perl.org/Ticket/Display.html?id=122112>
8424e368 253
ddf10889
TC
254=item *
255
256C<< sprintf("%.*a", -10000, $x) >> would cause a buffer overflow due
a0348300 257to mishandling of the negative precision value. L<[perl #134008]|https://rt.perl.org/Ticket/Display.html?id=134008>
ddf10889 258
755e4cab
TC
259=item *
260
261scalar() on a reference could cause an erroneous assertion failure
a0348300 262during compilation. L<[perl #134045]|https://rt.perl.org/Ticket/Display.html?id=134045>
755e4cab 263
fef47ada
TC
264=item *
265
09b83c41 266C<%{^CAPTURE_ALL}> is now an alias to C<%-> as documented, rather than
a0348300 267incorrectly an alias for C<%+>. L<[perl #131867]|https://rt.perl.org/Ticket/Display.html?id=131867>
09b83c41
TC
268
269=item *
270
271C<%{^CAPTURE}> didn't work if C<@{^CAPTURE}> was mentioned first.
ee45064d 272Similarly for C<%{^CAPTURE_ALL}> and C<@{^CAPTURE_ALL}>, though
a0348300 273C<@{^CAPTURE_ALL}> currently isn't used. L<[perl #131193]|https://rt.perl.org/Ticket/Display.html?id=131193>
09b83c41
TC
274
275=item *
276
fef47ada
TC
277Extraordinarily large (over 2GB) floating point format widths could
278cause an integer overflow in the underlying call to snprintf(),
279resulting in an assertion. Formatted floating point widths are now
a0348300
KE
280limited to the range of int, the return value of snprintf(). L<[perl
281#133913]|https://rt.perl.org/Ticket/Display.html?id=133913>
fef47ada 282
4ec3954c
TC
283=item *
284
285Parsing the following constructs within a sub-parse (such as with
286C<"${code here}"> or C<s/.../code here/e>) has changed to match how
287they're parsed normally:
288
289=over
290
291=item *
292
293C<print $fh ...> no longer produces a syntax error.
294
295=item *
296
297Code like C<s/.../ ${time} /e> now properly produces an "Ambiguous use
298of ${time} resolved to $time at ..." warning when warnings are enabled.
299
300=item *
301
302C<@x {"a"}> (with the space) in a sub-parse now properly produces a
303"better written as" warning when warnings are enabled.
304
305=item *
306
307attributes can now be used in a sub-parse.
308
309=back
310
a0348300 311L<[perl #133850]|https://rt.perl.org/Ticket/Display.html?id=133850>
4ec3954c 312
2dd5ef16
TC
313=item *
314
315Incomplete hex and binary literals like C<0x> and C<0b> are now
a0348300
KE
316treated as if the C<x> or C<b> is part of the next token. L<[perl
317#134125]|https://rt.perl.org/Ticket/Display.html?id=134125>
2dd5ef16 318
5b2f1ba6
TC
319=item *
320
321A spurious C<)> in a subparse, such as in C<s/.../code here/e> or
322C<"...${code here}">, no longer confuses the parser.
323
324Previously a subparse was bracketed with generated C<(> and C<)>
325tokens, so a spurious C<)> would close the construct without doing the
326normal subparse clean up, confusing the parser and possible causing an
327assertion failure.
328
329Such constructs are now surrounded by artificial tokens that can't be
a0348300 330included in the source. L<[perl #130585]|https://rt.perl.org/Ticket/Display.html?id=130585>
5b2f1ba6 331
0367cc1a
TC
332=item *
333
334Reference assignment of a sub, such as C<\&foo = \&bar;>, silently did
a0348300 335nothing in the C<main::> package. L<[perl #134072]|https://rt.perl.org/Ticket/Display.html?id=134072>
0367cc1a 336
84ab3b69
TC
337=item *
338
339sv_gets() now recovers better if the target SV is modified by a signal
a0348300 340handler. L<[perl #134035]|https://rt.perl.org/Ticket/Display.html?id=134035>
84ab3b69 341
fa068f6d
TC
342=item *
343
344C<readline @foo> now evaluates C<@foo> in scalar context. Previously
345it would be evalauted in list context, and since readline() pops only
346one argument from the stack, the stack could underflow, or be left
a0348300 347with unexpected values on the stack. L<[perl #133989]|https://rt.perl.org/Ticket/Display.html?id=133989>
fa068f6d 348
8424e368
S
349=back
350
8424e368
S
351=head1 Acknowledgements
352
a0348300
KE
353Perl 5.31.1 represents approximately 4 weeks of development since Perl
3545.31.0 and contains approximately 37,000 lines of changes across 500 files
355from 20 authors.
356
357Excluding auto-generated files, documentation and release tools, there were
358approximately 19,000 lines of changes to 340 .pm, .t, .c and .h files.
359
360Perl continues to flourish into its fourth decade thanks to a vibrant
361community of users and developers. The following people are known to have
362contributed the improvements that became Perl 5.31.1:
363
364Alexandr Savca, Andreas König, Chris 'BinGOs' Williams, Dagfinn Ilmari
365Mannsåker, Dominic Hargreaves, Graham Knop, Hugo van der Sanden, James E
366Keenan, Jerome Duval, Karen Etheridge, Karl Williamson, Manuel Mausz,
367Michael Haardt, Nicolas R., Pali, Richard Leach, Sawyer X, Steve Hay, Tony
368Cook, Vickenty Fesunov.
369
370The list above is almost certainly incomplete as it is automatically
371generated from version control history. In particular, it does not include
372the names of the (very much appreciated) contributors who reported issues to
373the Perl bug tracker.
374
375Many of the changes included in this version originated in the CPAN modules
376included in Perl's core. We're grateful to the entire CPAN community for
377helping Perl to flourish.
8424e368 378
a0348300
KE
379For a more complete list of all of Perl's historical contributors, please
380see the F<AUTHORS> file in the Perl source distribution.
8424e368 381
44691e6f
AB
382=head1 Reporting Bugs
383
373fec1e 384If you find what you think is a bug, you might check the perl bug database
15f62f05
KE
385at L<https://rt.perl.org/>. There may also be information at
386L<http://www.perl.org/>, the Perl Home Page.
44691e6f 387
e08634c5
SH
388If you believe you have an unreported bug, please run the L<perlbug> program
389included with your release. Be sure to trim your bug down to a tiny but
390sufficient test case. Your bug report, along with the output of C<perl -V>,
0e18d1c4 391will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 392
87c118b9
DM
393If the bug you are reporting has security implications which make it
394inappropriate to send to a publicly archived mailing list, then see
373fec1e
SH
395L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
396for details of how to report the issue.
44691e6f 397
390ae6f9
S
398=head1 Give Thanks
399
373fec1e
SH
400If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
401you can do so by running the C<perlthanks> program:
390ae6f9
S
402
403 perlthanks
404
405This will send an email to the Perl 5 Porters list with your show of thanks.
406
44691e6f
AB
407=head1 SEE ALSO
408
e08634c5
SH
409The F<Changes> file for an explanation of how to view exhaustive details on
410what changed.
44691e6f
AB
411
412The F<INSTALL> file for how to build Perl.
413
414The F<README> file for general stuff.
415
416The F<Artistic> and F<Copying> files for copyright information.
417
418=cut