This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix original version of Socket in perldelta
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
4ec06e46 5perldelta - what is new for perl v5.27.8
89853d76 6
b5cbfe35 7=head1 DESCRIPTION
89853d76 8
4ec06e46 9This document describes differences between the 5.27.7 release and the 5.27.8
b5cbfe35 10release.
89853d76 11
4ec06e46
CBW
12If you are upgrading from an earlier release such as 5.27.6, first read
13L<perl5277delta>, which describes differences between 5.27.6 and 5.27.7.
29d69c3c 14
4ec06e46 15=head1 Core Enhancements
9e0909b2 16
ae047103
Z
17=head2 Close-on-exec flag set atomically
18
19When opening a file descriptor, perl now generally opens it with its
20close-on-exec flag already set, on platforms that support doing so.
21This improves thread safety, because it means that an C<exec> initiated
22by one thread can no longer cause a file descriptor in the process
23of being opened by another thread to be accidentally passed to the
24executed program.
25
26Additionally, perl now sets the close-on-exec flag more reliably, whether
27it does so atomically or not. Most file descriptors were getting the
28flag set, but some were being missed.
29
034602eb
KW
30=head2 Mixed Unicode scripts are now detectable
31
32A mixture of scripts, such as Cyrillic and Latin, in a string is often
33the sign of a spoofing attack. A new regular expression construct
34now allows for easy detection of these. For example, you can say
35
36 qr/(?script_run: \d+ \b )/x
37
38And the digits matched will all be from the same set of 10. You won't
39get a look-alike digit from a different script that has a different
40value than what it appears to be.
41
219ba69c
FC
42=head2 String- and number-specific bitwise ops are no longer experimental
43
44The new string-specific (C<&. |. ^. ~.>) and number-specific (C<& | ^ ~>)
45bitwise operators introduced in Perl 5.22 are no longer experimental.
46Because the number-specific ops are spelled the same way as the existing
47operators that choose their behaviour based on their operands, these
48operators must still be enabled via the "bitwise" feature, in either of
49these two ways:
50
51 use feature "bitwise";
52
53 use v5.28; # "bitwise" now included
54
55They are also now enabled by the B<-E> command-line switch.
56
57The "bitwise" feature no longer emits a warning. Existing code that
58disables the "experimental::bitwise" warning category that the feature
59previously used will continue to work.
60
61One caveat that module authors ought to be aware of is that the numeric
62operators now pass a fifth TRUE argument to overload methods. Any methods
63that check the number of operands may croak if they do not expect so many.
64XS authors in particular should be aware that this:
65
66 SV *
67 bitop_handler (lobj, robj, swap)
68
69may need to be changed to this:
70
71 SV *
72 bitop_handler (lobj, robj, swap, ...)
73
4ec06e46 74=head1 Incompatible Changes
15397007 75
3e6fc602
Z
76=head2 Smartmatch and switch reversion
77
78The changes to the experimental smart match operator (C<~~>) and switch
79(C<given>/C<when>) constructs that were made in Perl 5.27.7 have been
80reverted due to the extent of the trouble caused to CPAN modules.
81It is expected that smartmatch will be changed again in the future,
82but preceded by some kind of explicit deprecation.
83
4ec06e46 84=head1 Performance Enhancements
8841d380 85
4ec06e46 86=over 4
2707ab55
CBW
87
88=item *
89
d5573933
KW
90The performance of pattern matching C<[[:ascii:]]> and C<[[:^ascii:]]>
91has been improved significantly except on EBCDIC platforms.
2707ab55 92
4ec06e46 93=back
2707ab55 94
4ec06e46 95=head1 Modules and Pragmata
2707ab55 96
4ec06e46 97=head2 New Modules and Pragmata
3752113a 98
4ec06e46 99=over 4
c933e4bb
FC
100
101=item *
102
4ec06e46 103XXX Remove this section if not applicable.
42034324 104
4ec06e46 105=back
b2a6778b 106
4ec06e46 107=head2 Updated Modules and Pragmata
2707ab55 108
4ec06e46 109=over 4
b2a6778b
KE
110
111=item *
112
4ec06e46 113L<XXX> has been upgraded from version A.xx to B.yy.
ad3f654c 114
4ec06e46 115If there was something important to note about this change, include that here.
7358a033 116
56da5534
KW
117=item *
118
119L<Unicode::UCD> has been upgraded from version 0.69 to 0.70.
120
121The function C<num> now accepts an optional parameter to help in
122diagnosing error returns.
123
9a84a9ba
CB
124=item *
125
126L<XSLoader> has been upgraded from version 0.29 to 0.30.
127
128Platforms that use C<mod2fname> to edit the names of loadable libraries now look for
129bootstrap (.bs) files under the correct, non-edited name.
130
8c7aa727
JK
131=item *
132
840d136c 133L<Socket> has been upgraded from version 2.020_04 to 2.027.
8c7aa727 134
4ec06e46 135=back
2707ab55 136
4ec06e46 137=head2 Removed Modules and Pragmata
64b9a139 138
4ec06e46 139=over 4
e6a2e5ca 140
2707ab55 141=item *
b2a6778b 142
4ec06e46 143XXX
b2a6778b 144
4ec06e46 145=back
2707ab55 146
4ec06e46 147=head1 Documentation
2707ab55 148
4ec06e46
CBW
149XXX Changes to files in F<pod/> go here. Consider grouping entries by
150file and be sure to link to the appropriate page, e.g. L<perlfunc>.
2707ab55 151
25219f3f 152=head2 Changes to Existing Documentation
b2a6778b 153
25219f3f
KE
154We have attempted to update the documentation to reflect the changes
155listed in this document. If you find any we have missed, send email
156to L<perlbug@perl.org|mailto:perlbug@perl.org>.
b2a6778b 157
4ec06e46 158Additionally, the following selected changes have been made:
86e03141 159
8e14f284 160=head3 L<perlembed>
86e03141 161
4ec06e46 162=over 4
01d02537 163
4ec06e46 164=item *
01d02537 165
8e14f284
TC
166An example in L<perlembed> used the string value of C<ERRSV> as a
167format string when calling croak(). If that string contains format
168codes such as C<%s> this could crash the program.
169
170This has been changed to a call to croak_sv().
171
172An alternative could have been to supply a trivial format string:
173
174 croak("%s", SvPV_nolen(ERRSV));
175
176or as a special case for C<ERRSV> simply:
177
178 croak(NULL);
4914bebe 179
4ec06e46 180=back
4914bebe 181
0a72295b 182=head3 L<perlfunc>
b2a6778b 183
25219f3f 184=over 4
b2a6778b
KE
185
186=item *
187
0a72295b
A
188Improve the documentation of C<each> with a slightly more
189explicit description of the sharing of iterator state, and with
190caveats regarding the fragility of while-each loops. [perl #132644]
b2a6778b 191
25219f3f 192=back
b2a6778b 193
0a72295b 194=head3 L<perlfunc>, L<perlop>, L<perlsyn>
b2a6778b 195
25219f3f 196=over 4
64b9a139
SH
197
198=item *
199
0a72295b
A
200Improve the documentation of while condition magic in various
201places. [perl #132644]
64b9a139 202
e6a2e5ca 203=back
64b9a139 204
0a72295b 205=head3 L<perlrun>
4ec06e46 206
04f89ea7
Z
207=over 4
208
64b9a139
SH
209=item *
210
0a72295b 211Clarify the documentation of B<< -m >>. [perl #131518]
9fca523d 212
4ec06e46 213=back
9fca523d 214
0a72295b 215=head1 Diagnostics
52e3acf8 216
0a72295b
A
217The following additions or changes have been made to diagnostic output,
218including warnings and fatal error messages. For the complete list of
219diagnostic messages, see L<perldiag>.
4ec06e46 220
0a72295b 221=head2 New Diagnostics
cab9f0b0 222
0a72295b 223=head3 New Errors
4ec06e46
CBW
224
225=over 4
cab9f0b0 226
9deb4e0b
Z
227=item *
228
0a72295b 229L<Can't "goto" into a binary or list expression|perldiag/"Can't E<quot>gotoE<quot> into a binary or list expression">
e509fc38 230
0a72295b
A
231Use of C<goto> to jump into the parameter of a binary or list operator has
232been prohibited, to prevent crashes and stack corruption. [perl #130936]
64b9a139 233
0a72295b 234=back
4ec06e46 235
0a72295b 236=head2 Changes to Existing Diagnostics
4ec06e46 237
e6a2e5ca 238=over 4
64b9a139
SH
239
240=item *
241
0a72295b
A
242The C<< Unable to flush stdout >> error message was missing a trailing
243newline. [debian #875361]
a8d9a219 244
e6a2e5ca
SH
245=back
246
4ec06e46 247=head1 Testing
dea26044 248
4ec06e46
CBW
249Tests were added and changed to reflect the other additions and
250changes in this release. Furthermore, these significant changes were
251made:
a8ba758d 252
25219f3f 253=over 4
a8ba758d 254
ee5287f6
LM
255=item *
256
0a72295b
A
257Allow override of watchdog timer count in F<re/pat_psycho.t>.
258
259This test can take a long time to run, so there is a timer to keep
260this in check (currently, 5 minutes). This commit adds checking
261the environment variable C<< PERL_TEST_TIME_OUT_FACTOR >>; if set,
262the time out setting is multiplied by its value.
59eb8be1 263
4ec06e46 264=back
59eb8be1 265
4ec06e46 266=head1 Platform Support
ee5287f6 267
0a72295b 268=head2 Platform-Specific Notes
e6a2e5ca 269
25219f3f 270=over 4
e6a2e5ca 271
0a72295b 272=item Cygwin
4faa3060 273
0a72295b 274A build with the quadmath library can now be done on Cygwin.
e1b825c1 275
0a72295b 276=item FreeBSD
66d3c925 277
0a72295b
A
278FreeBSD's F<< /usr/share/mk/sys.mk >> specifies C<< -O2 >> for
279architectures other than arm and mips. By default, compile perl
280with the same optimization levels.
66d3c925 281
0a72295b 282=item VMS
4dab62e3 283
0a72295b
A
284Several fix-ups for F<configure.com>, marking function VMS has
285(or doesn't have).
4dab62e3 286
1b16b015 287
4ec06e46 288=back
1b16b015 289
0a72295b 290=head1 Selected Bug Fixes
64def2ae 291
4ec06e46 292=over 4
9a40fcb6 293
0a72295b 294=item *
d679c20f 295
f5e05609
Z
296The C<printf> format specifier C<%.0f> no longer rounds incorrectly
297[perl #47602], and now shows the correct sign for a negative zero.
298
299=item *
300
0a72295b 301Fixed a use after free bug in pp_list introduced in 5.27.1. [perl #131954]
30f9405e 302
0a72295b 303=item *
30f9405e 304
0a72295b
A
305Don't stringify numeric first arguments to
306C<< system() >> on Windows or VMS. [perl #132633]
222b5ca9 307
0a72295b 308=item *
222b5ca9 309
0a72295b
A
310Fixed an issue where the error C<< Scalar value @arrayname[0] better
311written as $arrayname >> would give an error C<< Cannot printf Inf with 'c' >>
312when arrayname starts with C<< Inf >>. [perl #132645]
64072da0 313
244d2682
FC
314=item *
315
0a72295b
A
316The Perl implementation of C<< getcwd() >> in C<< Cwd >> in the PathTools
317distribution now behaves the same as XS implementation on errors: it
318returns an error, and sets C<< $! >>. [perl #132648]
4ec06e46 319
0a72295b 320=item *
8af6a5dc 321
0a72295b
A
322Fixed argument counting in multiconcat when concatenating adjacent constants.
323[perl #132646]
998753fe 324
0a72295b 325=item *
998753fe 326
0a72295b
A
327Vivify array elements when putting them on the stack.
328Fixes [perl #8910] (reported in April 2002).
53fff747
Z
329
330=item *
331
0a72295b
A
332Fixed parsing of braced subscript after parens. Fixes [perl #8045]
333(reported in December 2001).
244d2682 334
4ec06e46 335=back
244d2682 336
4ec06e46 337=head1 Known Problems
8f46363a 338
4ec06e46 339=over 4
244d2682 340
aa0c5741
Z
341=item *
342
857320cb
Z
343The bugfix for [perl #2754] in Perl 5.27.7 turned out to cause so much
344trouble on CPAN [perl #132577] that it is being postponed. The bug has
345been restored, so C<exit(0)> in a C<UNITCHECK> or C<CHECK> block now
346once again permits the main program to run, and C<exit(0)> in a C<BEGIN>
347block once again permits C<INIT> blocks to run before exiting. The bug
348will be fixed again for Perl 5.30.
349
25219f3f 350=back
4faa3060 351
4ec06e46 352=head1 Acknowledgements
060724e5 353
4ec06e46 354XXX Generate this with:
060724e5 355
4ec06e46 356 perl Porting/acknowledgements.pl v5.27.7..HEAD
f5b73711 357
44691e6f
AB
358=head1 Reporting Bugs
359
b5cbfe35
S
360If you find what you think is a bug, you might check the perl bug database
361at L<https://rt.perl.org/> . There may also be information at
362L<http://www.perl.org/> , the Perl Home Page.
44691e6f 363
e08634c5
SH
364If you believe you have an unreported bug, please run the L<perlbug> program
365included with your release. Be sure to trim your bug down to a tiny but
366sufficient test case. Your bug report, along with the output of C<perl -V>,
b5cbfe35 367will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 368
87c118b9
DM
369If the bug you are reporting has security implications which make it
370inappropriate to send to a publicly archived mailing list, then see
c0ea3294
SH
371L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
372for details of how to report the issue.
44691e6f 373
390ae6f9
S
374=head1 Give Thanks
375
376If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
377you can do so by running the C<perlthanks> program:
378
379 perlthanks
380
381This will send an email to the Perl 5 Porters list with your show of thanks.
382
44691e6f
AB
383=head1 SEE ALSO
384
e08634c5
SH
385The F<Changes> file for an explanation of how to view exhaustive details on
386what changed.
44691e6f
AB
387
388The F<INSTALL> file for how to build Perl.
389
390The F<README> file for general stuff.
391
392The F<Artistic> and F<Copying> files for copyright information.
393
394=cut