1PERL5240DELTA(1)       Perl Programmers Reference Guide       PERL5240DELTA(1)
2
3
4

NAME

6       perl5240delta - what is new for perl v5.24.0
7

DESCRIPTION

9       This document describes the differences between the 5.22.0 release and
10       the 5.24.0 release.
11

Core Enhancements

13   Postfix dereferencing is no longer experimental
14       Using the "postderef" and "postderef_qq" features no longer emits a
15       warning. Existing code that disables the "experimental::postderef"
16       warning category that they previously used will continue to work. The
17       "postderef" feature has no effect; all Perl code can use postfix
18       dereferencing, regardless of what feature declarations are in scope.
19       The 5.24 feature bundle now includes the "postderef_qq" feature.
20
21   Unicode 8.0 is now supported
22       For details on what is in this release, see
23       <http://www.unicode.org/versions/Unicode8.0.0/>.
24
25   perl will now croak when closing an in-place output file fails
26       Until now, failure to close the output file for an in-place edit was
27       not detected, meaning that the input file could be clobbered without
28       the edit being successfully completed.  Now, when the output file
29       cannot be closed successfully, an exception is raised.
30
31   New "\b{lb}" boundary in regular expressions
32       "lb" stands for Line Break.  It is a Unicode property that determines
33       where a line of text is suitable to break (typically so that it can be
34       output without overflowing the available horizontal space).  This
35       capability has long been furnished by the Unicode::LineBreak module,
36       but now a light-weight, non-customizable version that is suitable for
37       many purposes is in core Perl.
38
39   "qr/(?[ ])/" now works in UTF-8 locales
40       Extended Bracketed Character Classes now will successfully compile when
41       "use locale" is in effect.  The compiled pattern will use standard
42       Unicode rules.  If the runtime locale is not a UTF-8 one, a warning is
43       raised and standard Unicode rules are used anyway.  No tainting is done
44       since the outcome does not actually depend on the locale.
45
46   Integer shift ("<<" and ">>") now more explicitly defined
47       Negative shifts are reverse shifts: left shift becomes right shift, and
48       right shift becomes left shift.
49
50       Shifting by the number of bits in a native integer (or more) is zero,
51       except when the "overshift" is right shifting a negative value under
52       "use integer", in which case the result is -1 (arithmetic shift).
53
54       Until now negative shifting and overshifting have been undefined
55       because they have relied on whatever the C implementation happens to
56       do.  For example, for the overshift a common C behavior is "modulo
57       shift":
58
59         1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1  # Common C behavior.
60
61         # And the same for <<, while Perl now produces 0 for both.
62
63       Now these behaviors are well-defined under Perl, regardless of what the
64       underlying C implementation does.  Note, however, that you are still
65       constrained by the native integer width: you need to know how far left
66       you can go.  You can use for example:
67
68         use Config;
69         my $wordbits = $Config{uvsize} * 8;  # Or $Config{uvsize} << 3.
70
71       If you need a more bits on the left shift, you can use for example the
72       "bigint" pragma, or the "Bit::Vector" module from CPAN.
73
74   printf and sprintf now allow reordered precision arguments
75       That is, "sprintf '|%.*2$d|', 2, 3" now returns "|002|". This extends
76       the existing reordering mechanism (which allows reordering for
77       arguments that are used as format fields, widths, and vector
78       separators).
79
80   More fields provided to "sigaction" callback with "SA_SIGINFO"
81       When passing the "SA_SIGINFO" flag to sigaction, the "errno", "status",
82       "uid", "pid", "addr" and "band" fields are now included in the hash
83       passed to the handler, if supported by the platform.
84
85   Hashbang redirection to Perl 6
86       Previously perl would redirect to another interpreter if it found a
87       hashbang path unless the path contains "perl" (see perlrun). To improve
88       compatibility with Perl 6 this behavior has been extended to also
89       redirect if "perl" is followed by "6".
90

Security

