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