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
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".  [GH #15108]
575           <https://github.com/Perl/perl5/issues/15108>
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".  [GH #14572]
641           <https://github.com/Perl/perl5/issues/14572>
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.  [GH #15105] <https://github.com/Perl/perl5/issues/15105>
696
697       •   The diagnostic "Hexadecimal float: internal error" has been changed
698           to "Hexadecimal float: internal error (%s)" to include more
699           information.
700
701       •   Can't modify non-lvalue subroutine call of &%s
702
703           This error now reports the name of the non-lvalue subroutine you
704           attempted to use as an lvalue.
705
706       •   When running out of memory during an attempt the increase the stack
707           size, previously, perl would die using the cryptic message "panic:
708           av_extend_guts() negative count (-9223372036854775681)".  This has
709           been fixed to show the prettier message: Out of memory during stack
710           extend
711

Configuration and Compilation

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

Testing

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

Platform Support

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

Internal Changes

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

Selected Bug Fixes

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

Acknowledgements

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

Reporting Bugs

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

SEE ALSO

1470       The Changes file for an explanation of how to view exhaustive details
1471       on what changed.
1472
1473       The INSTALL file for how to build Perl.
1474
1475       The README file for general stuff.
1476
1477       The Artistic and Copying files for copyright information.
1478
1479
1480
1481perl v5.34.1                      2022-03-15                  PERL5240DELTA(1)
Impressum