This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
d44c6e1cc7eee9f1697b67f7068100791cb283cd
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perldelta - what is new for perl v5.24.0
6
7 =head1 DESCRIPTION
8
9 This document describes the differences between the 5.22.0 release and the
10 5.24.0 release.
11
12 =head1 Core Enhancements
13
14 =head2 Postfix dereferencing is no longer experimental
15
16 Using the C<postderef> and C<postderef_qq> features no longer emits a
17 warning. Existing code that disables the C<experimental::postderef> warning
18 category that they previously used will continue to work. The C<postderef>
19 feature has no effect; all Perl code can use postfix dereferencing,
20 regardless of what feature declarations are in scope. The C<5.24> feature
21 bundle now includes the C<postderef_qq> feature.
22
23 =head2 Unicode 8.0 is now supported
24
25 For details on what is in this release, see
26 L<http://www.unicode.org/versions/Unicode8.0.0/>.
27
28 =head2 perl will now croak when closing an in-place output file fails
29
30 Until now, failure to close the output file for an in-place edit was not
31 detected, meaning that the input file could be clobbered without the edit being
32 successfully completed.  Now, when the output file cannot be closed
33 successfully, an exception is raised.
34
35 =head2 New C<\b{lb}> boundary in regular expressions
36
37 C<lb> stands for Line Break.  It is a Unicode property
38 that determines where a line of text is suitable to break (typically so
39 that it can be output without overflowing the available horizontal
40 space).  This capability has long been furnished by the
41 L<Unicode::LineBreak> module, but now a light-weight, non-customizable
42 version that is suitable for many purposes is in core Perl.
43
44 =head2 C<qr/(?[ ])/> now works in UTF-8 locales
45
46 L<Extended Bracketed Character Classes|perlrecharclass/Extended Bracketed Character Classes>
47 now will successfully compile when S<C<use locale>> is in effect.  The compiled
48 pattern will use standard Unicode rules.  If the runtime locale is not a
49 UTF-8 one, a warning is raised and standard Unicode rules are used
50 anyway.  No tainting is done since the outcome does not actually depend
51 on the locale.
52
53 =head2 Integer shift (C<< << >> and C<< >> >>) now more explicitly defined
54
55 Negative shifts are reverse shifts: left shift becomes right shift,
56 and right shift becomes left shift.
57
58 Shifting by the number of bits in a native integer (or more) is zero,
59 except when the "overshift" is right shifting a negative value under
60 C<use integer>, in which case the result is -1 (arithmetic shift).
61
62 Until now negative shifting and overshifting have been undefined
63 because they have relied on whatever the C implementation happens
64 to do.  For example, for the overshift a common C behavior is
65 "modulo shift":
66
67   1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1  # Common C behavior.
68
69   # And the same for <<, while Perl now produces 0 for both.
70
71 Now these behaviors are well-defined under Perl, regardless of what
72 the underlying C implementation does.  Note, however, that you cannot
73 escape the native integer width, you need to know how far left you
74 can go.  You can use for example:
75
76   use Config;
77   my $wordbits = $Config{uvsize} * 8;  # Or $Config{uvsize} << 3.
78
79 If you need a more bits on the left shift, you can use for example
80 the C<bigint> pragma, or the C<Bit::Vector> module from CPAN.
81
82 =head2 printf and sprintf now allow reordered precision arguments
83
84 That is, C<< sprintf '|%.*2$|', 2, 3 >> now returns C<|002|>. This extends
85 the existing reordering mechanism (which allows reordering for arguments
86 that are used as format fields, widths, and vector separators).
87
88 =head2 More fields provided to C<sigaction> callback with C<SA_SIGINFO>
89
90 When passing the C<SA_SIGINFO> flag to L<sigaction|POSIX/sigaction>, the
91 C<errno>, C<status>, C<uid>, C<pid>, C<addr> and C<band> fields are now
92 included in the hash passed to the handler, if supported by the
93 platform.
94
95 =head1 Security
96
97 =head2 Set proper umask before calling C<mkstemp(3)>
98
99 In 5.22 perl started setting umask to 0600 before calling C<mkstemp(3)>
100 and restoring it afterwards. This wrongfully tells open(2) to strip
101 the owner read and write bits from the given mode before applying it,
102 rather than the intended negation of leaving only those bits in place.
103
104 Systems that use mode 0666 in C<mkstemp(3)> (like old versions of
105 glibc) create a file with permissions 0066, leaving world read and
106 write permissions regardless of current umask.
107
108 This has been fixed by using umask 0177 instead. [perl #127322]
109
110 =head2 fix out of boundary access in Win32 path handling
111
112 This is CVE-2015-8608.  For more information see
113 L<[perl #126755]|https://rt.perl.org/Ticket/Display.html?id=126755>
114
115 =head2 fix loss of taint in canonpath
116
117 This is CVE-2015-8607.  For more information see
118 L<[perl #126862]|https://rt.perl.org/Ticket/Display.html?id=126862>
119
120 =head2 Avoid accessing uninitialized memory in win32 C<crypt()>
121
122 Added validation that will detect both a short salt and invalid characters
123 in the salt.
124 L<[perl #126922]|https://rt.perl.org/Ticket/Display.html?id=126922>
125
126 =head2 Remove duplicate environment variables from C<environ>
127
128 Previously, if an environment variable appeared more than once in
129 C<environ[]>, C<%ENV> would contain the last entry for that name,
130 while a typical C<getenv()> would return the first entry. We now
131 make sure C<%ENV> contains the same as what C<getenv> returns.
132
133 Second, we remove duplicates from C<environ[]>, so if a setting
134 with that name is set in C<%ENV> we won't pass an unsafe value
135 to a child process.
136
137 [CVE-2016-2381]
138
139 =head1 Incompatible Changes
140
141 =head2 The C<autoderef> feature has been removed
142
143 The experimental C<autoderef> feature (which allowed calling C<push>,
144 C<pop>, C<shift>, C<unshift>, C<splice>, C<keys>, C<values>, and C<each> on
145 a scalar argument) has been deemed unsuccessful. It has now been removed;
146 trying to use the feature (or to disable the C<experimental::autoderef>
147 warning it previously triggered) now yields an exception.
148
149 =head2 Lexical $_ has been removed
150
151 C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion
152 with no obvious solution.  In Perl 5.18.0, it was made experimental on the
153 theory that it would either be removed or redesigned in a less confusing (but
154 backward-incompatible) way.  Over the following years, no alternatives were
155 proposed.  The feature has now been removed and will fail to compile.
156
157 =head2 C<qr/\b{wb}/> is now tailored to Perl expectations
158
159 This is now more suited to be a drop-in replacement for plain C<\b>, but
160 giving better results for parsing natural language.  Previously it
161 strictly followed the current Unicode rules which calls for it to match
162 between each white space character.  Now it doesn't generally match
163 within spans of white space, behaving like C<\b> does.  See
164 L<perlrebackslash/\b{wb}>
165
166 =head2 Regular expression compilation errors
167
168 Some regular expression patterns that had runtime errors now
169 don't compile at all.
170
171 Almost all Unicode properties using the C<\p{}> and C<\P{}> regular
172 expression pattern constructs are now checked for validity at pattern
173 compilation time, and invalid ones will cause the program to not
174 compile.  In earlier releases, this check was often deferred until run
175 time.  Whenever an error check is moved from run- to compile time,
176 erroneous code is caught 100% of the time, whereas before it would only
177 get caught if and when the offending portion actually gets executed,
178 which for unreachable code might be never.
179
180 =head2 C<qr/\N{}/> now disallowed under C<use re "strict">
181
182 An empty C<\N{}> makes no sense, but for backwards compatibility is
183 accepted as doing nothing, though a deprecation warning is raised by
184 default.  But now this is a fatal error under the experimental feature
185 L<re/'strict' mode>.
186
187 =head2 Nested declarations are now disallowed
188
189 A C<my>, C<our>, or C<state> declaration is no longer allowed inside
190 of another C<my>, C<our>, or C<state> declaration.
191
192 For example, these are now fatal:
193
194    my ($x, my($y));
195    our (my $x);
196
197 L<[perl #125587]|https://rt.perl.org/Ticket/Display.html?id=125587>
198
199 L<[perl #121058]|https://rt.perl.org/Ticket/Display.html?id=121058>
200
201 =head2 The C</\C/> character class has been removed.
202
203 This regular expression character class was deprecated in v5.20.0 and has
204 produced a deprecation warning since v5.22.0. It is now a compile-time
205 error. If you need to examine the individual bytes that make up a
206 UTF8-encoded character, then use C<utf8::encode()> on the string (or a
207 copy) first.
208
209 =head2 C<chdir('')> no longer chdirs home
210
211 Using C<chdir('')> or C<chdir(undef)> to chdir home has been deprecated since
212 perl v5.8, and will now fail.  Use C<chdir()> instead.
213
214 =head2 ASCII characters in variable names must now be all visible
215
216 It was legal until now on ASCII platforms for variable names to contain
217 non-graphical ASCII control characters (ordinals 0 through 31, and 127,
218 which are the C0 controls and C<DELETE>).  This usage has been
219 deprecated since v5.20, and as of now causes a syntax error.  The
220 variables these names referred to are special, reserved by Perl for
221 whatever use it may choose, now, or in the future.  Each such variable
222 has an alternative way of spelling it.  Instead of the single
223 non-graphic control character, a two character sequence beginning with a
224 caret is used, like C<$^]> and C<${^GLOBAL_PHASE}>.  Details are at
225 L<perlvar>.   It remains legal, though unwise and deprecated (raising a
226 deprecation warning), to use certain non-graphic non-ASCII characters in
227 variables names when not under S<C<use utf8>>.  No code should do this,
228 as all such variables are reserved by Perl, and Perl doesn't currently
229 define any of them (but could at any time, without notice).
230
231 =head2 An off by one issue in C<$Carp::MaxArgNums> has been fixed
232
233 C<$Carp::MaxArgNums> is supposed to be the number of arguments to display.
234 Prior to this version, it was instead showing C<$Carp::MaxArgNums> + 1 arguments,
235 contrary to the documentation.
236
237 =head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>.
238
239 The experimental Extended Bracketed Character Classes can contain regular
240 bracketed character classes within them.  These differ from regular ones in
241 that white space is generally ignored, unless escaped by preceding it with a
242 backslash.  The white space that is ignored is now limited to just tab C<\t>
243 and SPACE characters.  Previously, it was any white space.  See
244 L<perlrecharclass/Extended Bracketed Character Classes>.
245
246 =head1 Deprecations
247
248 =head2 Using code points above the platform's C<IV_MAX> is now deprecated
249
250 Unicode defines code points in the range C<0..0x10FFFF>.  Some standards
251 at one time defined them up to 2**31 - 1, but Perl has allowed them to
252 be as high as anything that will fit in a word on the platform being
253 used.  However, use of those above the platform's C<IV_MAX> is broken in
254 some constructs, notably C<tr///>, regular expression patterns involving
255 quantifiers, and in some arithmetic and comparison operations, such as
256 being the upper limit of a loop.  Now the use of such code points raises
257 a deprecation warning, unless that warning category is turned off.
258 C<IV_MAX> is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on
259 64-bit ones.
260
261 =head2 Doing bitwise operations on strings containing code points above
262 0xFF is deprecated
263
264 The string bitwise operators treat their operands as strings of bytes,
265 and values beyond 0xFF are nonsensical in this context.  To operate on
266 encoded bytes, first encode the strings.  To operate on code points'
267 numeric values, use C<split> and C<map ord>.  In the future, this
268 warning will be replaced by an exception.
269
270 =head2 sysread(), syswrite(), recv() and send() are deprecated on
271 :utf8 handles
272
273 The sysread(), recv(), syswrite() and send() operators
274 are deprecated on handles that have the C<:utf8> layer, either
275 explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
276
277 Both sysread() and recv() currently use only the C<:utf8> flag for the
278 stream, ignoring the actual layers.  Since sysread() and recv() do no
279 UTF-8 validation they can end up creating invalidly encoded scalars.
280
281 Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise
282 ignoring any layers.  If the flag is set, both write the value UTF-8
283 encoded, even if the layer is some different encoding, such as the
284 example above.
285
286 Ideally, all of these operators would completely ignore the C<:utf8>
287 state, working only with bytes, but this would result in silently
288 breaking existing code.  To avoid this a future version of perl will
289 throw an exception when any of sysread(), recv(), syswrite() or send()
290 are called on handle with the C<:utf8> layer.
291
292 =head1 Performance Enhancements
293
294 =over 4
295
296 =item *
297
298 The overhead of scope entry and exit has been considerably reduced, so
299 for example subroutine calls, loops and basic blocks are all faster now.
300 This empty function call now takes about a third less time to execute:
301
302     sub f{} f();
303
304 =item *
305
306 Many languages, such as Chinese, are caseless.  Perl now knows about
307 most modern commercially important ones, and skips much of the work when
308 a program tries to change case in them (like C<ucfirst()>) or match
309 caselessly (C<qr//i>).  This will speed up a program, such as a web
310 server, that can operate on multiple languages, while operating on a
311 caseless one.
312
313 =item *
314
315 C</fixed-substr/> has been made much faster.
316
317 On platforms with a libc memchr() implementation which makes good use of
318 underlying hardware support, patterns which include fixed substrings will now
319 often be much faster; for example with glibc on a recent x86_64 CPU, this:
320
321     $s = "a" x 1000 . "wxyz";
322     $s =~ /wxyz/ for 1..30000
323
324 is now about 7 times faster.  On systems with slow memchr(), e.g. 32-bit ARM
325 Raspberry Pi, there will be a small or little speedup.  Conversely, some
326 pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3
327 times slower on the rPi, 1.5x slower on x86_64.
328
329 =item *
330
331 Faster addition, subtraction and multiplication.
332
333 Since 5.8.0, arithmetic became slower due to the need to support
334 64-bit integers. To deal with 64-bit integers, a lot more corner
335 cases need to be checked, which adds time. We now detect common
336 cases where there is no need to check for those corner cases,
337 and special-case them.
338
339 =item *
340
341 Preincrement, predecrement, postincrement, and postdecrement have been
342 made faster by internally splitting the functions which handled multiple
343 cases into different functions.
344
345 =item *
346
347 Creating Perl debugger data structures (see L<perldebguts/"Debugger Internals">)
348 for XSUBs and const subs has been removed.  This removed one glob/scalar combo
349 for each unique C<.c> file that XSUBs and const subs came from.  On startup
350 (C<perl -e"0">) about half a dozen glob/scalar debugger combos were created.
351 Loading XS modules created more glob/scalar combos.  These things were created
352 regardless of whether the perl debugger was being used or not, unlike for pure
353 perl subs, and ignores that the perl debugger can not debug C code.
354
355 =item *
356
357 On Win32, C<stat>ing or C<-X>ing a path, if the file or directory does not
358 exist, is now 3.5x faster than before.
359
360 =item *
361
362 Single arguments in list assign are now slightly faster:
363
364   ($x) = (...);
365   (...) = ($x);
366
367 =item *
368
369 Less peak memory is now used when compiling regular expression patterns.
370
371 =back
372
373 =head1 Modules and Pragmata
374
375 =head2 Updated Modules and Pragmata
376
377 XXX: todo
378
379 =head1 Documentation
380
381 =head2 Changes to Existing Documentation
382
383 =head3 L<perlapi>
384
385 =over 4
386
387 =item *
388
389 The process of using undocumented globals has been documented, namely, that one
390 should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>
391 first to get the go-ahead for documenting and using an undocumented function or
392 global variable.
393
394 =back
395
396 =head3 L<perlcall>
397
398 =over 4
399
400 =item *
401
402 A number of cleanups have been made to perlcall, including:
403
404 =over 4
405
406 =item *
407
408 use EXTEND(SP, n) and PUSHs() instead of XPUSHs() where applicable
409 and update prose to match
410
411 =item *
412
413 add POPu, POPul and POPpbytex to the "complete list of POP macros"
414 and clarify the documentation for some of the existing entries, and
415 a note about side-effects
416
417 =item *
418
419 add API documentation for POPu and POPul
420
421 =item *
422
423 use ERRSV more efficiently
424
425 =item *
426
427 approaches to thread-safety storage of SVs.
428
429 =back
430
431 =back
432
433 =head3 L<perlfunc>
434
435 =over 4
436
437 =item *
438
439 The documentation of C<hex> has been revised to clarify valid inputs.
440
441 =item *
442
443 Better explain meaning of negative PIDs in C<waitpid>.
444 L<[perl #127080]|https://rt.perl.org/Ticket/Display.html?id=127080>
445
446 =item *
447
448 General cleanup: there's more consistency now (in POD usage, grammar, code
449 examples), better practices in code examples (use of C<my>, removal of bareword
450 filehandles, dropped usage of C<&> when calling subroutines, ...), etc.
451
452 =back
453
454 =head3 L<perlguts>
455
456 =over 4
457
458 =item *
459
460 A new section has been added, L<perlguts/"Dynamic Scope and the Context
461 Stack">, which explains how the perl context stack works.
462
463 =back
464
465 =head3 L<perllocale>
466
467 =over 4
468
469 A stronger caution about using locales in threaded applications is
470 given.  Locales are not thread-safe, and you can get wrong results or
471 even segfaults if you use them there.
472
473 =back
474
475 =head3 L<perlmodlib>
476
477 =over 4
478
479 =item *
480
481 We now recommend contacting the module-authors list or PAUSE in seeking
482 guidance on the naming of modules.
483
484 =back
485
486 =head3 L<perlop>
487
488 =over 4
489
490 =item *
491
492 The documentation of C<qx//> now describes how C<$?> is affected.
493
494 =back
495
496 =head3 L<perlpolicy>
497
498 =over 4
499
500 =item *
501
502 This note has been added to perlpolicy:
503
504  While civility is required, kindness is encouraged; if you have any
505  doubt about whether you are being civil, simply ask yourself, "Am I
506  being kind?" and aspire to that.
507
508 =back
509
510 =head3 L<perlreftut>
511
512 =over 4
513
514 =item *
515
516 Fix some examples to be L<strict> clean.
517
518 =back
519
520 =head3 L<perlrebackslash>
521
522 =over 4
523
524 =item *
525
526 Clarify that in languages like Japanese and Thai, dictionary lookup
527 is required to determine word boundaries.
528
529 =back
530
531 =head3 L<perlsub>
532
533 =over 4
534
535 =item *
536
537 Updated to note that anonymous subroutines can have signatures.
538
539 =back
540
541 =head3 L<perlsyn>
542
543 =over 4
544
545 =item *
546
547 Fixed a broken example where C<=> was used instead of
548 C<==> in conditional in do/while example.
549
550 =back
551
552 =head3 L<perltie>
553
554 =over 4
555
556 =item *
557
558 The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified.
559
560 =back
561
562 =head3 L<perlunicode>
563
564 =over 4
565
566 =item *
567
568 Discourage use of 'In' prefix for Unicode Block property.
569
570 =back
571
572 =head3 L<perlvar>
573
574 =over 4
575
576 =item *
577
578 The documentation of C<$@> was reworded to clarify that it is not just for
579 syntax errors in C<eval>.
580 L<[perl #124034]|https://rt.perl.org/Ticket/Display.html?id=124034>
581
582 =item *
583
584 The specific true value of C<$!{E...}> is now documented, noting that it is
585 subject to change and not guaranteed.
586
587 =item *
588
589 Use of C<$OLD_PERL_VERSION> is now discouraged.
590
591 =back
592
593 =head3 L<perlxs>
594
595 =over 4
596
597 =item *
598
599 The documentation of C<PROTOTYPES> has been corrected; they are I<disabled>
600 by default, not I<enabled>.
601
602 =back
603
604 =head1 Diagnostics
605
606 The following additions or changes have been made to diagnostic output,
607 including warnings and fatal error messages.  For the complete list of
608 diagnostic messages, see L<perldiag>.
609
610 =head2 New Diagnostics
611
612 =head3 New Errors
613
614 =over 4
615
616 =item *
617
618 L<%s must not be a named sequence in transliteration operator|perldiag/"%s must not be a named sequence in transliteration operator">
619
620 (F) Transliteration (C<tr///> and C<y///>) transliterates individual
621 characters.  But a named sequence by definition is more than an
622 individual charater, and hence doing this operation on it doesn't make
623 sense.
624
625 =item *
626
627 L<Can't find Unicode property definition "%s" in regex;|perldiag/"Can't find Unicode property definition "%s" in regex; marked by <-- HERE in m/%s/">
628
629 =item *
630
631 L<Can't redeclare "%s" in "%s"|perldiag/"Can't redeclare "%s" in "%s"">
632
633 (F) A "my", "our" or "state" declaration was found within another declaration,
634 such as C<my ($x, my($y), $z)> or C<our (my $x)>.
635
636 =item *
637
638 L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/">
639
640 =item *
641
642 L<Empty \%c in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
643 |perldiag/"Empty \%c in regex; marked by <-- HERE in mE<sol>%sE<sol>">
644
645 =item *
646
647 L<Illegal user-defined property name|perldiag/"Illegal user-defined property name">
648
649 =item *
650
651 L<Invalid number '%s' for -C option.|perldiag/"Invalid number '%s' for -C option.">
652
653 (F) You supplied a number to the -C option that either has extra leading
654 zeroes or overflows perl's unsigned integer representation.
655
656 =item *
657
658 L<<< Sequence (?... not terminated in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Sequence (?... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>>
659
660 =item *
661
662 L<<< Sequence (?PE<lt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
663 |perldiag/"Sequence (?PE<lt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>>
664
665 =item *
666
667 L<Sequence (?PE<gt>... not terminated in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>
668 |perldiag/"Sequence (?PE<gt>... not terminated in regex; marked by <-- HERE in mE<sol>%sE<sol>">
669
670 =back
671
672 =head3 New Warnings
673
674 =over 4
675
676 =item *
677
678 L<Assuming NOT a POSIX class since %s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|
679 perldiag/Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in mE<sol>%sE<sol>>
680
681 =item *
682
683 L<%s() is deprecated on :utf8 handles|perldiag/"%s() is deprecated on :utf8 handles">
684
685 (W deprecated) The sysread(), recv(), syswrite() and send() operators
686 are deprecated on handles that have the C<:utf8> layer, either
687 explicitly, or implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
688
689 Both sysread() and recv() currently use only the C<:utf8> flag for the
690 stream, ignoring the actual layers.  Since sysread() and recv() do no
691 UTF-8 validation they can end up creating invalidly encoded scalars.
692
693 Similarly, syswrite() and send() use only the C<:utf8> flag, otherwise
694 ignoring any layers.  If the flag is set, both write the value UTF-8
695 encoded, even if the layer is some different encoding, such as the
696 example above.
697
698 Ideally, all of these operators would completely ignore the C<:utf8>
699 state, working only with bytes, but this would result in silently
700 breaking existing code.  To avoid this a future version of perl will
701 throw an exception when any of sysread(), recv(), syswrite() or send()
702 are called on handle with the C<:utf8> layer.
703
704 =back
705
706 =head2 Changes to Existing Diagnostics
707
708 =over 4
709
710 =item *
711
712 Accessing the C<IO> part of a glob as C<FILEHANDLE> instead of C<IO> is no
713 longer deprecated.  It is discouraged to encourage uniformity (so that, for
714 example, one can grep more easily) but it will not be removed.
715 L<[perl #127060]|https://rt.perl.org/Ticket/Display.html?id=127060>
716
717 =item *
718
719 The diagnostic C<< Hexadecimal float: internal error >> has been changed to
720 C<< Hexadecimal float: internal error (%s) >> to include more information.
721
722 =item *
723
724 L<Can't modify non-lvalue subroutine call of &%s|perldiag/"Can't modify non-lvalue subroutine call of &%s">
725
726 This error now reports the name of the non-lvalue subroutine you attempted to
727 use as an lvalue.
728
729 =item *
730
731 When running out of memory during an attempt the increase the stack
732 size, previously, perl would die using the cryptic message
733 C<< panic: av_extend_guts() negative count (-9223372036854775681) >>.
734 This has been fixed to show the prettier message:
735 L<< Out of memory during stack extend|perldiag/"Out of memory during %s extend" >>
736
737 =back
738
739 =head1 Configuration and Compilation
740
741 =over 4
742
743 =item *
744
745 C<Configure> now acts as if the C<-O> option is always passed, allowing command
746 line options to override saved configuration.  This should eliminate confusion
747 when command line options are ignored for no obvious reason.  C<-O> is now
748 permitted, but ignored.
749
750 =item *
751
752 Bison 3.0 is now supported.
753
754 =item *
755
756 F<Configure> no longer probes for F<libnm> by default.  Originally
757 this was the "New Math" library, but the name has been re-used by the
758 GNOME NetworkManager.
759 L<[perl #127131]|https://rt.perl.org/Ticket/Display.html?id=127131>
760
761 =item *
762
763 Added F<Configure> probes for C<newlocale>, C<freelocale>, and C<uselocale>.
764
765 =item *
766
767 C<< PPPort.so/PPPort.dll >> no longer get installed, as they are
768 not used by C<< PPPort.pm >>, only by its test files.
769
770 =item *
771
772 It is now possible to specify which compilation date to show on
773 C<< perl -V >> output, by setting the macro C<< PERL_BUILD_DATE >>.
774
775 =item *
776
777 Using the C<NO_HASH_SEED> define in combination with the default hash algorithm
778 C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling
779 the interpreter, since Perl 5.17.10.  This has been fixed.
780
781 =item *
782
783 F<Configure> should handle spaces in paths a little better.
784
785 =item *
786
787 No longer generate EBCDIC POSIX-BC tables.  We don't believe anyone is
788 using Perl and POSIX-BC at this time, and by not generating these tables
789 it saves time during development, and makes the resulting tar ball smaller.
790
791 =item *
792
793 The GNU Make makefile for Win32 now supports parallel builds.  [perl #126632]
794
795 =item *
796
797 You can now build perl with MSVC++ on Win32 using GNU Make.  [perl #126632]
798
799 =item *
800
801 The Win32 miniperl now has a real C<getcwd> which increases build performance
802 resulting in C<getcwd()> being 605x faster in Win32 miniperl.
803
804 =back
805
806 =head1 Testing
807
808 =over 4
809
810 =item *
811
812 A new test (F<t/op/aassign.t>) has been added to test the list assignment operator
813 C<OP_AASSIGN>.
814
815 =item *
816
817 Parallel building has been added to the dmake C<makefile.mk> makefile. All
818 Win32 compilers are supported.
819
820 =back
821
822 =head1 Platform Support
823
824 =head2 Platform-Specific Notes
825
826 =over 4
827
828 =item AmigaOS
829
830 The AmigaOS port has been reintegrated into the main tree, based off of
831 Perl 5.22.1.
832
833 =item Cygwin
834
835 Tests are more robust against unusual cygdrive prefixes.
836 L<[perl #126834]|https://rt.perl.org/Ticket/Display.html?id=126834>
837
838 =item EBCDIC
839
840 =over 4
841
842 =item UTF-EBCDIC extended
843
844 UTF-EBCDIC is like UTF-8, but for EBCDIC platforms.  It now has been
845 extended so that it can represent code points up to 2 ** 64 - 1 on
846 platforms with 64-bit words.  This brings it into parity with UTF-8.
847 This enhancement requires an incompatible change to the representation
848 of code points in the range 2 ** 30 to 2 ** 31 -1 (the latter was the
849 previous maximum representable code point).  This means that a file that
850 contains one of these code points, written out with previous versions of
851 perl cannot be read in, without conversion, by a perl containing this
852 change.  We do not believe any such files are in existence, but if you
853 do have one, submit a ticket at L<perlbug@perl.org|mailto:perlbug@perl.org>,
854 and we will write a conversion script for you.
855
856 =item EBCDIC C<cmp()> and C<sort()> fixed for UTF-EBCDIC strings
857
858 Comparing two strings that were both encoded in UTF-8 (or more
859 precisely, UTF-EBCDIC) did not work properly until now.  Since C<sort()>
860 uses C<cmp()>, this fixes that as well.
861
862 =item EBCDIC C<tr///> and C<y///> fixed for C<\N{}>, and C<S<use utf8>> ranges
863
864 Perl v5.22 introduced the concept of portable ranges to regular
865 expression patterns.  A portable range matches the same set of
866 characters no matter what platform is being run on.  This concept is now
867 extended to C<tr///>.  See
868 C<L<trE<sol>E<sol>E<sol>|perlop/trE<sol>SEARCHLISTE<sol>REPLACEMENTLISTE<sol>cdsr>>.
869
870 There were also some problems with these operations under S<C<use
871 utf8>>, which are now fixed
872
873 =back
874
875 =item FreeBSD
876
877 =over
878
879 =item *
880
881 Use the C<fdclose()> function from FreeBSD if it is available.
882 L<[perl #126847]|https://rt.perl.org/Ticket/Display.html?id=126847>
883
884 =back
885
886 =item IRIX
887
888 =over
889
890 =item *
891
892 Under some circumstances IRIX stdio fgetc() and fread() set the errno to
893 C<ENOENT>, which made no sense according to either IRIX or POSIX docs.  Errno
894 is now cleared in such cases.
895 L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977>
896
897 =item *
898
899 Problems when multiplying long doubles by infinity have been fixed.
900 L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396>
901
902 =back
903
904 =item MacOS X
905
906 =over
907
908 =item *
909
910 Until now OS X builds of perl have specified a link target of 10.3 (Panther,
911 2003) but have not specified a compiler target.  From now on, builds of perl on
912 OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X
913 version and specify that as the explicit build target in both compiler and
914 linker flags, thus preserving binary compatibility for extensions built later
915 regardless of changes in OS X, SDK, or compiler and linker versions.  To
916 override the default value used in the build and preserved in the flags,
917 specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building
918 perl, where 10.N is the version of OS X you wish to target.  In OS X 10.5 or
919 earlier there is no change to the behavior present when those systems were
920 current; the link target is still OS X 10.3 and there is no explicit compiler
921 target.
922
923 =item *
924
925 Builds with both -DDEBUGGING and threading enabled would fail with a
926 "panic: free from wrong pool" error when built or tested from Terminal
927 on OS X.  This was caused by perl's internal management of the
928 environment conflicting with an atfork handler using the libc
929 setenv() function to update the environment.
930
931 Perl now uses setenv()/unsetenv() to update the environment on OS X.
932 L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
933
934 =back
935
936 =item Solaris
937
938 All Solaris now builds shared libperl.
939
940 Solaris and variants like OpenIndiana now always build with the shared
941 Perl library (Configure -Duseshrplib).  This was required for the
942 OpenIndiana builds, but this has also been the setting for Oracle/Sun
943 Perl builds for several years.
944
945 =item Tru64
946
947 Workaround where Tru64 balks when prototypes are listed as
948 C<< PERL_STATIC_INLINE >>, but where the test is build with
949 C<< -DPERL_NO_INLINE_FUNCTIONS >>.
950
951 =item VMS
952
953 =over
954
955 =item *
956
957 On VMS, the math function prototypes in C<math.h> are now visible under C++.
958 Now building the POSIX extension with C++ will no longer crash.
959
960 =item *
961
962 VMS has had C<setenv>/C<unsetenv> since v7.0 (released in 1996),
963 C<Perl_vmssetenv> now always uses C<setenv>/C<unsetenv>.
964
965 =item *
966
967 Perl now implements its own C<killpg> by scanning for processes in the
968 specified process group, which may not mean exactly the same thing as a Unix
969 process group, but allows us to send a signal to a parent (or master) process
970 and all of its sub-processes.  At the perl level, this means we can now send a
971 negative pid like so:
972
973     kill SIGKILL, -$pid;
974
975 to signal all processes in the same group as C<$pid>.
976
977 =item *
978
979 For those C<%ENV> elements based on the CRTL environ array, we've always
980 preserved case when setting them but did look-ups only after upcasing the
981 key first, which made lower- or mixed-case entries go missing. This problem
982 has been corrected by making C<%ENV> elements derived from the environ array
983 case-sensitive on look-up as well as case-preserving on store.
984
985 =item *
986
987 Environment look-ups for C<PERL5LIB> and C<PERLLIB> previously only
988 considered logical names, but now consider all sources of C<%ENV> as
989 determined by C<PERL_ENV_TABLES> and as documented in L<perlvms/%ENV>.
990
991 =item *
992
993 The minimum supported version of VMS is now v7.3-2, released in 2003.  As a
994 side effect of this change, VAX is no longer supported as the terminal
995 release of OpenVMS VAX was v7.3 in 2001.
996
997 =back
998
999 =item Win32
1000
1001 =over
1002
1003 =item *
1004
1005 A new build option C<USE_NO_REGISTRY> has been added to the makefiles.  This
1006 option is off by default, meaning the default is to do Windows registry
1007 lookups.  This option stops Perl from looking inside the registry for anything.
1008 For what values are looked up in the registry see L<perlwin32>.  Internally, in
1009 C, the name of this option is C<WIN32_NO_REGISTRY>.
1010
1011 =item *
1012
1013 The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and
1014 C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV>
1015 vars starting with C<PERL> has changed.  Previously, the 2 keys were checked
1016 for entries at all times through Perl processes life time even if they did not
1017 exist.  For performance reasons, now, if the root key (i.e.
1018 C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does
1019 not exist at process start time, it will not be checked again for C<%ENV>
1020 override entries for the remainder of the Perl processes life.  This more
1021 closely matches Unix behaviour in that the environment is copied or inherited
1022 on startup and changing the variable in the parent process or another process
1023 or editing F<.bashrc> will not change the environmental variable in other
1024 existing, running, processes.
1025
1026 =item *
1027
1028 One glob fetch was removed for each C<-X> or C<stat> call whether done from
1029 Perl code or internally from Perl's C code.  The glob being looked up was
1030 C<${^WIN32_SLOPPY_STAT}> which is a special variable.  This makes C<-X> and
1031 C<stat> slightly faster.
1032
1033 =item *
1034
1035 During miniperl's process startup, during the build process, 4 to 8 IO calls
1036 related to the process starting F<.pl> and the F<buildcustomize.pl> file were
1037 removed from the code opening and executing the first 1 or 2 F<.pl> files.
1038
1039 =item *
1040
1041 Builds using Microsoft Visual C++ 2003 and earlier no longer produce
1042 an "INTERNAL COMPILER ERROR" message.  [perl #126045]
1043
1044 =item *
1045
1046 Visual C++ 2013 builds will now execute on XP and higher. Previously they would
1047 only execute on Vista and higher.
1048
1049 =item *
1050
1051 You can now build perl with GNU Make and GCC.  [perl #123440]
1052
1053 =item *
1054
1055 C<truncate($filename, $size)> now works for files over 4GB in size.
1056 [perl #125347]
1057
1058 =item *
1059
1060 Parallel building has been added to the dmake C<makefile.mk> makefile. All
1061 Win32 compilers are supported.
1062
1063 =item *
1064
1065 Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would
1066 result in an invalid C<$Config{archname}> for the resulting perl.
1067 [perl #127584]
1068
1069 =item *
1070
1071 Errors set by Winsock functions are now put directly into C<$^E>, and the
1072 relevant C<WSAE*> error codes are now exported from the L<Errno> and L<POSIX>
1073 modules for testing this against.
1074
1075 The previous behaviour of putting the errors (converted to POSIX-style C<E*>
1076 error codes since Perl 5.20.0) into C<$!> was buggy due to the non-equivalence
1077 of like-named Winsock and POSIX error constants, a relationship between which
1078 has unfortunately been established in one way or another since Perl 5.8.0.
1079
1080 The new behaviour provides a much more robust solution for checking Winsock
1081 errors in portable software without accidentally matching POSIX tests that were
1082 intended for other OSes and may have different meanings for Winsock.
1083
1084 The old behaviour is currently retained, warts and all, for backwards
1085 compatibility, but users are encouraged to change any code that tests C<$!>
1086 against C<E*> constants for Winsock errors to instead test C<$^E> against
1087 C<WSAE*> constants.  After a suitable deprecation period, the old behaviour may
1088 be removed, leaving C<$!> unchanged after Winsock function calls, to avoid any
1089 possible confusion over which error variable to check.
1090
1091 =back
1092
1093 =item ppc64el floating point
1094
1095 The floating point format of ppc64el (Debian naming for little-endian
1096 PowerPC) is now detected correctly.
1097
1098 =back
1099
1100 =head1 Internal Changes
1101
1102 =over 4
1103
1104 =item *
1105
1106 The implementation of perl's context stack system, and its internal API,
1107 have been heavily reworked. Note that no significant changes have been
1108 made to any external APIs, but XS code which relies on such internal
1109 details may need to be fixed. The main changes are:
1110
1111 =over 4
1112
1113 =item *
1114
1115 The C<PUSHBLOCK()>, C<POPSUB()> etc. macros have been replaced with static
1116 inline functions such as C<cx_pushblock()>, C<cx_popsub()> etc. These use
1117 function args rather than implicitly relying on local vars such as
1118 C<gimme> and C<newsp> being available. Also their functionality has
1119 changed: in particular, C<cx_popblock()> no longer decrements
1120 C<cxstack_ix>. The ordering of the steps in the C<pp_leave*> functions
1121 involving C<cx_popblock()>, C<cx_popsub()> etc. has changed. See the new
1122 documentation, L<perlguts/"Dynamic Scope and the Context Stack">, for
1123 details on how to use them.
1124
1125 =item *
1126
1127 Various macros, which now consistently have a CX_ prefix, have been added:
1128
1129   CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
1130
1131 or renamed:
1132
1133   CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
1134
1135 =item *
1136
1137 C<cx_pushblock()> now saves C<PL_savestack_ix> and C<PL_tmps_floor>, so
1138 C<pp_enter*> and C<pp_leave*> no longer do
1139
1140   ENTER; SAVETMPS; ....; LEAVE
1141
1142 =item *
1143
1144 C<cx_popblock()> now also restores C<PL_curpm>.
1145
1146 =item *
1147
1148 In C<dounwind()> for every context type, the current savestack frame is
1149 now processed before each context is popped; formerly this was only done
1150 for sub-like context frames. This action has been removed from
1151 C<cx_popsub()> and placed into its own macro, C<CX_LEAVE_SCOPE(cx)>, which
1152 must be called before C<cx_popsub()> etc.
1153
1154 C<dounwind()> now also does a C<cx_popblock()> on the last popped frame
1155 (formerly it only did the C<cx_popsub()> etc. actions on each frame).
1156
1157 =item *
1158
1159 The temps stack is now freed on scope exit; previously, temps created
1160 during the last statement of a block wouldn't be freed until the next
1161 C<nextstate> following the block (apart from an existing hack that did
1162 this for recursive subs in scalar context); and in something like
1163 C<f(g())>, the temps created by the last statement in C<g()> would
1164 formerly not be freed until the statement following the return from
1165 C<f()>.
1166
1167 =item *
1168
1169 Most values that were saved on the savestack on scope entry are now
1170 saved in suitable new fields in the context struct, and saved and
1171 restored directly by C<cx_pushfoo()> and C<cx_popfoo()>, which is much
1172 faster.
1173
1174 =item *
1175
1176 Various context struct fields have been added, removed or modified.
1177
1178 =item *
1179
1180 The handling of C<@_> in C<cx_pushsub()> and C<cx_popsub()> has been
1181 considerably tidied up, including removing the C<argarray> field from the
1182 context struct, and extracting out some common (but rarely used) code into
1183 a separate function, C<clear_defarray()>. Also, useful subsets of
1184 C<cx_popsub()> which had been unrolled in places like C<pp_goto> have been
1185 gathered into the new functions C<cx_popsub_args()> and
1186 C<cx_popsub_common()>.
1187
1188 =item *
1189
1190 C<pp_leavesub> and C<pp_leavesublv> now use the same function as the rest
1191 of the C<pp_leave*>'s to process return args.
1192
1193 =item *
1194
1195 C<CXp_FOR_PAD> and C<CXp_FOR_GV> flags have been added, and
1196 C<CXt_LOOP_FOR> has been split into C<CXt_LOOP_LIST>, C<CXt_LOOP_ARY>.
1197
1198 =item *
1199
1200 Some variables formerly declared by C<dMULTICALL> (but not documented) have
1201 been removed.
1202
1203 =back
1204
1205 =item *
1206
1207 The obscure C<PL_timesbuf> variable, effectively a vestige of Perl 1, has
1208 been removed. It was documented as deprecated in Perl 5.20, with a statement
1209 that it would be removed early in the 5.21.x series; that has now finally
1210 happened.
1211 L<[perl #121351]|https://rt.perl.org/Ticket/Display.html?id=121351>
1212
1213 =item *
1214
1215 Remove unwarranted assertion in C<Perl_newATTRSUB_x()>. If a stub subroutine
1216 definition with a prototype has been seen, then any subsequent stub (or
1217 definition) of the same subroutine with an attribute was causing an assertion
1218 failure because of a null pointer.
1219 L<[perl #126845]|https://rt.perl.org/Ticket/Display.html?id=126845>
1220
1221 =item *
1222
1223 Replace C<::> with C<__> in C<ExtUtils::ParseXS> like it's done for
1224 parameters/return values. This is more consistent, and simplifies writing XS
1225 code wrapping C++ classes into a nested Perl namespace (it requires only
1226 a typedef for C<Foo__Bar> rather than two, one for C<Foo_Bar> and the other
1227 for C<Foo::Bar>).
1228
1229 =item *
1230
1231 Deprecate the C<to_utf8_case()> function, see
1232 L<http://nntp.perl.org/group/perl.perl5.porters/233287>.
1233
1234 =item *
1235
1236 Perl core code and the threads extension have been annotated so that,
1237 if Perl is configured to use threads, then during compile-time clang (3.6
1238 or later) will warn about suspicious uses of mutexes.
1239 See L<http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more
1240 information.
1241
1242 =item *
1243
1244 The C<signbit()> emulation has been enhanced.  This will help older
1245 and/or more exotic platforms or configurations.
1246
1247 =item *
1248
1249 The C<to_utf8_case> function is discouraged in favor of C<toUPPER_utf8>,
1250 C<toTITLE_utf8>, C<toLOWER_utf8>, and C<toFOLD_utf8>.
1251
1252 =item *
1253
1254 EBCDIC code paths have largely been unified with non-EBCDIC ones to
1255 avoid repetition and make maintenance easier.
1256
1257 =item *
1258
1259 MSWin32 code for C<$^X> has been moved out of the F<win32> directory to
1260 F<caretx.c>, where other operating systems set that variable.
1261
1262 =item *
1263
1264 C<< sv_ref() >> is now part of the API.
1265
1266 =item *
1267
1268 L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>.  It
1269 previously has always returned C<0> since Perl 5.000 stable but that was
1270 undocumented.  Although C<sv_backoff> is marked as public API, XS code is not
1271 expected to be impacted since the proper API call would be through public API
1272 C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public
1273 C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a
1274 meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>.
1275
1276 =item *
1277
1278 The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues
1279 with integer truncation and wrapping.  In particular, some casts formerly used
1280 within the macros have been removed.  This means for example that passing an
1281 unsigned nitems argument is likely to raise a compiler warning now (it's always
1282 been documented to require a signed value; formerly int, lately SSize_t).
1283
1284 =item *
1285
1286 C<PL_sawalias> and C<GPf_ALIASED_SV> have been removed.
1287
1288 =item *
1289
1290 C<GvASSIGN_GENERATION> and C<GvASSIGN_GENERATION_set> have been removed.
1291
1292 =back
1293
1294 =head1 Selected Bug Fixes
1295
1296 =over 4
1297
1298 =item *
1299
1300 It now works properly to specify a user-defined property, such as
1301
1302  qr/\p{mypkg1::IsMyProperty}/i
1303
1304 with C</i> caseless matching, an explicit package name, and
1305 I<IsMyProperty> not defined at the time of the pattern compilation.
1306
1307 =item *
1308
1309 Perl's memcpy(), memmove(), memset() and memcmp() fallbacks are now
1310 more compatible with the originals.  [perl #127619]
1311
1312 =item *
1313
1314 Fixed the issue where a C<< s///r >>) with B<< -DPERL_NO_COW >> attempts
1315 to modify the source SV, resulting in the program dying. [perl #127635]
1316
1317 =item *
1318
1319 Fixed a spurious warning about posix character classes. [perl #127581]
1320
1321 =item *
1322
1323 Fixed an obscure case where a pattern could fail to match. This only 
1324 occurred when matching characters from the set of C1 controls, when
1325 the target matched string was in UTF-8, and only on EBCDIC platforms.
1326
1327 =item *
1328
1329 Narrow the filename check in F<strict.pm> and F<warnings.pm>. Previously,
1330 it assumed that if the filename (without the F<.pmc?> extension) differed
1331 from the package name, if was a misspelled use statement (i.e. C<use Strict>
1332 instead of C<use strict>). We now check whether there's really a 
1333 miscapitalization happening, and not another issue.
1334
1335 =item *
1336
1337 Turn an assertion into a more user friendly failure when parsing
1338 regexes. [perl #127599]
1339
1340 =item *
1341
1342 Correctly raise an error when trying to compile patterns with 
1343 unterminated character classes while there are trailing backslashes.
1344 [perl #126141].
1345
1346 =item *
1347
1348 Line numbers larger than 2**31-1 but less than 2**32 are no longer
1349 returned by caller() as negative numbers.  [perl #126991]
1350
1351 =item *
1352
1353 C<< unless ( I<assignment> ) >> now properly warns when syntax
1354 warnings are enabled.  [perl #127122]
1355
1356 =item *
1357
1358 Setting an C<ISA> glob to an array reference now properly adds
1359 C<isaelem> magic to any existing elements.  Previously modifying such
1360 an element would not update the ISA cache, so method calls would call
1361 the wrong function.  Perl would also crash if the C<ISA> glob was
1362 destroyed, since new code added in 5.23.7 would try to release the
1363 C<isaelem> magic from the elements.  [perl #127351]
1364
1365 =item *
1366
1367 If a here-doc was found while parsing another operator, the parser had
1368 already read end of file, and the here-doc was not terminated, perl
1369 could produce an assertion or a segmentation fault.  This now reliably
1370 complains about the unterminated here-doc.  [perl #125540]
1371
1372 =item *
1373
1374 untie() would sometimes return the last value returned by the UNTIE()
1375 handler as well as it's normal value, messing up the stack.  [perl
1376 #126621]
1377
1378 =item *
1379
1380 Fixed an operator precedence problem when C< castflags & 2> is true.
1381 [perl #127474]
1382
1383 =item *
1384
1385 Caching of DESTROY methods could result in a non-pointer or a
1386 non-STASH stored in the SvSTASH() slot of a stash, breaking the B
1387 STASH() method.  The DESTROY method is now cached in the MRO metadata
1388 for the stash.  [perl #126410]
1389
1390 =item *
1391
1392 The AUTOLOAD method is now called when searching for a DESTROY method,
1393 and correctly sets C<$AUTOLOAD> too.  [perl #124387]  [perl #127494]
1394
1395 =item *
1396
1397 Avoid parsing beyond the end of the buffer when processing a C<#line>
1398 directive with no filename.  [perl #127334]
1399
1400 =item *
1401
1402 Perl now raises a warning when a regular expression pattern looks like
1403 it was supposed to contain a POSIX class, like C<qr/[[:alpha:]]/>, but
1404 there was some slight defect in its specification which causes it to
1405 instead be treated as a regular bracketed character class.  An example
1406 would be missing the second colon in the above like this:
1407 C<qr/[[:alpha]]/>.  This compiles to match a sequence of two characters.
1408 The second is C<"]">, and the first is any of: C<"[">, C<":">, C<"a">,
1409 C<"h">, C<"l">, or C<"p">.   This is unlikely to be the intended
1410 meaning, and now a warning is raised.  No warning is raised unless the
1411 specification is very close to one of the 14 legal POSIX classes.  (See
1412 L<perlrecharclass/POSIX Character Classes>.)
1413 [perl #8904]
1414
1415 =item *
1416
1417 Certain regex patterns involving a complemented POSIX class in an
1418 inverted bracketed character class, and matching something else
1419 optionally would improperly fail to match.  An example of one that could
1420 fail is C<qr/_?[^\Wbar]\x{100}/>.  This has been fixed.
1421 [perl #127537]
1422
1423 =item *
1424
1425 Perl 5.22 added support to the C99 hexadecimal floating point notation,
1426 but sometimes misparses hex floats. This has been fixed.
1427 [perl #127183]
1428
1429 =item *
1430
1431 A regression that allowed undeclared barewords in hash keys to work despite
1432 strictures has been fixed.
1433 L<[perl #126981]|https://rt.perl.org/Ticket/Display.html?id=126981>
1434
1435 =item *
1436
1437 Calls to the placeholder C<&PL_sv_yes> used internally when an C<import()>
1438 or C<unimport()> method isn't found now correctly handle scalar context.
1439 L<[perl #126042]|https://rt.perl.org/Ticket/Display.html?id=126042>
1440
1441 =item *
1442
1443 Report more context when we see an array where we expect to see an
1444 operator and avoid an assertion failure.
1445 L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737>
1446
1447 =item *
1448
1449 Modifying an array that was previously a package C<@ISA> no longer
1450 causes assertion failures or crashes.
1451 L<[perl #123788]|https://rt.perl.org/Ticket/Display.html?id=123788>
1452
1453 =item *
1454
1455 Retain binary compatibility across plain and DEBUGGING perl builds.
1456 L<[perl #127212]|https://rt.perl.org/Ticket/Display.html?id=127212>
1457
1458 =item *
1459
1460 Avoid leaking memory when setting C<$ENV{foo}> on darwin.
1461 L<[perl #126240]|https://rt.perl.org/Ticket/Display.html?id=126240>
1462
1463 =item *
1464
1465 C</...\G/> no longer crashes on utf8 strings. When C<\G> is a fixed number
1466 of characters from the start of the regex, perl needs to count back that
1467 many characters from the current C<pos()> position and start matching from
1468 there. However, it was counting back bytes rather than characters, which
1469 could lead to panics on utf8 strings.
1470
1471 =item *
1472
1473 In some cases operators that return integers would return negative
1474 integers as large positive integers.
1475 L<[perl #126635]|https://rt.perl.org/Ticket/Display.html?id=126635>
1476
1477 =item *
1478
1479 The C<pipe()> operator would assert for DEBUGGING builds instead of
1480 producing the correct error message.  The condition asserted on is
1481 detected and reported on correctly without the assertions, so the
1482 assertions were removed.
1483 L<[perl #126480]|https://rt.perl.org/Ticket/Display.html?id=126480>
1484
1485 =item *
1486
1487 In some cases, failing to parse a here-doc would attempt to use freed
1488 memory.  This was caused by a pointer not being restored correctly.
1489 L<[perl #126443]|https://rt.perl.org/Ticket/Display.html?id=126443>
1490
1491 =item *
1492
1493 C<< @x = sort { *a = 0; $a <=> $b } 0 .. 1 >> no longer frees the GP
1494 for *a before restoring its SV slot.
1495 L<[perl #124097]|https://rt.perl.org/Ticket/Display.html?id=124097>
1496
1497 =item *
1498
1499 Multiple problems with the new hexadecimal floating point printf
1500 format C<%a> were fixed:
1501 L<[perl #126582]|https://rt.perl.org/Ticket/Display.html?id=126582>,
1502 L<[perl #126586]|https://rt.perl.org/Ticket/Display.html?id=126586>,
1503 L<[perl #126822]|https://rt.perl.org/Ticket/Display.html?id=126822>
1504
1505 =item *
1506
1507 Calling mg_set() in leave_scope() no longer leaks.
1508
1509 =item *
1510
1511 A regression from Perl v5.20 was fixed in which debugging output of regular
1512 expression compilation was wrong.  (The pattern was correctly compiled, but
1513 what got displayed for it was wrong.)
1514
1515 =item *
1516
1517 C<\b{sb}> works much better.  In Perl v5.22.0, this new construct didn't
1518 seem to give the expected results, yet passed all the tests in the
1519 extensive suite furnished by Unicode.  It turns out that it was because
1520 these were short input strings, and the failures had to do with longer
1521 inputs.
1522
1523 =item *
1524
1525 Certain syntax errors in
1526 L<perlrecharclass/Extended Bracketed Character Classes> caused panics
1527 instead of the proper error message.  This has now been fixed. [perl
1528 #126481]
1529
1530 =item *
1531
1532 An earlier commit added a message when a quantifier in a regular
1533 expression was useless, but then caused the parser to skip it;
1534 this caused the surplus quantifier to be silently ignored, instead
1535 of throwing an error. This is now fixed. [perl #126253]
1536
1537 =item *
1538
1539 The switch to building non-XS modules last in win32/makefile.mk (introduced
1540 by design as part of the changes to enable parallel building) caused the
1541 build of POSIX to break due to problems with the version module. This
1542 is now fixed.
1543
1544 =item *
1545
1546 Improved parsing of hex float constants.
1547
1548 =item *
1549
1550 Fixed an issue with C<< pack >> where C<< pack "H" >> (and C<< pack "h" >>)
1551 could read past the source when given a non-utf8 source, and a utf8 target.
1552 [perl #126325]
1553
1554 =item *
1555
1556 Fixed several cases where perl would abort due to a segmentation fault,
1557 or a C-level assert. [perl #126615], [perl #126602], [perl #126193].
1558
1559 =item *
1560
1561 There were places in regular expression patterns where comments (C<(?#...)>)
1562 weren't allowed, but should have been.  This is now fixed.
1563 L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639>
1564
1565 =item *
1566
1567 Some regressions from Perl 5.20 have been fixed, in which some syntax errors in
1568 L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs
1569 within regular expression patterns could cause a segfault instead of a proper
1570 error message.
1571 L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180>
1572 L<[perl #126404]|https://rt.perl.org/Ticket/Display.html?id=126404>
1573
1574 =item *
1575
1576 Another problem with
1577 L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes>
1578 constructs has been fixed wherein things like C<\c]> could cause panics.
1579 L<[perl #126181]|https://rt.perl.org/Ticket/Display.html?id=126181>
1580
1581 =item *
1582
1583 Some problems with attempting to extend the perl stack to around 2G or 4G
1584 entries have been fixed.  This was particularly an issue on 32-bit perls built
1585 to use 64-bit integers, and was easily noticeable with the list repetition
1586 operator, e.g.
1587
1588     @a = (1) x $big_number
1589
1590 Formerly perl may have crashed, depending on the exact value of C<$big_number>;
1591 now it will typically raise an exception.
1592 L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937>
1593
1594 =item *
1595
1596 In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if
1597 the condition is C<(?!)> then perl failed the match outright instead of
1598 matching the no-pattern.  This has been fixed.
1599 L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222>
1600
1601 =item *
1602
1603 The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional
1604 argument and set C<REGERROR>/C<REGMARK> appropriately as well.
1605 L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186>
1606
1607 =item *
1608
1609 Several bugs, including a segmentation fault, have been fixed with the bounds
1610 checking constructs (introduced in Perl 5.22) C<\b{gcb}>, C<\b{sb}>, C<\b{wb}>,
1611 C<\B{gcb}>, C<\B{sb}>, and C<\B{wb}>.  All the C<\B{}> ones now match an empty
1612 string; none of the C<\b{}> ones do.
1613 L<[perl #126319]|https://rt.perl.org/Ticket/Display.html?id=126319>
1614
1615 =item *
1616
1617 Duplicating a closed file handle for write no longer creates a
1618 filename of the form F<GLOB(0xXXXXXXXX)>.  [perl #125115]
1619
1620 =item *
1621
1622 Warning fatality is now ignored when rewinding the stack.  This
1623 prevents infinite recursion when the now fatal error also causes
1624 rewinding of the stack.  [perl #123398]
1625
1626 =item * 
1627
1628 In perl v5.22.0, the logic changed when parsing a numeric parameter to the -C
1629 option, such that the successfully parsed number was not saved as the option
1630 value if it parsed to the end of the argument.  [perl #125381]
1631
1632 =item *
1633
1634 The PadlistNAMES macro is an lvalue again.
1635
1636 =item *
1637
1638 Zero -DPERL_TRACE_OPS memory for sub-threads.
1639
1640 perl_clone_using() was missing Zero init of PL_op_exec_cnt[].  This
1641 caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly
1642 large op-counts at destruct.  These counts would print %x as "ABABABAB",
1643 clearly a mem-poison value.
1644
1645 =item *
1646
1647 A leak in the XS typemap caused one scalar to be leaked each time a C<FILE *>
1648 or a C<PerlIO *> was C<OUTPUT:>ed or imported to Perl, since perl 5.000. These
1649 particular typemap entries are thought to be extremely rarely used by XS
1650 modules. [perl #124181]
1651
1652 =item *
1653
1654 C<alarm()> and C<sleep()> will now warn if the argument is a negative number
1655 and return undef. Previously they would pass the negative value to the
1656 underlying C function which may have set up a timer with a surprising value.
1657
1658 =item *
1659
1660 Perl can again be compiled with any Unicode version.  This used to
1661 (mostly) work, but was lost in v5.18 through v5.20.  The property
1662 C<Name_Alias> did not exist prior to Unicode 5.0.  L<Unicode::UCD>
1663 incorrectly said it did.  This has been fixed.
1664
1665 =item *
1666
1667 Very large code-points (beyond Unicode) in regular expressions no
1668 longer cause a buffer overflow in some cases when converted to UTF-8.
1669 L<[perl #125826]|https://rt.perl.org/Ticket/Display.html?id=125826>
1670
1671 =item *
1672
1673 The integer overflow check for the range operator (...) in list
1674 context now correctly handles the case where the size of the range is
1675 larger than the address space.  This could happen on 32-bits with
1676 -Duse64bitint.
1677 L<[perl #125781]|https://rt.perl.org/Ticket/Display.html?id=125781>
1678
1679 =item *
1680
1681 A crash with C<< %::=(); J->${\"::"} >> has been fixed.
1682 L<[perl #125541]|https://rt.perl.org/Ticket/Display.html?id=125541>
1683
1684 =item *
1685
1686 C<qr/(?[ () ])/> no longer segfaults, giving a syntax error message instead.
1687 [perl #125805]
1688
1689 =item *
1690
1691 Regular expression possessive quantifier v5.20 regression now fixed.
1692 C<qr/>I<PAT>C<{>I<min>,I<max>C<}+>C</> is supposed to behave identically
1693 to C<qr/(?E<gt>>I<PAT>C<{>I<min>,I<max>C<})/>.  Since v5.20, this didn't
1694 work if I<min> and I<max> were equal.  [perl #125825]
1695
1696 =item *
1697
1698 C<< BEGIN <> >> no longer segfaults and properly produces an error
1699 message.  [perl #125341]
1700
1701 =item *
1702
1703 In C<tr///> an illegal backwards range like C<tr/\x{101}-\x{100}//> was
1704 not always detected, giving incorrect results.  This is now fixed.
1705
1706 =back
1707
1708 =head1 Acknowledgements
1709
1710 [ XXX: generate this just in time, Ricardo! ]
1711
1712 =head1 Reporting Bugs
1713
1714 If you find what you think is a bug, you might check the articles recently
1715 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
1716 https://rt.perl.org/ .  There may also be information at
1717 http://www.perl.org/ , the Perl Home Page.
1718
1719 If you believe you have an unreported bug, please run the L<perlbug> program
1720 included with your release.  Be sure to trim your bug down to a tiny but
1721 sufficient test case.  Your bug report, along with the output of C<perl -V>,
1722 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
1723
1724 If the bug you are reporting has security implications which make it
1725 inappropriate to send to a publicly archived mailing list, then see
1726 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
1727 for details of how to report the issue.
1728
1729 =head1 SEE ALSO
1730
1731 The F<Changes> file for an explanation of how to view exhaustive details on
1732 what changed.
1733
1734 The F<INSTALL> file for how to build Perl.
1735
1736 The F<README> file for general stuff.
1737
1738 The F<Artistic> and F<Copying> files for copyright information.
1739
1740 =cut