92   Set proper umask before calling mkstemp(3)
93       In 5.22 perl started setting umask to 0600 before calling mkstemp(3)
94       and restoring it afterwards. This wrongfully tells open(2) to strip the
95       owner read and write bits from the given mode before applying it,
96       rather than the intended negation of leaving only those bits in place.
97
98       Systems that use mode 0666 in mkstemp(3) (like old versions of glibc)
99       create a file with permissions 0066, leaving world read and write
100       permissions regardless of current umask.
101
102       This has been fixed by using umask 0177 instead. [perl #127322]
103
104   Fix out of boundary access in Win32 path handling
105       This is CVE-2015-8608.  For more information see [GH #15067]
106       <https://github.com/Perl/perl5/issues/15067>
107
108   Fix loss of taint in canonpath
109       This is CVE-2015-8607.  For more information see [GH #15084]
110       <https://github.com/Perl/perl5/issues/15084>
111
112   Avoid accessing uninitialized memory in win32 crypt()
113       Added validation that will detect both a short salt and invalid
114       characters in the salt.  [GH #15091]
115       <https://github.com/Perl/perl5/issues/15091>
116
117   Remove duplicate environment variables from "environ"
118       Previously, if an environment variable appeared more than once in
119       "environ[]", %ENV would contain the last entry for that name, while a
120       typical getenv() would return the first entry. We now make sure %ENV
121       contains the same as what "getenv" returns.
122
123       Second, we remove duplicates from "environ[]", so if a setting with
124       that name is set in %ENV, we won't pass an unsafe value to a child
125       process.
126
127       [CVE-2016-2381]
128

Incompatible Changes

130   The "autoderef" feature has been removed
131       The experimental "autoderef" feature (which allowed calling "push",
132       "pop", "shift", "unshift", "splice", "keys", "values", and "each" on a
133       scalar argument) has been deemed unsuccessful. It has now been removed;
134       trying to use the feature (or to disable the "experimental::autoderef"
135       warning it previously triggered) now yields an exception.
136
137   Lexical $_ has been removed
138       "my $_" was introduced in Perl 5.10, and subsequently caused much
139       confusion with no obvious solution.  In Perl 5.18.0, it was made
140       experimental on the theory that it would either be removed or
141       redesigned in a less confusing (but backward-incompatible) way.  Over
142       the following years, no alternatives were proposed.  The feature has
143       now been removed and will fail to compile.
144
145   "qr/\b{wb}/" is now tailored to Perl expectations
146       This is now more suited to be a drop-in replacement for plain "\b", but
147       giving better results for parsing natural language.  Previously it
148       strictly followed the current Unicode rules which calls for it to match
149       between each white space character.  Now it doesn't generally match
150       within spans of white space, behaving like "\b" does.  See "\b{wb}" in
151       perlrebackslash
152
153   Regular expression compilation errors
154       Some regular expression patterns that had runtime errors now don't
155       compile at all.
156
157       Almost all Unicode properties using the "\p{}" and "\P{}" regular
158       expression pattern constructs are now checked for validity at pattern
159       compilation time, and invalid ones will cause the program to not
160       compile.  In earlier releases, this check was often deferred until run
161       time.  Whenever an error check is moved from run- to compile time,
162       erroneous code is caught 100% of the time, whereas before it would only
163       get caught if and when the offending portion actually gets executed,
164       which for unreachable code might be never.
165
166   "qr/\N{}/" now disallowed under "use re "strict""
167       An empty "\N{}" makes no sense, but for backwards compatibility is
168       accepted as doing nothing, though a deprecation warning is raised by
169       default.  But now this is a fatal error under the experimental feature
170       "'strict' mode" in re.
171
172   Nested declarations are now disallowed
173       A "my", "our", or "state" declaration is no longer allowed inside of
174       another "my", "our", or "state" declaration.
175
176       For example, these are now fatal:
177
178          my ($x, my($y));
179          our (my $x);
180
181       [GH #14799] <https://github.com/Perl/perl5/issues/14799>
182
183       [GH #13548] <https://github.com/Perl/perl5/issues/13548>
184
185   The "/\C/" character class has been removed.
186       This regular expression character class was deprecated in v5.20.0 and
187       has produced a deprecation warning since v5.22.0. It is now a compile-
188       time error. If you need to examine the individual bytes that make up a
189       UTF8-encoded character, then use utf8::encode() on the string (or a
190       copy) first.
191
192   chdir('') no longer chdirs home
193       Using chdir('') or chdir(undef) to chdir home has been deprecated since
194       perl v5.8, and will now fail.  Use chdir() instead.
195
196   ASCII characters in variable names must now be all visible
197       It was legal until now on ASCII platforms for variable names to contain
198       non-graphical ASCII control characters (ordinals 0 through 31, and 127,
199       which are the C0 controls and "DELETE").  This usage has been
200       deprecated since v5.20, and as of now causes a syntax error.  The
201       variables these names referred to are special, reserved by Perl for
202       whatever use it may choose, now, or in the future.  Each such variable
203       has an alternative way of spelling it.  Instead of the single non-
204       graphic control character, a two character sequence beginning with a
205       caret is used, like $^] and "${^GLOBAL_PHASE}".  Details are at
206       perlvar.   It remains legal, though unwise and deprecated (raising a
207       deprecation warning), to use certain non-graphic non-ASCII characters
208       in variables names when not under "use utf8".  No code should do this,
209       as all such variables are reserved by Perl, and Perl doesn't currently
210       define any of them (but could at any time, without notice).
211
212   An off by one issue in $Carp::MaxArgNums has been fixed
213       $Carp::MaxArgNums is supposed to be the number of arguments to display.
214       Prior to this version, it was instead showing $Carp::MaxArgNums + 1
215       arguments, contrary to the documentation.
216
217   Only blanks and tabs are now allowed within "[...]" within "(?[...])".
218       The experimental Extended Bracketed Character Classes can contain
219       regular bracketed character classes within them.  These differ from
220       regular ones in that white space is generally ignored, unless escaped
221       by preceding it with a backslash.  The white space that is ignored is
222       now limited to just tab "\t" and SPACE characters.  Previously, it was
223       any white space.  See "Extended Bracketed Character Classes" in
224       perlrecharclass.
225

Deprecations

227   Using code points above the platform's "IV_MAX" is now deprecated
228       Unicode defines code points in the range "0..0x10FFFF".  Some standards
229       at one time defined them up to 2**31 - 1, but Perl has allowed them to
230       be as high as anything that will fit in a word on the platform being
231       used.  However, use of those above the platform's "IV_MAX" is broken in
232       some constructs, notably "tr///", regular expression patterns involving
233       quantifiers, and in some arithmetic and comparison operations, such as
234       being the upper limit of a loop.  Now the use of such code points
235       raises a deprecation warning, unless that warning category is turned
236       off.  "IV_MAX" is typically 2**31 -1 on 32-bit platforms, and 2**63-1
237       on 64-bit ones.
238
239   Doing bitwise operations on strings containing code points above 0xFF is
240       deprecated
241       The string bitwise operators treat their operands as strings of bytes,
242       and values beyond 0xFF are nonsensical in this context.  To operate on
243       encoded bytes, first encode the strings.  To operate on code points'
244       numeric values, use "split" and "map ord".  In the future, this warning
245       will be replaced by an exception.
246
247   sysread(), syswrite(), recv() and send() are deprecated on :utf8 handles
248       The sysread(), recv(), syswrite() and send() operators are deprecated
249       on handles that have the ":utf8" layer, either explicitly, or
250       implicitly, eg., with the :encoding(UTF-16LE) layer.
251
252       Both sysread() and recv() currently use only the ":utf8" flag for the
253       stream, ignoring the actual layers.  Since sysread() and recv() do no
254       UTF-8 validation they can end up creating invalidly encoded scalars.
255
256       Similarly, syswrite() and send() use only the ":utf8" flag, otherwise
257       ignoring any layers.  If the flag is set, both write the value UTF-8
258       encoded, even if the layer is some different encoding, such as the
259       example above.
260
261       Ideally, all of these operators would completely ignore the ":utf8"
262       state, working only with bytes, but this would result in silently
263       breaking existing code.  To avoid this a future version of perl will
264       throw an exception when any of sysread(), recv(), syswrite() or send()
265       are called on handle with the ":utf8" layer.
266

Performance Enhancements

268       •   The overhead of scope entry and exit has been considerably reduced,
269           so for example subroutine calls, loops and basic blocks are all
270           faster now.  This empty function call now takes about a third less
271           time to execute:
272
273               sub f{} f();
274
275       •   Many languages, such as Chinese, are caseless.  Perl now knows
276           about most common ones, and skips much of the work when a program
277           tries to change case in them (like ucfirst()) or match caselessly
278           ("qr//i").  This will speed up a program, such as a web server,
279           that can operate on multiple languages, while it is operating on a
280           caseless one.
281
282       •   "/fixed-substr/" has been made much faster.
283
284           On platforms with a libc memchr() implementation which makes good
285           use of underlying hardware support, patterns which include fixed
286           substrings will now often be much faster; for example with glibc on
287           a recent x86_64 CPU, this:
288
289               $s = "a" x 1000 . "wxyz";
290               $s =~ /wxyz/ for 1..30000
291
292           is now about 7 times faster.  On systems with slow memchr(), e.g.
293           32-bit ARM Raspberry Pi, there will be a small or little speedup.
294           Conversely, some pathological cases, such as ""ab" x 1000 =~ /aa/"
295           will be slower now; up to 3 times slower on the rPi, 1.5x slower on
296           x86_64.
297
298       •   Faster addition, subtraction and multiplication.
299
300           Since 5.8.0, arithmetic became slower due to the need to support
301           64-bit integers. To deal with 64-bit integers, a lot more corner
302           cases need to be checked, which adds time. We now detect common
303           cases where there is no need to check for those corner cases, and
304           special-case them.
305
306       •   Preincrement, predecrement, postincrement, and postdecrement have
307           been made faster by internally splitting the functions which
308           handled multiple cases into different functions.
309
310       •   Creating Perl debugger data structures (see "Debugger Internals" in
311           perldebguts) for XSUBs and const subs has been removed.  This
312           removed one glob/scalar combo for each unique ".c" file that XSUBs
313           and const subs came from.  On startup ("perl -e"0"") about half a
314           dozen glob/scalar debugger combos were created.  Loading XS modules
315           created more glob/scalar combos.  These things were being created
316           regardless of whether the perl debugger was being used, and despite
317           the fact that it can't debug C code anyway
318
319       •   On Win32, "stat"ing or "-X"ing a path, if the file or directory
320           does not exist, is now 3.5x faster than before.
321
322       •   Single arguments in list assign are now slightly faster:
323
324             ($x) = (...);
325             (...) = ($x);
326
327       •   Less peak memory is now used when compiling regular expression
328           patterns.
329

Modules and Pragmata

331   Updated Modules and Pragmata
332       •   arybase has been upgraded from version 0.10 to 0.11.
333
334       •   Attribute::Handlers has been upgraded from version 0.97 to 0.99.
335
336       •   autodie has been upgraded from version 2.26 to 2.29.
337
338       •   autouse has been upgraded from version 1.08 to 1.11.
339
340       •   B has been upgraded from version 1.58 to 1.62.
341
342       •   B::Deparse has been upgraded from version 1.35 to 1.37.
343
344       •   base has been upgraded from version 2.22 to 2.23.
345
346       •   Benchmark has been upgraded from version 1.2 to 1.22.
347
348       •   bignum has been upgraded from version 0.39 to 0.42.
349
350       •   bytes has been upgraded from version 1.04 to 1.05.
351
352       •   Carp has been upgraded from version 1.36 to 1.40.
353
354       •   Compress::Raw::Bzip2 has been upgraded from version 2.068 to 2.069.
355
356       •   Compress::Raw::Zlib has been upgraded from version 2.068 to 2.069.
357
358       •   Config::Perl::V has been upgraded from version 0.24 to 0.25.
359
360       •   CPAN::Meta has been upgraded from version 2.150001 to 2.150005.
361
362       •   CPAN::Meta::Requirements has been upgraded from version 2.132 to
363           2.140.
364
365       •   CPAN::Meta::YAML has been upgraded from version 0.012 to 0.018.
366
367       •   Data::Dumper has been upgraded from version 2.158 to 2.160.
368
369       •   Devel::Peek has been upgraded from version 1.22 to 1.23.
370
371       •   Devel::PPPort has been upgraded from version 3.31 to 3.32.
372
373       •   Dumpvalue has been upgraded from version 1.17 to 1.18.
374
375       •   DynaLoader has been upgraded from version 1.32 to 1.38.
376
377       •   Encode has been upgraded from version 2.72 to 2.80.
378
379       •   encoding has been upgraded from version 2.14 to 2.17.
380
381       •   encoding::warnings has been upgraded from version 0.11 to 0.12.
382
383       •   English has been upgraded from version 1.09 to 1.10.
384
385       •   Errno has been upgraded from version 1.23 to 1.25.
386
387       •   experimental has been upgraded from version 0.013 to 0.016.
388
389       •   ExtUtils::CBuilder has been upgraded from version 0.280221 to
390           0.280225.
391
392       •   ExtUtils::Embed has been upgraded from version 1.32 to 1.33.
393
394       •   ExtUtils::MakeMaker has been upgraded from version 7.04_01 to
395           7.10_01.
396
397       •   ExtUtils::ParseXS has been upgraded from version 3.28 to 3.31.
398
399       •   ExtUtils::Typemaps has been upgraded from version 3.28 to 3.31.
400
401       •   feature has been upgraded from version 1.40 to 1.42.
402
403       •   fields has been upgraded from version 2.17 to 2.23.
404
405       •   File::Find has been upgraded from version 1.29 to 1.34.
406
407       •   File::Glob has been upgraded from version 1.24 to 1.26.
408
409       •   File::Path has been upgraded from version 2.09 to 2.12_01.
410
411       •   File::Spec has been upgraded from version 3.56 to 3.63.
412
413       •   Filter::Util::Call has been upgraded from version 1.54 to 1.55.
414
415       •   Getopt::Long has been upgraded from version 2.45 to 2.48.
416
417       •   Hash::Util has been upgraded from version 0.18 to 0.19.
418
419       •   Hash::Util::FieldHash has been upgraded from version 1.15 to 1.19.
420
421       •   HTTP::Tiny has been upgraded from version 0.054 to 0.056.
422
423       •   I18N::Langinfo has been upgraded from version 0.12 to 0.13.
424
425       •   if has been upgraded from version 0.0604 to 0.0606.
426
427       •   IO has been upgraded from version 1.35 to 1.36.
428
429       •   IO-Compress has been upgraded from version 2.068 to 2.069.
430
431       •   IPC::Open3 has been upgraded from version 1.18 to 1.20.
432
433       •   IPC::SysV has been upgraded from version 2.04 to 2.06_01.
434
435       •   List::Util has been upgraded from version 1.41 to 1.42_02.
436
437       •   locale has been upgraded from version 1.06 to 1.08.
438
439       •   Locale::Codes has been upgraded from version 3.34 to 3.37.
440
441       •   Math::BigInt has been upgraded from version 1.9997 to 1.999715.
442
443       •   Math::BigInt::FastCalc has been upgraded from version 0.31 to 0.40.
444
445       •   Math::BigRat has been upgraded from version 0.2608 to 0.260802.
446
447       •   Module::CoreList has been upgraded from version 5.20150520 to
448           5.20160320.
449
450       •   Module::Metadata has been upgraded from version 1.000026 to
451           1.000031.
452
453       •   mro has been upgraded from version 1.17 to 1.18.
454
455       •   ODBM_File has been upgraded from version 1.12 to 1.14.
456
457       •   Opcode has been upgraded from version 1.32 to 1.34.
458
459       •   parent has been upgraded from version 0.232 to 0.234.
460
461       •   Parse::CPAN::Meta has been upgraded from version 1.4414 to 1.4417.
462
463       •   Perl::OSType has been upgraded from version 1.008 to 1.009.
464
465       •   perlfaq has been upgraded from version 5.021009 to 5.021010.
466
467       •   PerlIO::encoding has been upgraded from version 0.21 to 0.24.
468
469       •   PerlIO::mmap has been upgraded from version 0.014 to 0.016.
470
471       •   PerlIO::scalar has been upgraded from version 0.22 to 0.24.
472
473       •   PerlIO::via has been upgraded from version 0.15 to 0.16.
474
475       •   Pod::Functions has been upgraded from version 1.09 to 1.10.
476
477       •   Pod::Perldoc has been upgraded from version 3.25 to 3.25_02.
478
479       •   Pod::Simple has been upgraded from version 3.29 to 3.32.
480
481       •   Pod::Usage has been upgraded from version 1.64 to 1.68.
482
483       •   POSIX has been upgraded from version 1.53 to 1.65.
484
485       •   Scalar::Util has been upgraded from version 1.41 to 1.42_02.
486
487       •   SDBM_File has been upgraded from version 1.13 to 1.14.
488
489       •   SelfLoader has been upgraded from version 1.22 to 1.23.
490
491       •   Socket has been upgraded from version 2.018 to 2.020_03.
492
493       •   Storable has been upgraded from version 2.53 to 2.56.
494
495       •   strict has been upgraded from version 1.09 to 1.11.
496
497       •   Term::ANSIColor has been upgraded from version 4.03 to 4.04.
498
499       •   Term::Cap has been upgraded from version 1.15 to 1.17.
500
501       •   Test has been upgraded from version 1.26 to 1.28.
502
503       •   Test::Harness has been upgraded from version 3.35 to 3.36.
504
505       •   Thread::Queue has been upgraded from version 3.05 to 3.08.
506
507       •   threads has been upgraded from version 2.01 to 2.06.
508
509       •   threads::shared has been upgraded from version 1.48 to 1.50.
510
511       •   Tie::File has been upgraded from version 1.01 to 1.02.
512
513       •   Tie::Scalar has been upgraded from version 1.03 to 1.04.
514
515       •   Time::HiRes has been upgraded from version 1.9726 to 1.9732.
516
517       •   Time::Piece has been upgraded from version 1.29 to 1.31.
518
519       •   Unicode::Collate has been upgraded from version 1.12 to 1.14.
520
521       •   Unicode::Normalize has been upgraded from version 1.18 to 1.25.
522
523       •   Unicode::UCD has been upgraded from version 0.61 to 0.64.
524
525       •   UNIVERSAL has been upgraded from version 1.12 to 1.13.
526
527       •   utf8 has been upgraded from version 1.17 to 1.19.
528
529       •   version has been upgraded from version 0.9909 to 0.9916.
530
531       •   warnings has been upgraded from version 1.32 to 1.36.
532
533       •   Win32 has been upgraded from version 0.51 to 0.52.
534
535       •   Win32API::File has been upgraded from version 0.1202 to 0.1203.
536
537       •   XS::Typemap has been upgraded from version 0.13 to 0.14.
538
539       •   XSLoader has been upgraded from version 0.20 to 0.21.
540

Documentation

542   Changes to Existing Documentation
543       perlapi
544
545       •   The process of using undocumented globals has been documented,
546           namely, that one should send email to perl5-porters@perl.org
547           <mailto:perl5-porters@perl.org> first to get the go-ahead for
548           documenting and using an undocumented function or global variable.
549
550       perlcall
551
552       •   A number of cleanups have been made to perlcall, including:
553
554           •   use "EXTEND(SP, n)" and PUSHs() instead of XPUSHs() where
555               applicable and update prose to match
556
557           •   add POPu, POPul and POPpbytex to the "complete list of POP
558               macros" and clarify the documentation for some of the existing
559               entries, and a note about side-effects
560
561           •   add API documentation for POPu and POPul
562
563           •   use ERRSV more efficiently
564
565           •   approaches to thread-safety storage of SVs.
566
567       perlfunc
568
569       •   The documentation of "hex" has been revised to clarify valid
570           inputs.
571
572       •   Better explain meaning of negative PIDs in "waitpid".  [GH #15108]
573           <https://github.com/Perl/perl5/issues/15108>
574
575       •   General cleanup: there's more consistency now (in POD usage,
576           grammar, code examples), better practices in code examples (use of
577           "my", removal of bareword filehandles, dropped usage of "&" when
578           calling subroutines, ...), etc.
579
580       perlguts
581
582       •   A new section has been added, "Dynamic Scope and the Context Stack"
583           in perlguts, which explains how the perl context stack works.
584
585       perllocale
586
587       •   A stronger caution about using locales in threaded applications is
588           given.  Locales are not thread-safe, and you can get wrong results
589           or even segfaults if you use them there.
590
591       perlmodlib
592
593       •   We now recommend contacting the module-authors list or PAUSE in
594           seeking guidance on the naming of modules.
595
596       perlop
597
598       •   The documentation of "qx//" now describes how $? is affected.
599
600       perlpolicy
601
602       •   This note has been added to perlpolicy:
603
604            While civility is required, kindness is encouraged; if you have any
605            doubt about whether you are being civil, simply ask yourself, "Am I
606            being kind?" and aspire to that.
607
608       perlreftut
609
610       •   Fix some examples to be strict clean.
611
612       perlrebackslash
613
614       •   Clarify that in languages like Japanese and Thai, dictionary lookup
615           is required to determine word boundaries.
616
617       perlsub
618
619       •   Updated to note that anonymous subroutines can have signatures.
620
621       perlsyn
622
623       •   Fixed a broken example where "=" was used instead of "==" in
624           conditional in do/while example.
625
626       perltie
627
628       •   The usage of "FIRSTKEY" and "NEXTKEY" has been clarified.
629
630       perlunicode
631
632       •   Discourage use of 'In' as a prefix signifying the Unicode Block
633           property.
634
635       perlvar
636
637       •   The documentation of $@ was reworded to clarify that it is not just
638           for syntax errors in "eval".  [GH #14572]
639           <https://github.com/Perl/perl5/issues/14572>
640
641       •   The specific true value of $!{E...} is now documented, noting that
642           it is subject to change and not guaranteed.
643
644       •   Use of $OLD_PERL_VERSION is now discouraged.
645
646       perlxs
647
648       •   The documentation of "PROTOTYPES" has been corrected; they are
649           disabled by default, not enabled.
650

Diagnostics

652       The following additions or changes have been made to diagnostic output,
653       including warnings and fatal error messages.  For the complete list of
654       diagnostic messages, see perldiag.
655
656   New Diagnostics
657       New Errors
658
659       •   %s must not be a named sequence in transliteration operator
660
661       •   Can't find Unicode property definition "%s" in regex;
662
663       •   Can't redeclare "%s" in "%s"
664
665       •   Character following \p must be '{' or a single-character Unicode
666           property name in regex;
667
668       •   Empty \%c in regex; marked by <-- HERE in m/%s/
669
670       •   Illegal user-defined property name
671
672       •   Invalid number '%s' for -C option.
673
674       •   Sequence (?... not terminated in regex; marked by <-- HERE in m/%s/
675
676       •   Sequence (?P<... not terminated in regex; marked by <-- HERE in
677           m/%s/
678
679       •   Sequence (?P>... not terminated in regex; marked by <-- HERE in
680           m/%s/
681
682       New Warnings
683
684       •   Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in
685           m/%s/
686
687       •   %s() is deprecated on :utf8 handles
688
689   Changes to Existing Diagnostics
690       •   Accessing the "IO" part of a glob as "FILEHANDLE" instead of "IO"
691           is no longer deprecated.  It is discouraged to encourage uniformity
692           (so that, for example, one can grep more easily) but it will not be
693           removed.  [GH #15105] <https://github.com/Perl/perl5/issues/15105>
694
695       •   The diagnostic "Hexadecimal float: internal error" has been changed
696           to "Hexadecimal float: internal error (%s)" to include more
697           information.
698
699       •   Can't modify non-lvalue subroutine call of &%s
700
701           This error now reports the name of the non-lvalue subroutine you
702           attempted to use as an lvalue.
703
704       •   When running out of memory during an attempt the increase the stack
705           size, previously, perl would die using the cryptic message "panic:
706           av_extend_guts() negative count (-9223372036854775681)".  This has
707           been fixed to show the prettier message: Out of memory during stack
708           extend
709

Configuration and Compilation

711       •   "Configure" now acts as if the "-O" option is always passed,
712           allowing command line options to override saved configuration.
713           This should eliminate confusion when command line options are
714           ignored for no obvious reason.  "-O" is now permitted, but ignored.
715
716       •   Bison 3.0 is now supported.
717
718Configure no longer probes for libnm by default.  Originally this
719           was the "New Math" library, but the name has been re-used by the
720           GNOME NetworkManager.  [GH #15115]
721           <https://github.com/Perl/perl5/issues/15115>
722
723       •   Added Configure probes for "newlocale", "freelocale", and
724           "uselocale".
725
726       •   "PPPort.so/PPPort.dll" no longer get installed, as they are not
727           used by "PPPort.pm", only by its test files.
728
729       •   It is now possible to specify which compilation date to show on
730           "perl -V" output, by setting the macro "PERL_BUILD_DATE".
731
732       •   Using the "NO_HASH_SEED" define in combination with the default
733           hash algorithm "PERL_HASH_FUNC_ONE_AT_A_TIME_HARD" resulted in a
734           fatal error while compiling the interpreter, since Perl 5.17.10.
735           This has been fixed.
736
737Configure should handle spaces in paths a little better.
738
739       •   No longer generate EBCDIC POSIX-BC tables.  We don't believe anyone
740           is using Perl and POSIX-BC at this time, and by not generating
741           these tables it saves time during development, and makes the
742           resulting tar ball smaller.
743
744       •   The GNU Make makefile for Win32 now supports parallel builds.
745           [perl #126632]
746
747       •   You can now build perl with MSVC++ on Win32 using GNU Make.  [perl
748           #126632]
749
750       •   The Win32 miniperl now has a real "getcwd" which increases build
751           performance resulting in getcwd() being 605x faster in Win32
752           miniperl.
753
754       •   Configure now takes "-Dusequadmath" into account when calculating
755           the "alignbytes" configuration variable.  Previously the mis-
756           calculated "alignbytes" could cause alignment errors on debugging
757           builds. [perl #127894]
758

Testing

760       •   A new test (t/op/aassign.t) has been added to test the list
761           assignment operator "OP_AASSIGN".
762
763       •   Parallel building has been added to the dmake "makefile.mk"
764           makefile. All Win32 compilers are supported.
765

Platform Support

767   Platform-Specific Notes
768       AmigaOS
769           •   The AmigaOS port has been reintegrated into the main tree,
770               based off of Perl 5.22.1.
771
772       Cygwin
773           •   Tests are more robust against unusual cygdrive prefixes.  [GH
774               #15076] <https://github.com/Perl/perl5/issues/15076>
775
776       EBCDIC
777           UTF-EBCDIC extended
778               UTF-EBCDIC is like UTF-8, but for EBCDIC platforms.  It now has
779               been extended so that it can represent code points up to 2 **
780               64 - 1 on platforms with 64-bit words.  This brings it into
781               parity with UTF-8.  This enhancement requires an incompatible
782               change to the representation of code points in the range 2 **
783               30 to 2 ** 31 -1 (the latter was the previous maximum
784               representable code point).  This means that a file that
785               contains one of these code points, written out with previous
786               versions of perl cannot be read in, without conversion, by a
787               perl containing this change.  We do not believe any such files
788               are in existence, but if you do have one, submit a ticket at
789               perlbug@perl.org <mailto:perlbug@perl.org>, and we will write a
790               conversion script for you.
791
792           EBCDIC cmp() and sort() fixed for UTF-EBCDIC strings
793               Comparing two strings that were both encoded in UTF-8 (or more
794               precisely, UTF-EBCDIC) did not work properly until now.  Since
795               sort() uses cmp(), this fixes that as well.
796
797           EBCDIC "tr///" and "y///" fixed for "\N{}", and "use utf8" ranges
798               Perl v5.22 introduced the concept of portable ranges to regular
799               expression patterns.  A portable range matches the same set of
800               characters no matter what platform is being run on.  This
801               concept is now extended to "tr///".  See "tr///".
802
803               There were also some problems with these operations under
804               "use utf8", which are now fixed
805
806       FreeBSD
807           •   Use the fdclose() function from FreeBSD if it is available.
808               [GH #15082] <https://github.com/Perl/perl5/issues/15082>
809
810       IRIX
811           •   Under some circumstances IRIX stdio fgetc() and fread() set the
812               errno to "ENOENT", which made no sense according to either IRIX
813               or POSIX docs.  Errno is now cleared in such cases.  [GH
814               #14557] <https://github.com/Perl/perl5/issues/14557>
815
816           •   Problems when multiplying long doubles by infinity have been
817               fixed.  [GH #14993]
818               <https://github.com/Perl/perl5/issues/14993>
819
820       MacOS X
821           •   Until now OS X builds of perl have specified a link target of
822               10.3 (Panther, 2003) but have not specified a compiler target.
823               From now on, builds of perl on OS X 10.6 or later (Snow
824               Leopard, 2008) by default capture the current OS X version and
825               specify that as the explicit build target in both compiler and
826               linker flags, thus preserving binary compatibility for
827               extensions built later regardless of changes in OS X, SDK, or
828               compiler and linker versions.  To override the default value
829               used in the build and preserved in the flags, specify "export
830               MACOSX_DEPLOYMENT_TARGET=10.N" before configuring and building
831               perl, where 10.N is the version of OS X you wish to target.  In
832               OS X 10.5 or earlier there is no change to the behavior present
833               when those systems were current; the link target is still OS X
834               10.3 and there is no explicit compiler target.
835
836           •   Builds with both -DDEBUGGING and threading enabled would fail
837               with a "panic: free from wrong pool" error when built or tested
838               from Terminal on OS X.  This was caused by perl's internal
839               management of the environment conflicting with an atfork
840               handler using the libc setenv() function to update the
841               environment.
842
843               Perl now uses setenv()/unsetenv() to update the environment on
844               OS X.  [GH #14955] <https://github.com/Perl/perl5/issues/14955>
845
846       Solaris
847           •   All Solaris variants now build a shared libperl
848
849               Solaris and variants like OpenIndiana now always build with the
850               shared Perl library (Configure -Duseshrplib).  This was
851               required for the OpenIndiana builds, but this has also been the
852               setting for Oracle/Sun Perl builds for several years.
853
854       Tru64
855           •   Workaround where Tru64 balks when prototypes are listed as
856               "PERL_STATIC_INLINE", but where the test is build with
857               "-DPERL_NO_INLINE_FUNCTIONS".
858
859       VMS
860           •   On VMS, the math function prototypes in "math.h" are now
861               visible under C++.  Now building the POSIX extension with C++
862               will no longer crash.
863
864           •   VMS has had "setenv"/"unsetenv" since v7.0 (released in 1996),
865               "Perl_vmssetenv" now always uses "setenv"/"unsetenv".
866
867           •   Perl now implements its own "killpg" by scanning for processes
868               in the specified process group, which may not mean exactly the
869               same thing as a Unix process group, but allows us to send a
870               signal to a parent (or master) process and all of its sub-
871               processes.  At the perl level, this means we can now send a
872               negative pid like so:
873
874                   kill SIGKILL, -$pid;
875
876               to signal all processes in the same group as $pid.
877
878           •   For those %ENV elements based on the CRTL environ array, we've
879               always preserved case when setting them but did look-ups only
880               after upcasing the key first, which made lower- or mixed-case
881               entries go missing. This problem has been corrected by making
882               %ENV elements derived from the environ array case-sensitive on
883               look-up as well as case-preserving on store.
884
885           •   Environment look-ups for "PERL5LIB" and "PERLLIB" previously
886               only considered logical names, but now consider all sources of
887               %ENV as determined by "PERL_ENV_TABLES" and as documented in
888               "%ENV" in perlvms.
889
890           •   The minimum supported version of VMS is now v7.3-2, released in
891               2003.  As a side effect of this change, VAX is no longer
892               supported as the terminal release of OpenVMS VAX was v7.3 in
893               2001.
894
895       Win32
896           •   A new build option "USE_NO_REGISTRY" has been added to the
897               makefiles.  This option is off by default, meaning the default
898               is to do Windows registry lookups.  This option stops Perl from
899               looking inside the registry for anything.  For what values are
900               looked up in the registry see perlwin32.  Internally, in C, the
901               name of this option is "WIN32_NO_REGISTRY".
902
903           •   The behavior of Perl using "HKEY_CURRENT_USER\Software\Perl"
904               and "HKEY_LOCAL_MACHINE\Software\Perl" to lookup certain
905               values, including %ENV vars starting with "PERL" has changed.
906               Previously, the 2 keys were checked for entries at all times
907               through the perl process's life time even if they did not
908               exist.  For performance reasons, now, if the root key (i.e.
909               "HKEY_CURRENT_USER\Software\Perl" or
910               "HKEY_LOCAL_MACHINE\Software\Perl") does not exist at process
911               start time, it will not be checked again for %ENV override
912               entries for the remainder of the perl process's life.  This
913               more closely matches Unix behavior in that the environment is
914               copied or inherited on startup and changing the variable in the
915               parent process or another process or editing .bashrc will not
916               change the environmental variable in other existing, running,
917               processes.
918
919           •   One glob fetch was removed for each "-X" or "stat" call whether
920               done from Perl code or internally from Perl's C code.  The glob
921               being looked up was "${^WIN32_SLOPPY_STAT}" which is a special
922               variable.  This makes "-X" and "stat" slightly faster.
923
924           •   During miniperl's process startup, during the build process, 4
925               to 8 IO calls related to the process starting .pl and the
926               buildcustomize.pl file were removed from the code opening and
927               executing the first 1 or 2 .pl files.
928
929           •   Builds using Microsoft Visual C++ 2003 and earlier no longer
930               produce an "INTERNAL COMPILER ERROR" message.  [perl #126045]
931
932           •   Visual C++ 2013 builds will now execute on XP and higher.
933               Previously they would only execute on Vista and higher.
934
935           •   You can now build perl with GNU Make and GCC.  [perl #123440]
936
937           •   "truncate($filename, $size)" now works for files over 4GB in
938               size.  [perl #125347]
939
940           •   Parallel building has been added to the dmake "makefile.mk"
941               makefile. All Win32 compilers are supported.
942
943           •   Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake
944               would result in an invalid $Config{archname} for the resulting
945               perl.  [perl #127584]
946
947           •   Errors set by Winsock functions are now put directly into $^E,
948               and the relevant "WSAE*" error codes are now exported from the
949               Errno and POSIX modules for testing this against.
950
951               The previous behavior of putting the errors (converted to
952               POSIX-style "E*" error codes since Perl 5.20.0) into $! was
953               buggy due to the non-equivalence of like-named Winsock and
954               POSIX error constants, a relationship between which has
955               unfortunately been established in one way or another since Perl
956               5.8.0.
957
958               The new behavior provides a much more robust solution for
959               checking Winsock errors in portable software without
960               accidentally matching POSIX tests that were intended for other
961               OSes and may have different meanings for Winsock.
962
963               The old behavior is currently retained, warts and all, for
964               backwards compatibility, but users are encouraged to change any
965               code that tests $!  against "E*" constants for Winsock errors
966               to instead test $^E against "WSAE*" constants.  After a
967               suitable deprecation period, the old behavior may be removed,
968               leaving $! unchanged after Winsock function calls, to avoid any
969               possible confusion over which error variable to check.
970
971       ppc64el
972           floating point
973               The floating point format of ppc64el (Debian naming for little-
974               endian PowerPC) is now detected correctly.
975

Internal Changes

977       •   The implementation of perl's context stack system, and its internal
978           API, have been heavily reworked. Note that no significant changes
979           have been made to any external APIs, but XS code which relies on
980           such internal details may need to be fixed. The main changes are:
981
982           •   The PUSHBLOCK(), POPSUB() etc. macros have been replaced with
983               static inline functions such as cx_pushblock(), cx_popsub()
984               etc. These use function args rather than implicitly relying on
985               local vars such as "gimme" and "newsp" being available. Also
986               their functionality has changed: in particular, cx_popblock()
987               no longer decrements "cxstack_ix". The ordering of the steps in
988               the "pp_leave*" functions involving cx_popblock(), cx_popsub()
989               etc. has changed. See the new documentation, "Dynamic Scope and
990               the Context Stack" in perlguts, for details on how to use them.
991
992           •   Various macros, which now consistently have a CX_ prefix, have
993               been added:
994
995                 CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
996
997               or renamed:
998
999                 CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
1000
1001           •   cx_pushblock() now saves "PL_savestack_ix" and "PL_tmps_floor",
1002               so "pp_enter*" and "pp_leave*" no longer do
1003
1004                 ENTER; SAVETMPS; ....; LEAVE
1005
1006           •   cx_popblock() now also restores "PL_curpm".
1007
1008           •   In dounwind() for every context type, the current savestack
1009               frame is now processed before each context is popped; formerly
1010               this was only done for sub-like context frames. This action has
1011               been removed from cx_popsub() and placed into its own macro,
1012               CX_LEAVE_SCOPE(cx), which must be called before cx_popsub()
1013               etc.
1014
1015               dounwind() now also does a cx_popblock() on the last popped
1016               frame (formerly it only did the cx_popsub() etc. actions on
1017               each frame).
1018
1019           •   The temps stack is now freed on scope exit; previously, temps
1020               created during the last statement of a block wouldn't be freed
1021               until the next "nextstate" following the block (apart from an
1022               existing hack that did this for recursive subs in scalar
1023               context); and in something like "f(g())", the temps created by
1024               the last statement in g() would formerly not be freed until the
1025               statement following the return from f().
1026
1027           •   Most values that were saved on the savestack on scope entry are
1028               now saved in suitable new fields in the context struct, and
1029               saved and restored directly by cx_pushfoo() and cx_popfoo(),
1030               which is much faster.
1031
1032           •   Various context struct fields have been added, removed or
1033               modified.
1034
1035           •   The handling of @_ in cx_pushsub() and cx_popsub() has been
1036               considerably tidied up, including removing the "argarray" field
1037               from the context struct, and extracting out some common (but
1038               rarely used) code into a separate function, clear_defarray().
1039               Also, useful subsets of cx_popsub() which had been unrolled in
1040               places like "pp_goto" have been gathered into the new functions
1041               cx_popsub_args() and cx_popsub_common().
1042
1043           •   "pp_leavesub" and "pp_leavesublv" now use the same function as
1044               the rest of the "pp_leave*"'s to process return args.
1045
1046           •   "CXp_FOR_PAD" and "CXp_FOR_GV" flags have been added, and
1047               "CXt_LOOP_FOR" has been split into "CXt_LOOP_LIST",
1048               "CXt_LOOP_ARY".
1049
1050           •   Some variables formerly declared by "dMULTICALL" (but not
1051               documented) have been removed.
1052
1053       •   The obscure "PL_timesbuf" variable, effectively a vestige of Perl
1054           1, has been removed. It was documented as deprecated in Perl 5.20,
1055           with a statement that it would be removed early in the 5.21.x
1056           series; that has now finally happened.  [GH #13632]
1057           <https://github.com/Perl/perl5/issues/13632>
1058
1059       •   An unwarranted assertion in Perl_newATTRSUB_x() has been removed.
1060           If a stub subroutine definition with a prototype has been seen,
1061           then any subsequent stub (or definition) of the same subroutine
1062           with an attribute was causing an assertion failure because of a
1063           null pointer.  [GH #15081]
1064           <https://github.com/Perl/perl5/issues/15081>
1065
1066       •   "::" has been replaced by "__" in "ExtUtils::ParseXS", like it's
1067           done for parameters/return values. This is more consistent, and
1068           simplifies writing XS code wrapping C++ classes into a nested Perl
1069           namespace (it requires only a typedef for "Foo__Bar" rather than
1070           two, one for "Foo_Bar" and the other for "Foo::Bar").
1071
1072       •   The to_utf8_case() function is now deprecated.  Instead use
1073           "toUPPER_utf8", "toTITLE_utf8", "toLOWER_utf8", and "toFOLD_utf8".
1074           (See <http://nntp.perl.org/group/perl.perl5.porters/233287>.)
1075
1076       •   Perl core code and the threads extension have been annotated so
1077           that, if Perl is configured to use threads, then during compile-
1078           time clang (3.6 or later) will warn about suspicious uses of
1079           mutexes.  See
1080           <http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more
1081           information.
1082
1083       •   The signbit() emulation has been enhanced.  This will help older
1084           and/or more exotic platforms or configurations.
1085
1086       •   Most EBCDIC-specific code in the core has been unified with non-
1087           EBCDIC code, to avoid repetition and make maintenance easier.
1088
1089       •   MSWin32 code for $^X has been moved out of the win32 directory to
1090           caretx.c, where other operating systems set that variable.
1091
1092       •   sv_ref() is now part of the API.
1093
1094       •   "sv_backoff" in perlapi had its return type changed from "int" to
1095           "void".  It previously has always returned 0 since Perl 5.000
1096           stable but that was undocumented.  Although "sv_backoff" is marked
1097           as public API, XS code is not expected to be impacted since the
1098           proper API call would be through public API "sv_setsv(sv,
1099           &PL_sv_undef)", or quasi-public "SvOOK_off", or non-public
1100           "SvOK_off" calls, and the return value of "sv_backoff" was
1101           previously a meaningless constant that can be rewritten as
1102           "(sv_backoff(sv),0)".
1103
1104       •   The "EXTEND" and "MEXTEND" macros have been improved to avoid
1105           various issues with integer truncation and wrapping.  In
1106           particular, some casts formerly used within the macros have been
1107           removed.  This means for example that passing an unsigned "nitems"
1108           argument is likely to raise a compiler warning now (it's always
1109           been documented to require a signed value; formerly int, lately
1110           SSize_t).
1111
1112       •   "PL_sawalias" and "GPf_ALIASED_SV" have been removed.
1113
1114       •   "GvASSIGN_GENERATION" and "GvASSIGN_GENERATION_set" have been
1115           removed.
1116

Selected Bug Fixes

1118       •   It now works properly to specify a user-defined property, such as
1119
1120            qr/\p{mypkg1::IsMyProperty}/i
1121
1122           with "/i" caseless matching, an explicit package name, and
1123           IsMyProperty not defined at the time of the pattern compilation.
1124
1125       •   Perl's memcpy(), memmove(), memset() and memcmp() fallbacks are now
1126           more compatible with the originals.  [perl #127619]
1127
1128       •   Fixed the issue where a "s///r") with -DPERL_NO_COW attempts to
1129           modify the source SV, resulting in the program dying. [perl
1130           #127635]
1131
1132       •   Fixed an EBCDIC-platform-only case where a pattern could fail to
1133           match. This occurred when matching characters from the set of C1
1134           controls when the target matched string was in UTF-8.
1135
1136       •   Narrow the filename check in strict.pm and warnings.pm. Previously,
1137           it assumed that if the filename (without the .pmc? extension)
1138           differed from the package name, if was a misspelled use statement
1139           (i.e. "use Strict" instead of "use strict"). We now check whether
1140           there's really a miscapitalization happening, and not some other
1141           issue.
1142
1143       •   Turn an assertion into a more user friendly failure when parsing
1144           regexes. [perl #127599]
1145
1146       •   Correctly raise an error when trying to compile patterns with
1147           unterminated character classes while there are trailing
1148           backslashes.  [perl #126141].
1149
1150       •   Line numbers larger than 2**31-1 but less than 2**32 are no longer
1151           returned by caller() as negative numbers.  [perl #126991]
1152
1153       •   "unless ( assignment )" now properly warns when syntax warnings are
1154           enabled.  [perl #127122]
1155
1156       •   Setting an "ISA" glob to an array reference now properly adds
1157           "isaelem" magic to any existing elements.  Previously modifying
1158           such an element would not update the ISA cache, so method calls
1159           would call the wrong function.  Perl would also crash if the "ISA"
1160           glob was destroyed, since new code added in 5.23.7 would try to
1161           release the "isaelem" magic from the elements.  [perl #127351]
1162
1163       •   If a here-doc was found while parsing another operator, the parser
1164           had already read end of file, and the here-doc was not terminated,
1165           perl could produce an assertion or a segmentation fault.  This now
1166           reliably complains about the unterminated here-doc.  [perl #125540]
1167
1168       •   untie() would sometimes return the last value returned by the
1169           UNTIE() handler as well as its normal value, messing up the stack.
1170           [perl #126621]
1171
1172       •   Fixed an operator precedence problem when " castflags & 2" is true.
1173           [perl #127474]
1174
1175       •   Caching of DESTROY methods could result in a non-pointer or a non-
1176           STASH stored in the SvSTASH() slot of a stash, breaking the B
1177           STASH() method.  The DESTROY method is now cached in the MRO
1178           metadata for the stash.  [perl #126410]
1179
1180       •   The AUTOLOAD method is now called when searching for a DESTROY
1181           method, and correctly sets $AUTOLOAD too.  [perl #124387]  [perl
1182           #127494]
1183
1184       •   Avoid parsing beyond the end of the buffer when processing a
1185           "#line" directive with no filename.  [perl #127334]
1186
1187       •   Perl now raises a warning when a regular expression pattern looks
1188           like it was supposed to contain a POSIX class, like
1189           "qr/[[:alpha:]]/", but there was some slight defect in its
1190           specification which causes it to instead be treated as a regular
1191           bracketed character class.  An example would be missing the second
1192           colon in the above like this: "qr/[[:alpha]]/".  This compiles to
1193           match a sequence of two characters.  The second is "]", and the
1194           first is any of: "[", ":", "a", "h", "l", or "p".   This is
1195           unlikely to be the intended meaning, and now a warning is raised.
1196           No warning is raised unless the specification is very close to one
1197           of the 14 legal POSIX classes.  (See "POSIX Character Classes" in
1198           perlrecharclass.)  [perl #8904]
1199
1200       •   Certain regex patterns involving a complemented POSIX class in an
1201           inverted bracketed character class, and matching something else
1202           optionally would improperly fail to match.  An example of one that
1203           could fail is "qr/_?[^\Wbar]\x{100}/".  This has been fixed.  [perl
1204           #127537]
1205
1206       •   Perl 5.22 added support to the C99 hexadecimal floating point
1207           notation, but sometimes misparses hex floats. This has been fixed.
1208           [perl #127183]
1209
1210       •   A regression that allowed undeclared barewords in hash keys to work
1211           despite strictures has been fixed.  [GH #15099]
1212           <https://github.com/Perl/perl5/issues/15099>
1213
1214       •   Calls to the placeholder &PL_sv_yes used internally when an
1215           import() or unimport() method isn't found now correctly handle
1216           scalar context.  [GH #14902]
1217           <https://github.com/Perl/perl5/issues/14902>
1218
1219       •   Report more context when we see an array where we expect to see an
1220           operator and avoid an assertion failure.  [GH #14472]
1221           <https://github.com/Perl/perl5/issues/14472>
1222
1223       •   Modifying an array that was previously a package @ISA no longer
1224           causes assertion failures or crashes.  [GH #14492]
1225           <https://github.com/Perl/perl5/issues/14492>
1226
1227       •   Retain binary compatibility across plain and DEBUGGING perl builds.
1228           [GH #15122] <https://github.com/Perl/perl5/issues/15122>
1229
1230       •   Avoid leaking memory when setting $ENV{foo} on darwin.  [GH #14955]
1231           <https://github.com/Perl/perl5/issues/14955>
1232
1233       •   "/...\G/" no longer crashes on utf8 strings. When "\G" is a fixed
1234           number of characters from the start of the regex, perl needs to
1235           count back that many characters from the current pos() position and
1236           start matching from there. However, it was counting back bytes
1237           rather than characters, which could lead to panics on utf8 strings.
1238
1239       •   In some cases operators that return integers would return negative
1240           integers as large positive integers.  [GH #15049]
1241           <https://github.com/Perl/perl5/issues/15049>
1242
1243       •   The pipe() operator would assert for DEBUGGING builds instead of
1244           producing the correct error message.  The condition asserted on is
1245           detected and reported on correctly without the assertions, so the
1246           assertions were removed.  [GH #15015]
1247           <https://github.com/Perl/perl5/issues/15015>
1248
1249       •   In some cases, failing to parse a here-doc would attempt to use
1250           freed memory.  This was caused by a pointer not being restored
1251           correctly.  [GH #15009]
1252           <https://github.com/Perl/perl5/issues/15009>
1253
1254       •   "@x = sort { *a = 0; $a <=> $b } 0 .. 1" no longer frees the GP for
1255           *a before restoring its SV slot.  [GH #14595]
1256           <https://github.com/Perl/perl5/issues/14595>
1257
1258       •   Multiple problems with the new hexadecimal floating point printf
1259           format %a were fixed: [GH #15032]
1260           <https://github.com/Perl/perl5/issues/15032>, [GH #15033]
1261           <https://github.com/Perl/perl5/issues/15033>, [GH #15074]
1262           <https://github.com/Perl/perl5/issues/15074>
1263
1264       •   Calling mg_set() in leave_scope() no longer leaks.
1265
1266       •   A regression from Perl v5.20 was fixed in which debugging output of
1267           regular expression compilation was wrong.  (The pattern was
1268           correctly compiled, but what got displayed for it was wrong.)
1269
1270       •   "\b{sb}" works much better.  In Perl v5.22.0, this new construct
1271           didn't seem to give the expected results, yet passed all the tests
1272           in the extensive suite furnished by Unicode.  It turns out that it
1273           was because these were short input strings, and the failures had to
1274           do with longer inputs.
1275
1276       •   Certain syntax errors in "Extended Bracketed Character Classes" in
1277           perlrecharclass caused panics instead of the proper error message.
1278           This has now been fixed. [perl #126481]
1279
1280       •   Perl 5.20 added a message when a quantifier in a regular expression
1281           was useless, but then caused the parser to skip it; this caused the
1282           surplus quantifier to be silently ignored, instead of throwing an
1283           error. This is now fixed. [perl #126253]
1284
1285       •   The switch to building non-XS modules last in win32/makefile.mk
1286           (introduced by design as part of the changes to enable parallel
1287           building) caused the build of POSIX to break due to problems with
1288           the version module. This is now fixed.
1289
1290       •   Improved parsing of hex float constants.
1291
1292       •   Fixed an issue with "pack" where "pack "H"" (and "pack "h"") could
1293           read past the source when given a non-utf8 source, and a utf8
1294           target.  [perl #126325]
1295
1296       •   Fixed several cases where perl would abort due to a segmentation
1297           fault, or a C-level assert. [perl #126615], [perl #126602], [perl
1298           #126193].
1299
1300       •   There were places in regular expression patterns where comments
1301           ("(?#...)")  weren't allowed, but should have been.  This is now
1302           fixed.  [GH #12755] <https://github.com/Perl/perl5/issues/12755>
1303
1304       •   Some regressions from Perl 5.20 have been fixed, in which some
1305           syntax errors in "(?[...])" constructs within regular expression
1306           patterns could cause a segfault instead of a proper error message.
1307           [GH #14933] <https://github.com/Perl/perl5/issues/14933> [GH
1308           #14996] <https://github.com/Perl/perl5/issues/14996>
1309
1310       •   Another problem with "(?[...])"  constructs has been fixed wherein
1311           things like "\c]" could cause panics.  [GH #14934]
1312           <https://github.com/Perl/perl5/issues/14934>
1313
1314       •   Some problems with attempting to extend the perl stack to around 2G
1315           or 4G entries have been fixed.  This was particularly an issue on
1316           32-bit perls built to use 64-bit integers, and was easily
1317           noticeable with the list repetition operator, e.g.
1318
1319               @a = (1) x $big_number
1320
1321           Formerly perl may have crashed, depending on the exact value of
1322           $big_number; now it will typically raise an exception.  [GH #14880]
1323           <https://github.com/Perl/perl5/issues/14880>
1324
1325       •   In a regex conditional expression
1326           "(?(condition)yes-pattern|no-pattern)", if the condition is "(?!)"
1327           then perl failed the match outright instead of matching the no-
1328           pattern.  This has been fixed.  [GH #14947]
1329           <https://github.com/Perl/perl5/issues/14947>
1330
1331       •   The special backtracking control verbs "(*VERB:ARG)" now all allow
1332           an optional argument and set "REGERROR"/"REGMARK" appropriately as
1333           well.  [GH #14937] <https://github.com/Perl/perl5/issues/14937>
1334
1335       •   Several bugs, including a segmentation fault, have been fixed with
1336           the boundary checking constructs (introduced in Perl 5.22)
1337           "\b{gcb}", "\b{sb}", "\b{wb}", "\B{gcb}", "\B{sb}", and "\B{wb}".
1338           All the "\B{}" ones now match an empty string; none of the "\b{}"
1339           ones do.  [GH #14976] <https://github.com/Perl/perl5/issues/14976>
1340
1341       •   Duplicating a closed file handle for write no longer creates a
1342           filename of the form GLOB(0xXXXXXXXX).  [perl #125115]
1343
1344       •   Warning fatality is now ignored when rewinding the stack.  This
1345           prevents infinite recursion when the now fatal error also causes
1346           rewinding of the stack.  [perl #123398]
1347
1348       •   In perl v5.22.0, the logic changed when parsing a numeric parameter
1349           to the -C option, such that the successfully parsed number was not
1350           saved as the option value if it parsed to the end of the argument.
1351           [perl #125381]
1352
1353       •   The PadlistNAMES macro is an lvalue again.
1354
1355       •   Zero -DPERL_TRACE_OPS memory for sub-threads.
1356
1357           perl_clone_using() was missing Zero init of PL_op_exec_cnt[].  This
1358           caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew
1359           exceedingly large op-counts at destruct.  These counts would print
1360           %x as "ABABABAB", clearly a mem-poison value.
1361
1362       •   A leak in the XS typemap caused one scalar to be leaked each time a
1363           "FILE *" or a "PerlIO *" was "OUTPUT:"ed or imported to Perl, since
1364           perl 5.000. These particular typemap entries are thought to be
1365           extremely rarely used by XS modules. [perl #124181]
1366
1367       •   alarm() and sleep() will now warn if the argument is a negative
1368           number and return undef. Previously they would pass the negative
1369           value to the underlying C function which may have set up a timer
1370           with a surprising value.
1371
1372       •   Perl can again be compiled with any Unicode version.  This used to
1373           (mostly) work, but was lost in v5.18 through v5.20.  The property
1374           "Name_Alias" did not exist prior to Unicode 5.0.  Unicode::UCD
1375           incorrectly said it did.  This has been fixed.
1376
1377       •   Very large code-points (beyond Unicode) in regular expressions no
1378           longer cause a buffer overflow in some cases when converted to
1379           UTF-8.  [GH #14858] <https://github.com/Perl/perl5/issues/14858>
1380
1381       •   The integer overflow check for the range operator (...) in list
1382           context now correctly handles the case where the size of the range
1383           is larger than the address space.  This could happen on 32-bits
1384           with -Duse64bitint.  [GH #14843]
1385           <https://github.com/Perl/perl5/issues/14843>
1386
1387       •   A crash with "%::=(); J->${\"::"}" has been fixed.  [GH #14790]
1388           <https://github.com/Perl/perl5/issues/14790>
1389
1390       •   "qr/(?[ () ])/" no longer segfaults, giving a syntax error message
1391           instead.  [perl #125805]
1392
1393       •   Regular expression possessive quantifier v5.20 regression now
1394           fixed.  "qr/"PAT"{"min,max"}+""/" is supposed to behave identically
1395           to "qr/(?>"PAT"{"min,max"})/".  Since v5.20, this didn't work if
1396           min and max were equal.  [perl #125825]
1397
1398       •   "BEGIN <>" no longer segfaults and properly produces an error
1399           message.  [perl #125341]
1400
1401       •   In "tr///" an illegal backwards range like "tr/\x{101}-\x{100}//"
1402           was not always detected, giving incorrect results.  This is now
1403           fixed.
1404

Acknowledgements

1406       Perl 5.24.0 represents approximately 11 months of development since
1407       Perl 5.24.0 and contains approximately 360,000 lines of changes across
1408       1,800 files from 75 authors.
1409
1410       Excluding auto-generated files, documentation and release tools, there
1411       were approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h
1412       files.
1413
1414       Perl continues to flourish into its third decade thanks to a vibrant
1415       community of users and developers. The following people are known to
1416       have contributed the improvements that became Perl 5.24.0:
1417
1418       Aaron Crane, Aaron Priven, Abigail, Achim Gratz, Alexander D'Archangel,
1419       Alex Vandiver, Andreas König, Andy Broad, Andy Dougherty, Aristotle
1420       Pagaltzis, Chase Whitener, Chas. Owens, Chris 'BinGOs' Williams, Craig
1421       A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins, Daniel Dragan, David
1422       Golden, David Mitchell, Doug Bell, Dr.Ruud, Ed Avis, Ed J, Father
1423       Chrysostomos, Herbert Breunung, H.Merijn Brand, Hugo van der Sanden,
1424       Ivan Pozdeev, James E Keenan, Jan Dubois, Jarkko Hietaniemi, Jerry D.
1425       Hedden, Jim Cromie, John Peacock, John SJ Anderson, Karen Etheridge,
1426       Karl Williamson, kmx, Leon Timmermans, Ludovic E. R.  Tolhurst-Cleaver,
1427       Lukas Mai, Martijn Lievaart, Matthew Horsfall, Mattia Barbon, Max
1428       Maischein, Mohammed El-Afifi, Nicholas Clark, Nicolas R., Niko Tyni,
1429       Peter John Acklam, Peter Martini, Peter Rabbitson, Pip Cet, Rafael
1430       Garcia-Suarez, Reini Urban, Ricardo Signes, Sawyer X, Shlomi Fish,
1431       Sisyphus, Stanislaw Pusep, Steffen Müller, Stevan Little, Steve Hay,
1432       Sullivan Beck, Thomas Sibley, Todd Rinaldo, Tom Hukins, Tony Cook,
1433       Unicode Consortium, Victor Adam, Vincent Pit, Vladimir Timofeev, Yves
1434       Orton, Zachary Storer, Zefram.
1435
1436       The list above is almost certainly incomplete as it is automatically
1437       generated from version control history. In particular, it does not
1438       include the names of the (very much appreciated) contributors who
1439       reported issues to the Perl bug tracker.
1440
1441       Many of the changes included in this version originated in the CPAN
1442       modules included in Perl's core. We're grateful to the entire CPAN
1443       community for helping Perl to flourish.
1444
1445       For a more complete list of all of Perl's historical contributors,
1446       please see the AUTHORS file in the Perl source distribution.
1447

Reporting Bugs

1449       If you find what you think is a bug, you might check the articles
1450       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
1451       database at https://rt.perl.org/ .  There may also be information at
1452       http://www.perl.org/ , the Perl Home Page.
1453
1454       If you believe you have an unreported bug, please run the perlbug
1455       program included with your release.  Be sure to trim your bug down to a
1456       tiny but sufficient test case.  Your bug report, along with the output
1457       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
1458       the Perl porting team.
1459
1460       If the bug you are reporting has security implications which make it
1461       inappropriate to send to a publicly archived mailing list, then see
1462       "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of
1463       how to report the issue.
1464

SEE ALSO

1466       The Changes file for an explanation of how to view exhaustive details
1467       on what changed.
1468
1469       The INSTALL file for how to build Perl.
1470
1471       The README file for general stuff.
1472
1473       The Artistic and Copying files for copyright information.
1474
1475
1476
1477perl v5.38.2                      2023-11-30                  PERL5240DELTA(1)
Impressum