This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cleanup perldelta
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
af8a293f 5perldelta - what is new for perl v5.23.8
eabfc7bc 6
2cfe9b50 7=head1 DESCRIPTION
eabfc7bc 8
af8a293f 9This document describes differences between the 5.23.7 release and the 5.23.8
2cfe9b50 10release.
eabfc7bc 11
af8a293f
SL
12If you are upgrading from an earlier release such as 5.23.6, first read
13L<perl5237delta>, which describes differences between 5.23.6 and 5.23.7.
394609a5 14
af8a293f 15=head1 Core Enhancements
a8c28920 16
cdfe2e65
DIM
17=head2 More fields provided to C<sigaction> callback with C<SA_SIGINFO>
18
19When passing the C<SA_SIGINFO> flag to L<sigaction|POSIX/sigaction>, the
20C<errno>, C<status>, C<uid>, C<pid>, C<addr> and C<band> fields are now
21included in the hash passed to the handler, if supported by the
22platform.
23
af8a293f 24=head1 Security
a8c28920 25
07450df7 26=head2 Set proper umask before calling C<mkstemp(3)>
a8c28920 27
07450df7
S
28In 5.22 perl started setting umask to 0600 before calling C<mkstemp(3)>
29and restoring it afterwards. This wrongfully tells open(2) to strip
30the owner read and write bits from the given mode before applying it,
31rather than the intended negation of leaving only those bits in place.
32
33Systems that use mode 0666 in C<mkstemp(3)> (like old versions of
34glibc) createa a file with permissions 0066, leaving world read and
35write permissions regardless of current umask.
36
37This has been fixed by using umask 0177 instead. [perl #127322]
a8c28920 38
c0883d63 39=head1 Incompatible Changes
a8c28920 40
fe0a3646
KW
41=head2 C<qr/\N{}/> now disallowed under C<use re "strict">
42
43An empty C<\N{}> makes no sense, but for backwards compatibility is
44silently accepted as doing nothing. But now this is a fatal error under
45the experimental feature L<re/'strict' mode>.
46
af8a293f 47=head1 Performance Enhancements
a7e63acd 48
af8a293f 49=over 4
a7e63acd
SL
50
51=item *
52
d7745c5b
DM
53The overhead of scope entry and exit has been considerably reduced, so
54for example subroutine calls, loops and basic blocks are all faster now.
55This empty function call now takes about a third less time to execute:
56
57 sub f{} f();
a7e63acd 58
d7a7ed74
DD
59=item *
60
df539208
S
61On Win32, C<stat>ing or C<-X>ing a path, if the file or directory does not
62exist, is now 3.5x faster on a SSD (or any drive) than before.
d7a7ed74 63
af8a293f 64=back
a7e63acd 65
af8a293f 66=head1 Modules and Pragmata
a7e63acd 67
af8a293f 68=head2 Updated Modules and Pragmata
f909f9f7 69
af8a293f 70=over 4
a7e63acd
SL
71
72=item *
73
9b88cb2a 74F<cpan/podlators/> has been upgraded from version 4.04 to 4.06.
a7e63acd 75
34e79b75
DIM
76=item *
77
df539208 78L<POSIX> has been upgraded from version 1.59 to 1.63.
34e79b75
DIM
79
80It can now export constants for the C<code> value in the hash passed to the
81L<sigaction|POSIX/sigaction> handler when using the C<SA_SIGINFO> flag.
82
df539208
S
83These previously deprecated functions are now removed: C<isalnum>,
84C<isalpha>, C<iscntrl>, C<isdigit>, C<isgraph>, C<islower>, C<isprint>,
85C<ispunct>, C<isspace>, C<isupper>, and C<isxdigit>.
86
87=item *
88
89L<Encode> has been upgraded from version 2.78 to 2.80.
90
91=item *
92
93L<Storable> has been upgraded from version 2.54 to 2.55.
94
95=item *
96
97L<Time::HiRes> has been upgraded from version 1.9728 to 1.9730.
98
99It can now export Linux-specific and FreeBSD-specific C<clock_gettime()>
100constants. It also now has emulation for OS X C<clock_nanosleep()>,
101C<clock_gettime()>, and C<clock_getres()>.
102
103=item *
104
105L<DynaLoader> has been upgraded from version 1.37 to 1.38.
106
107DynaLoader now always looks for bootstrap files having the same base name as
108the module for which the bootstrap code is being run. Previously, and only on
109platforms that use C<mod2fname> to produce unique loadable library names,
110L<DynaLoader> would look for the bootstrap file using a base name that matched
111the loadable library and not find it.
112
113=item *
114
115L<PerlIO::encoding> has been upgraded from version 0.23 to 0.24.
116
117=item *
118
119The PathTools module collection has been upgraded from version 3.62
120to 3.63.
121
331b9876
S
122=item *
123
124L<IPC::SysV> has been upgraded from version 2.04 to 2.05.
125
af8a293f 126=back
a7e63acd 127
c0883d63
SL
128=head1 Documentation
129
af8a293f 130=head2 Changes to Existing Documentation
d9d208b8 131
d7745c5b 132=head3 L<perlguts>
d9d208b8 133
c0883d63 134=over 4
fd12b912 135
c0883d63 136=item *
fd12b912 137
d7745c5b
DM
138A new section has been added, L<perlguts/"Dynamic Scope and the Context
139Stack">, which explains how the perl context stack works.
fd12b912 140
c0883d63 141=back
d9d208b8 142
986b8b49
JK
143=head3 L<perlmodlib>
144
145=over 4
146
147=item *
148
149We now recommend contacting the module-authors list or PAUSE in seeking
150guidance on the naming of modules.
151
152=back
153
af8a293f 154=head1 Diagnostics
d9d208b8 155
af8a293f
SL
156The following additions or changes have been made to diagnostic output,
157including warnings and fatal error messages. For the complete list of
158diagnostic messages, see L<perldiag>.
d9d208b8 159
af8a293f 160=head2 New Diagnostics
fd12b912 161
af8a293f 162=head3 New Errors
c0883d63 163
af8a293f 164=over 4
fd12b912 165
c0883d63 166=item *
d9d208b8 167
cfbef7dc
KW
168L<Sequence (?PE<lt>... not terminated in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>
169|perldiag/"Sequence (?PE<lt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>">
170
171=item *
172
173L<Sequence (?PE<gt>... not terminated in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>
174|perldiag/Sequence (?PE<gt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>>
d9d208b8 175
df539208
S
176=item *
177
178L<Empty \%c in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>
179|perldiag/Empty \%c in regex; marked by <-- HERE in mE<sol>%sE<sol>>
180
c0883d63 181=back
fd12b912 182
af8a293f 183=head3 New Warnings
fd12b912 184
054383b6 185=over 4
fd12b912
DG
186
187=item *
188
46d34d0e
KW
189L<Assuming NOT a POSIX class since %s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|
190perldiag/Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in mE<sol>%sE<sol>>
a8c28920 191
6c83150b 192=back
a8c28920 193
054383b6 194=head1 Configuration and Compilation
a8c28920 195
6c83150b 196=over 4
a8c28920 197
6c83150b 198=item *
a8c28920 199
c5b0f62d
TC
200The GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
201
202=item *
203
204You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
054383b6 205
df539208
S
206=item *
207
208Bison 3.0 is now supported.
209
af8a293f
SL
210=back
211
6c83150b
A
212=head1 Platform Support
213
02dd1325
CB
214=head2 Platform-Specific Notes
215
216=over 4
217
218=item VMS
219
220=over
221
222=item *
af8a293f 223
02dd1325
CB
224For those C<%ENV> elements based on the CRTL environ array, we've always
225preserved case when setting them but did look-ups only after upcasing the
226key first, which made lower- or mixed-case entries go missing. This problem
227has been corrected by making C<%ENV> elements derived from the environ array
228case-sensitive on look-up as well as case-preserving on store.
229
230=item *
231
232Environment look-ups for C<PERL5LIB> and C<PERLLIB> previously only
233considered logical names, but now consider all sources of C<%ENV> as
234determined by C<PERL_ENV_TABLES> and as documented in L<perlvms/%ENV>.
235
236=back
237
238=back
af8a293f 239
af8a293f
SL
240=head2 Platform-Specific Notes
241
054383b6 242=over 4
0efe3111 243
022b5ce0 244=item Win32
0efe3111 245
022b5ce0
TC
246Builds using Microsoft Visual C++ 2003 and earlier no longer produce
247an "INTERNAL COMPILER ERROR" message. [perl #126045]
206e921d 248
af8a293f 249=back
206e921d 250
af8a293f 251=head1 Internal Changes
d9d208b8 252
af8a293f 253=over 4
d9d208b8
DG
254
255=item *
256
d7745c5b
DM
257The implementation of perl's context stack system, and its internal API,
258have been heavily reworked. Note that no significant changes have been
d7c7f8cb 259made to any external APIs, but XS code which relies on such internal
d7745c5b
DM
260details may need to be fixed. The main changes are:
261
262=over 4
263
264=item *
265
266The C<PUSHBLOCK()>, C<POPSUB()> etc. macros have been replaced with static
267inline functions such as C<cx_pushblock()>, C<cx_popsub()> etc. These use
268function args rather than implicitly relying on local vars such as
269C<gimme> and C<newsp> being available. Also their functionality has
270changed: in particular, C<cx_popblock()> no longer decrements
271C<cxstack_ix>. The ordering of the steps in the C<pp_leave*> functions
272involving C<cx_popblock()>, C<cx_popsub()> etc. has changed. See the new
273documentation, L<perlguts/"Dynamic Scope and the Context Stack">, for
274details on how to use them.
275
276=item *
277
278Various macros, which now consistently have a CX_ prefix, have been added:
279
df539208 280 CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
d7745c5b
DM
281
282or renamed:
283
df539208 284 CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
d7745c5b
DM
285
286=item *
287
288C<cx_pushblock()> now saves C<PL_savestack_ix> and C<PL_tmps_floor>, so
289CMpp_enter*> and C<pp_leave*> no longer do
290
291 ENTER; SAVETMPS; ....; LEAVE
292
293=item *
294
295C<cx_popblock()> now also restores C<PL_curpm>.
296
297=item *
298
299In C<dounwind()> for every context type, the current savestack frame is
d7c7f8cb 300now processed before each context is popped; formerly this was only done
d7745c5b
DM
301for sub-like context frames. This action has been removed from
302C<cx_popsub()> and placed into its own macro, C<CX_LEAVE_SCOPE(cx)>, which
303must be called before C<cx_popsub()> etc.
304
305C<dounwind()> now also does a C<cx_popblock()> on the last popped frame
306(formerly it only did the C<cx_popsub()> etc. actions on each frame).
307
308=item *
309
310The temps stack is now freed on scope exit; previously, temps created
311during the last statement of a block wouldn't be freed until the next
312C<nextstate> following the block (apart from an existing hack that did
313this for recursive subs in scalar context); and in something like
314C<f(g())>, the temps created by the last statement in C<g()> would
315formerly not be freed until the statement following the return from
316C<f()>.
317
318=item *
319
320Most values that were saved on the savestack on scope entry are now
321saved in suitable new fields in the context struct, and saved and
322restored directly by C<cx_pushfoo()> and C<cx_popfoo()>, which is much
323faster.
324
325=item *
326
327Various context struct fields have been added, removed or modified.
328
329=item *
330
331The handling of C<@_> in C<cx_pushsub()> and C<cx_popsub()> has been
332considerably tidied up, including removing the C<argarray> field from the
333context struct, and extracting out some common (but rarely used) code into
334a separate function, C<clear_defarray()>. Also, useful subsets of
335C<cx_popsub()> which had been unrolled in places like C<pp_goto> have been
336gathered into the new functions C<cx_popsub_args()> and
337C<cx_popsub_common()>.
338
339=item *
340
341C<pp_leavesub> and C<pp_leavesublv> now use the same function as the rest
342of the C<pp_leave*>'s to process return args.
343
344=item *
345
346C<CXp_FOR_PAD> and C<CXp_FOR_GV> flags have been added, and
347C<CXt_LOOP_FOR> has been split into C<CXt_LOOP_LIST>, C<CXt_LOOP_ARY>.
348
349=item *
350
351Some variables formerly declared by C<dMULTICALL> (but not documented) have
352been removed.
353
354=back
355
d89ea360
DD
356=back
357
b26bd9b0 358=head1 Selected Bug Fixes
eabfc7bc 359
af8a293f 360=over 4
acedda6e 361
c7052e96
TC
362=item *
363
2ff6ae51 364Line numbers larger than 2**31-1 but less than 2**32 are no longer
d15ad02e 365returned by caller() as negative numbers. [perl #126991]
c7052e96 366
2ff6ae51
TC
367=item *
368
369C<< unless ( I<assignment> ) >> now properly warns when syntax
370warnings are enabled. [perl #127122]
371
42d92f4a
TC
372=item *
373
374Setting an C<ISA> glob to an array reference now properly adds
375C<isaelem> magic to any existing elements. Previously modifying such
376an element would not update the ISA cache, so method calls would call
377the wrong function. Perl would also crash if the C<ISA> glob was
378destroyed, since new code added in 5.23.7 would try to release the
379C<isaelem> magic from the elements. [perl #127351]
380
19b46ab5
TC
381=item *
382
383If a here-doc was found while parsing another operator, the parser had
384already read end of file, and the here-doc was not terminated, perl
385could produce an assertion or a segmentation fault. This now reliably
386complains about the unterminated here-doc. [perl #125540]
387
23b4d8d6
TC
388=item *
389
390untie() would sometimes return the last value returned by the UNTIE()
391handler as well as it's normal value, messing up the stack. [perl
392#126621]
393
002a7765
TC
394=item *
395
396Fixed an operator precedence problem when C< castflags & 2> is true.
397[perl #127474]
398
84279daf
TC
399=item *
400
401Caching of DESTROY methods could result in a non-pointer or a
402non-STASH stored in the SvSTASH() slot of a stash, breaking the B
403STASH() method. The DESTROY method is now cached in the MRO metadata
404for the stash. [perl #126410]
405
406=item *
407
0000ba0d
TC
408The AUTOLOAD method is now called when searching for a DESTROY method,
409and correctly sets C<$AUTOLOAD> too. [perl #124387] [perl #127494]
84279daf 410
54e70d91
TC
411=item *
412
413Avoid parsing beyond the end of the buffer when processing a C<#line>
414directive with no filename. [perl #127334]
415
46d34d0e
KW
416=item *
417
418Perl now raises a warning when a regular expression pattern looks like
419it was supposed to contain a POSIX class, like C<qr/[[:alpha:]]/>, but
420there was some slight defect in its specification which causes it to
421instead be treated as a regular bracketed character class. An example
422would be missing the second colon in the above like this:
423C<qr/[[:alpha]]/>. This compiles to match a sequence of two characters.
424The second is C<"]">, and the first is any of: C<"[">, C<":">, C<"a">,
425C<"h">, C<"l">, or C<"p">. This is unlikely to be the intended
426meaning, and now a warning is raised. No warning is raised unless the
427specification is very close to one of the 14 legal POSIX classes. (See
428L<perlrecharclass/POSIX Character Classes>.)
429[perl #8904]
430
ac33c516
KW
431=item *
432
9857cc20 433Certain regex patterns involving a complemented POSIX class in an
ac33c516
KW
434inverted bracketed character class, and matching something else
435optionally would improperly fail to match. An example of one that could
436fail is C</qr/_?[^\Wbar]\x{100}/>. This has been fixed.
437[perl #127537]
438
9857cc20
S
439=item *
440
441Perl 5.22 added support to the C99 hexadecimal floating point notation,
442but sometimes misparses hex floats. This had been fixed.
443[perl #127183]
444
af8a293f 445=back
3c84cb84 446
80048966 447=head1 Acknowledgements
0057cacf 448
80048966
S
449Perl 5.23.8 represents approximately 4 weeks of development since Perl 5.23.7
450and contains approximately 30,000 lines of changes across 350 files from 23
451authors.
0057cacf 452
80048966
S
453Excluding auto-generated files, documentation and release tools, there were
454approximately 14,000 lines of changes to 210 .pm, .t, .c and .h files.
0057cacf 455
80048966
S
456Perl continues to flourish into its third decade thanks to a vibrant community
457of users and developers. The following people are known to have contributed the
458improvements that became Perl 5.23.8:
5a74572e 459
80048966
S
460Aaron Crane, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari
461Mannsåker, Daniel Dragan, David Mitchell, Ed J, Herbert Breunung, H.Merijn
462Brand, James E Keenan, Jarkko Hietaniemi, Karl Williamson, Lukas Mai, Niko
463Tyni, Pip Cet, Ricardo Signes, Sawyer X, Sisyphus, Stevan Little, Steve Hay,
464Todd Rinaldo, Tom Hukins, Tony Cook.
5a74572e 465
80048966
S
466The list above is almost certainly incomplete as it is automatically generated
467from version control history. In particular, it does not include the names of
468the (very much appreciated) contributors who reported issues to the Perl bug
469tracker.
e1ad135d 470
80048966
S
471Many of the changes included in this version originated in the CPAN modules
472included in Perl's core. We're grateful to the entire CPAN community for
473helping Perl to flourish.
e1ad135d 474
80048966
S
475For a more complete list of all of Perl's historical contributors, please see
476the F<AUTHORS> file in the Perl source distribution.
f5b73711 477
44691e6f
AB
478=head1 Reporting Bugs
479
e08634c5
SH
480If you find what you think is a bug, you might check the articles recently
481posted to the comp.lang.perl.misc newsgroup and the perl bug database at
fc4c3cec
RS
482L<https://rt.perl.org/> . There may also be information at
483L<http://www.perl.org/> , the Perl Home Page.
44691e6f 484
e08634c5
SH
485If you believe you have an unreported bug, please run the L<perlbug> program
486included with your release. Be sure to trim your bug down to a tiny but
487sufficient test case. Your bug report, along with the output of C<perl -V>,
488will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
489
490If the bug you are reporting has security implications, which make it
e08634c5
SH
491inappropriate to send to a publicly archived mailing list, then please send it
492to perl5-security-report@perl.org. This points to a closed subscription
493unarchived mailing list, which includes all the core committers, who will be
494able to help assess the impact of issues, figure out a resolution, and help
f9001595 495co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
496platforms on which Perl is supported. Please only use this address for
497security issues in the Perl core, not for modules independently distributed on
498CPAN.
44691e6f
AB
499
500=head1 SEE ALSO
501
e08634c5
SH
502The F<Changes> file for an explanation of how to view exhaustive details on
503what changed.
44691e6f
AB
504
505The F<INSTALL> file for how to build Perl.
506
507The F<README> file for general stuff.
508
509The F<Artistic> and F<Copying> files for copyright information.
510
511=cut