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 [perl #126755]
106       <https://rt.perl.org/Ticket/Display.html?id=126755>
107
108   Fix loss of taint in canonpath
109       This is CVE-2015-8607.  For more information see [perl #126862]
110       <https://rt.perl.org/Ticket/Display.html?id=126862>
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.  [perl #126922]
115       <https://rt.perl.org/Ticket/Display.html?id=126922>
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       [perl #125587] <https://rt.perl.org/Ticket/Display.html?id=125587>
182
183       [perl #121058] <https://rt.perl.org/Ticket/Display.html?id=121058>
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
194       since 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
248       handles
249       The "sysread()", "recv()", "syswrite()" and "send()" operators are
250       deprecated on handles that have the ":utf8" layer, either explicitly,
251       or implicitly, eg., with the ":encoding(UTF-16LE)" layer.
252
253       Both "sysread()" and "recv()" currently use only the ":utf8" flag for
254       the stream, ignoring the actual layers.  Since "sysread()" and "recv()"
255       do no UTF-8 validation they can end up creating invalidly encoded
256       scalars.
257
258       Similarly, "syswrite()" and "send()" use only the ":utf8" flag,
259       otherwise ignoring any layers.  If the flag is set, both write the
260       value UTF-8 encoded, even if the layer is some different encoding, such
261       as the example above.
262
263       Ideally, all of these operators would completely ignore the ":utf8"
264       state, working only with bytes, but this would result in silently
265       breaking existing code.  To avoid this a future version of perl will
266       throw an exception when any of "sysread()", "recv()", "syswrite()" or
267       "send()" are called on handle with the ":utf8" layer.
268

Performance Enhancements

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

Modules and Pragmata

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

Documentation

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

Diagnostics

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

Configuration and Compilation

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

Testing

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

Platform Support

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

Internal Changes

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

Selected Bug Fixes

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

Acknowledgements

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

Reporting Bugs

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

SEE ALSO

1476       The Changes file for an explanation of how to view exhaustive details
1477       on what changed.
1478
1479       The INSTALL file for how to build Perl.
1480
1481       The README file for general stuff.
1482
1483       The Artistic and Copying files for copyright information.
1484
1485
1486
1487perl v5.30.1                      2019-11-29                  PERL5240DELTA(1)
Impressum