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

NAME

6       perl5280delta - what is new for perl v5.28.0
7

DESCRIPTION

9       This document describes differences between the 5.26.0 release and the
10       5.28.0 release.
11
12       If you are upgrading from an earlier release such as 5.24.0, first read
13       perl5260delta, which describes differences between 5.24.0 and 5.26.0.
14

Core Enhancements

16   Unicode 10.0 is supported
17       A list of changes is at
18       <http://www.unicode.org/versions/Unicode10.0.0>.
19
20   "delete" on key/value hash slices
21       "delete" can now be used on key/value hash slices, returning the keys
22       along with the deleted values.  [perl #131328]
23       <https://rt.perl.org/Ticket/Display.html?id=131328>
24
25   Experimentally, there are now alphabetic synonyms for some regular
26       expression assertions
27       If you find it difficult to remember how to write certain of the
28       pattern assertions, there are now alphabetic synonyms.
29
30        CURRENT                NEW SYNONYMS
31        ------                 ------------
32        (?=...)        (*pla:...) or (*positive_lookahead:...)
33        (?!...)        (*nla:...) or (*negative_lookahead:...)
34        (?<=...)       (*plb:...) or (*positive_lookbehind:...)
35        (?<!...)       (*nlb:...) or (*negative_lookbehind:...)
36        (?>...)        (*atomic:...)
37
38       These are considered experimental, so using any of these will raise
39       (unless turned off) a warning in the "experimental::alpha_assertions"
40       category.
41
42   Mixed Unicode scripts are now detectable
43       A mixture of scripts, such as Cyrillic and Latin, in a string is often
44       the sign of a spoofing attack.  A new regular expression construct now
45       allows for easy detection of these.  For example, you can say
46
47        qr/(*script_run: \d+ \b )/x
48
49       And the digits matched will all be from the same set of 10.  You won't
50       get a look-alike digit from a different script that has a different
51       value than what it appears to be.
52
53       Or:
54
55        qr/(*sr: \b \w+ \b )/x
56
57       makes sure that all the characters come from the same script.
58
59       You can also combine script runs with "(?>...)" (or "*atomic:...)").
60
61       Instead of writing:
62
63           (*sr:(?<...))
64
65       you can now run:
66
67           (*asr:...)
68           # or
69           (*atomic_script_run:...)
70
71       This is considered experimental, so using it will raise (unless turned
72       off) a warning in the "experimental::script_run" category.
73
74       See "Script Runs" in perlre.
75
76   In-place editing with "perl -i" is now safer
77       Previously in-place editing ("perl -i") would delete or rename the
78       input file as soon as you started working on a new file.
79
80       Without backups this would result in loss of data if there was an
81       error, such as a full disk, when writing to the output file.
82
83       This has changed so that the input file isn't replaced until the output
84       file has been completely written and successfully closed.
85
86       This works by creating a work file in the same directory, which is
87       renamed over the input file once the output file is complete.
88
89       Incompatibilities:
90
91       •   Since this renaming needs to only happen once, if you create a
92           thread or child process, that renaming will only happen in the
93           original thread or process.
94
95       •   If you change directories while processing a file, and your
96           operating system doesn't provide the "unlinkat()", "renameat()" and
97           "fchmodat()" functions, the final rename step may fail.
98
99       [perl #127663] <https://rt.perl.org/Public/Bug/Display.html?id=127663>
100
101   Initialisation of aggregate state variables
102       A persistent lexical array or hash variable can now be initialized, by
103       an expression such as "state @a = qw(x y z)".  Initialization of a list
104       of persistent lexical variables is still not possible.
105
106   Full-size inode numbers
107       On platforms where inode numbers are of a type larger than perl's
108       native integer numerical types, stat will preserve the full content of
109       large inode numbers by returning them in the form of strings of decimal
110       digits.  Exact comparison of inode numbers can thus be achieved by
111       comparing with "eq" rather than "==".  Comparison with "==", and other
112       numerical operations (which are usually meaningless on inode numbers),
113       work as well as they did before, which is to say they fall back to
114       floating point, and ultimately operate on a fairly useless rounded
115       inode number if the real inode number is too big for the floating point
116       format.
117
118   The "sprintf" %j format size modifier is now available with pre-C99
119       compilers
120       The actual size used depends on the platform, so remains unportable.
121
122   Close-on-exec flag set atomically
123       When opening a file descriptor, perl now generally opens it with its
124       close-on-exec flag already set, on platforms that support doing so.
125       This improves thread safety, because it means that an "exec" initiated
126       by one thread can no longer cause a file descriptor in the process of
127       being opened by another thread to be accidentally passed to the
128       executed program.
129
130       Additionally, perl now sets the close-on-exec flag more reliably,
131       whether it does so atomically or not.  Most file descriptors were
132       getting the flag set, but some were being missed.
133
134   String- and number-specific bitwise ops are no longer experimental
135       The new string-specific ("&. |. ^. ~.") and number-specific ("& | ^ ~")
136       bitwise operators introduced in Perl 5.22 that are available within the
137       scope of "use feature 'bitwise'" are no longer experimental.  Because
138       the number-specific ops are spelled the same way as the existing
139       operators that choose their behaviour based on their operands, these
140       operators must still be enabled via the "bitwise" feature, in either of
141       these two ways:
142
143           use feature "bitwise";
144
145           use v5.28; # "bitwise" now included
146
147       They are also now enabled by the -E command-line switch.
148
149       The "bitwise" feature no longer emits a warning.  Existing code that
150       disables the "experimental::bitwise" warning category that the feature
151       previously used will continue to work.
152
153       One caveat that module authors ought to be aware of is that the numeric
154       operators now pass a fifth TRUE argument to overload methods.  Any
155       methods that check the number of operands may croak if they do not
156       expect so many.  XS authors in particular should be aware that this:
157
158           SV *
159           bitop_handler (lobj, robj, swap)
160
161       may need to be changed to this:
162
163           SV *
164           bitop_handler (lobj, robj, swap, ...)
165
166   Locales are now thread-safe on systems that support them
167       These systems include Windows starting with Visual Studio 2005, and in
168       POSIX 2008 systems.
169
170       The implication is that you are now free to use locales and change them
171       in a threaded environment.  Your changes affect only your thread.  See
172       "Multi-threaded operation" in perllocale
173
174   New read-only predefined variable "${^SAFE_LOCALES}"
175       This variable is 1 if the Perl interpreter is operating in an
176       environment where it is safe to use and change locales (see
177       perllocale.)  This variable is true when the perl is unthreaded, or
178       compiled in a platform that supports thread-safe locale operation (see
179       previous item).
180

Security

182   [CVE-2017-12837] Heap buffer overflow in regular expression compiler
183       Compiling certain regular expression patterns with the case-insensitive
184       modifier could cause a heap buffer overflow and crash perl.  This has
185       now been fixed.  [perl #131582]
186       <https://rt.perl.org/Public/Bug/Display.html?id=131582>
187
188   [CVE-2017-12883] Buffer over-read in regular expression parser
189       For certain types of syntax error in a regular expression pattern, the
190       error message could either contain the contents of a random, possibly
191       large, chunk of memory, or could crash perl.  This has now been fixed.
192       [perl #131598] <https://rt.perl.org/Public/Bug/Display.html?id=131598>
193
194   [CVE-2017-12814] $ENV{$key} stack buffer overflow on Windows
195       A possible stack buffer overflow in the %ENV code on Windows has been
196       fixed by removing the buffer completely since it was superfluous
197       anyway.  [perl #131665]
198       <https://rt.perl.org/Public/Bug/Display.html?id=131665>
199
200   Default Hash Function Change
201       Perl 5.28.0 retires various older hash functions which are not viewed
202       as sufficiently secure for use in Perl. We now support four general
203       purpose hash functions, Siphash (2-4 and 1-3 variants), and  Zaphod32,
204       and StadtX hash. In addition we support SBOX32 (a form of tabular
205       hashing) for hashing short strings, in conjunction with any of the
206       other hash functions provided.
207
208       By default Perl is configured to support SBOX hashing of strings up to
209       24 characters, in conjunction with StadtX hashing on 64 bit builds, and
210       Zaphod32 hashing for 32 bit builds.
211
212       You may control these settings with the following options to Configure:
213
214           -DPERL_HASH_FUNC_SIPHASH
215           -DPERL_HASH_FUNC_SIPHASH13
216           -DPERL_HASH_FUNC_STADTX
217           -DPERL_HASH_FUNC_ZAPHOD32
218
219       To disable SBOX hashing you can use
220
221           -DPERL_HASH_USE_SBOX32_ALSO=0
222
223       And to set the maximum length to use SBOX32 hashing on with:
224
225           -DSBOX32_MAX_LEN=16
226
227       The maximum length allowed is 256. There probably isn't much point in
228       setting it higher than the default.
229

Incompatible Changes

231   Subroutine attribute and signature order
232       The experimental subroutine signatures feature has been changed so that
233       subroutine attributes must now come before the signature rather than
234       after. This is because attributes like ":lvalue" can affect the
235       compilation of code within the signature, for example:
236
237           sub f :lvalue ($a = do { $x = "abc"; return substr($x,0,1)}) { ...}
238
239       Note that this the second time they have been flipped:
240
241           sub f :lvalue ($a, $b) { ... }; # 5.20; 5.28 onwards
242           sub f ($a, $b) :lvalue { ... }; # 5.22 - 5.26
243
244   Comma-less variable lists in formats are no longer allowed
245       Omitting the commas between variables passed to formats is no longer
246       allowed.  This has been deprecated since Perl 5.000.
247
248   The ":locked" and ":unique" attributes have been removed
249       These have been no-ops and deprecated since Perl 5.12 and 5.10,
250       respectively.
251
252   "\N{}" with nothing between the braces is now illegal
253       This has been deprecated since Perl 5.24.
254
255   Opening the same symbol as both a file and directory handle is no longer
256       allowed
257       Using "open()" and "opendir()" to associate both a filehandle and a
258       dirhandle to the same symbol (glob or scalar) has been deprecated since
259       Perl 5.10.
260
261   Use of bare "<<" to mean "<<""" is no longer allowed
262       Use of a bare terminator has been deprecated since Perl 5.000.
263
264   Setting $/ to a reference to a non-positive integer no longer allowed
265       This used to work like setting it to "undef", but has been deprecated
266       since Perl 5.20.
267
268   Unicode code points with values exceeding "IV_MAX" are now fatal
269       This was deprecated since Perl 5.24.
270
271   The "B::OP::terse" method has been removed
272       Use "B::Concise::b_terse" instead.
273
274   Use of inherited AUTOLOAD for non-methods is no longer allowed
275       This was deprecated in Perl 5.004.
276
277   Use of strings with code points over 0xFF is not allowed for bitwise string
278       operators
279       Code points over 0xFF do not make sense for bitwise operators and such
280       an operation will now croak, except for a few remaining cases. See
281       perldeprecation.
282
283       This was deprecated in Perl 5.24.
284
285   Setting "${^ENCODING}" to a defined value is now illegal
286       This has been deprecated since Perl 5.22 and a no-op since Perl 5.26.
287
288   Backslash no longer escapes colon in PATH for the "-S" switch
289       Previously the "-S" switch incorrectly treated backslash ("\") as an
290       escape for colon when traversing the "PATH" environment variable.
291       [perl #129183] <https://rt.perl.org/Ticket/Display.html?id=129183>
292
293   the -DH (DEBUG_H) misfeature has been removed
294       On a perl built with debugging support, the "H" flag to the "-D"
295       debugging option has been removed. This was supposed to dump hash
296       values, but has been broken for many years.
297
298   Yada-yada is now strictly a statement
299       By the time of its initial stable release in Perl 5.12, the "..."
300       (yada-yada) operator was explicitly intended to serve as a statement,
301       not an expression.  However, the original implementation was confused
302       on this point, leading to inconsistent parsing.  The operator was
303       accidentally accepted in a few situations where it did not serve as a
304       complete statement, such as
305
306           ... . "foo";
307           ... if $a < $b;
308
309       The parsing has now been made consistent, permitting yada-yada only as
310       a statement.  Affected code can use "do{...}" to put a yada-yada into
311       an arbitrary expression context.
312
313   Sort algorithm can no longer be specified
314       Since Perl 5.8, the sort pragma has had subpragmata "_mergesort",
315       "_quicksort", and "_qsort" that can be used to specify which algorithm
316       perl should use to implement the sort builtin.  This was always
317       considered a dubious feature that might not last, hence the underscore
318       spellings, and they were documented as not being portable beyond Perl
319       5.8.  These subpragmata have now been deleted, and any attempt to use
320       them is an error.  The sort pragma otherwise remains, and the
321       algorithm-neutral "stable" subpragma can be used to control sorting
322       behaviour.  [perl #119635]
323       <https://rt.perl.org/Ticket/Display.html?id=119635>
324
325   Over-radix digits in floating point literals
326       Octal and binary floating point literals used to permit any hexadecimal
327       digit to appear after the radix point.  The digits are now restricted
328       to those appropriate for the radix, as digits before the radix point
329       always were.
330
331   Return type of "unpackstring()"
332       The return types of the C API functions "unpackstring()" and
333       "unpack_str()" have changed from "I32" to "SSize_t", in order to
334       accommodate datasets of more than two billion items.
335

Deprecations

337   Use of "vec" on strings with code points above 0xFF is deprecated
338       Such strings are represented internally in UTF-8, and "vec" is a bit-
339       oriented operation that will likely give unexpected results on those
340       strings.
341
342   Some uses of unescaped "{" in regexes are no longer fatal
343       Perl 5.26.0 fatalized some uses of an unescaped left brace, but an
344       exception was made at the last minute, specifically crafted to be a
345       minimal change to allow GNU Autoconf to work.  That tool is heavily
346       depended upon, and continues to use the deprecated usage.  Its use of
347       an unescaped left brace is one where we have no intention of
348       repurposing "{" to be something other than itself.
349
350       That exception is now generalized to include various other such cases
351       where the "{" will not be repurposed.
352
353       Note that these uses continue to raise a deprecation message.
354
355   Use of unescaped "{" immediately after a "(" in regular expression patterns
356       is deprecated
357       Using unescaped left braces is officially deprecated everywhere, but it
358       is not enforced in contexts where their use does not interfere with
359       expected extensions to the language.  A deprecation is added in this
360       release when the brace appears immediately after an opening
361       parenthesis.  Before this, even if the brace was part of a legal
362       quantifier, it was not interpreted as such, but as the literal
363       characters, unlike other quantifiers that follow a "(" which are
364       considered errors.  Now, their use will raise a deprecation message,
365       unless turned off.
366
367   Assignment to $[ will be fatal in Perl 5.30
368       Assigning a non-zero value to $[ has been deprecated since Perl 5.12,
369       but was never given a deadline for removal.  This has now been
370       scheduled for Perl 5.30.
371
372   hostname() won't accept arguments in Perl 5.32
373       Passing arguments to "Sys::Hostname::hostname()" was already
374       deprecated, but didn't have a removal date.  This has now been
375       scheduled for Perl 5.32.  [perl #124349]
376       <https://rt.perl.org/Ticket/Display.html?id=124349>
377
378   Module removals
379       The following modules will be removed from the core distribution in a
380       future release, and will at that time need to be installed from CPAN.
381       Distributions on CPAN which require these modules will need to list
382       them as prerequisites.
383
384       The core versions of these modules will now issue "deprecated"-category
385       warnings to alert you to this fact.  To silence these deprecation
386       warnings, install the modules in question from CPAN.
387
388       Note that these are (with rare exceptions) fine modules that you are
389       encouraged to continue to use.  Their disinclusion from core primarily
390       hinges on their necessity to bootstrapping a fully functional, CPAN-
391       capable Perl installation, not usually on concerns over their design.
392
393       B::Debug
394       Locale::Codes and its associated Country, Currency and Language modules
395

Performance Enhancements

397       •   The start up overhead for creating regular expression patterns with
398           Unicode properties ("\p{...}") has been greatly reduced in most
399           cases.
400
401       •   Many string concatenation expressions are now considerably faster,
402           due to the introduction internally of a "multiconcat" opcode which
403           combines multiple concatenations, and optionally a "=" or ".=",
404           into a single action. For example, apart from retrieving $s, $a and
405           $b, this whole expression is now handled as a single op:
406
407               $s .= "a=$a b=$b\n"
408
409           As a special case, if the LHS of an assignment is a lexical
410           variable or "my $s", the op itself handles retrieving the lexical
411           variable, which is faster.
412
413           In general, the more the expression includes a mix of constant
414           strings and variable expressions, the longer the expression, and
415           the more it mixes together non-utf8 and utf8 strings, the more
416           marked the performance improvement. For example on a "x86_64"
417           system, this code has been benchmarked running four times faster:
418
419               my $s;
420               my $a = "ab\x{100}cde";
421               my $b = "fghij";
422               my $c = "\x{101}klmn";
423
424               for my $i (1..10_000_000) {
425                   $s = "\x{100}wxyz";
426                   $s .= "foo=$a bar=$b baz=$c";
427               }
428
429           In addition, "sprintf" expressions which have a constant format
430           containing only %s and "%%" format elements, and which have a fixed
431           number of arguments, are now also optimised into a "multiconcat"
432           op.
433
434       •   The "ref()" builtin is now much faster in boolean context, since it
435           no longer bothers to construct a temporary string like
436           "Foo=ARRAY(0x134af48)".
437
438       •   "keys()" in void and scalar contexts is now more efficient.
439
440       •   The common idiom of comparing the result of index() with -1 is now
441           specifically optimised,  e.g.
442
443               if (index(...) != -1) { ... }
444
445       •   "for()" loops and similar constructs are now more efficient in most
446           cases.
447
448       •   File::Glob has been modified to remove unnecessary backtracking and
449           recursion, thanks to Russ Cox. See
450           <https://research.swtch.com/glob> for more details.
451
452       •   The XS-level "SvTRUE()" API function is now more efficient.
453
454       •   Various integer-returning ops are now more efficient in
455           scalar/boolean context.
456
457       •   Slightly improved performance when parsing stash names.  [perl
458           #129990] <https://rt.perl.org/Public/Bug/Display.html?id=129990>
459
460       •   Calls to "require" for an already loaded module are now slightly
461           faster.  [perl #132171]
462           <https://rt.perl.org/Public/Bug/Display.html?id=132171>
463
464       •   The performance of pattern matching "[[:ascii:]]" and
465           "[[:^ascii:]]" has been improved significantly except on EBCDIC
466           platforms.
467
468       •   Various optimizations have been applied to matching regular
469           expression patterns, so under the right circumstances, significant
470           performance gains may be noticed.  But in an application with many
471           varied patterns, little overall improvement likely will be seen.
472
473       •   Other optimizations have been applied to UTF-8 handling, but these
474           are not typically a major factor in most applications.
475

Modules and Pragmata

477       Key highlights in this release across several modules:
478
479   Removal of use vars
480       The usage of "use vars" has been discouraged since the introduction of
481       "our" in Perl 5.6.0. Where possible the usage of this pragma has now
482       been removed from the Perl source code.
483
484       This had a slight effect (for the better) on the output of WARNING_BITS
485       in B::Deparse.
486
487   Use of DynaLoader changed to XSLoader in many modules
488       XSLoader is more modern, and most modules already require perl 5.6 or
489       greater, so no functionality is lost by switching. In some cases, we
490       have also made changes to the local implementation that may not be
491       reflected in the version on CPAN due to a desire to maintain more
492       backwards compatibility.
493
494   Updated Modules and Pragmata
495       •   Archive::Tar has been upgraded from version 2.24 to 2.30.
496
497           This update also handled CVE-2018-12015: directory traversal
498           vulnerability.  [cpan #125523]
499           <https://rt.cpan.org/Ticket/Display.html?id=125523>
500
501       •   arybase has been upgraded from version 0.12 to 0.15.
502
503       •   Attribute::Handlers has been upgraded from version 0.99 to 1.01.
504
505       •   attributes has been upgraded from version 0.29 to 0.33.
506
507       •   B has been upgraded from version 1.68 to 1.74.
508
509       •   B::Concise has been upgraded from version 0.999 to 1.003.
510
511       •   B::Debug has been upgraded from version 1.24 to 1.26.
512
513           NOTE: B::Debug is deprecated and may be removed from a future
514           version of Perl.
515
516       •   B::Deparse has been upgraded from version 1.40 to 1.48.
517
518           It includes many bug fixes, and in particular, it now deparses
519           variable attributes correctly:
520
521               my $x :foo;  # used to deparse as
522                            # 'attributes'->import('main', \$x, 'foo'), my $x;
523
524       •   base has been upgraded from version 2.25 to 2.27.
525
526       •   bignum has been upgraded from version 0.47 to 0.49.
527
528       •   blib has been upgraded from version 1.06 to 1.07.
529
530       •   bytes has been upgraded from version 1.05 to 1.06.
531
532       •   Carp has been upgraded from version 1.42 to 1.50.
533
534           If a package on the call stack contains a constant named "ISA",
535           Carp no longer throws a "Not a GLOB reference" error.
536
537           Carp, when generating stack traces, now attempts to work around
538           longstanding bugs resulting from Perl's non-reference-counted
539           stack.  [perl #52610]
540           <https://rt.perl.org/Ticket/Display.html?id=52610>
541
542           Carp has been modified to avoid assuming that objects cannot be
543           overloaded without the overload module loaded (this can happen with
544           objects created by XS modules).  Previously, infinite recursion
545           would result if an XS-defined overload method itself called Carp.
546           [perl #132828] <https://rt.perl.org/Ticket/Display.html?id=132828>
547
548           Carp now avoids using "overload::StrVal", partly because older
549           versions of overload (included with perl 5.14 and earlier) load
550           Scalar::Util at run time, which will fail if Carp has been invoked
551           after a syntax error.
552
553       •   charnames has been upgraded from version 1.44 to 1.45.
554
555       •   Compress::Raw::Zlib has been upgraded from version 2.074 to 2.076.
556
557           This addresses a security vulnerability in older versions of the
558           'zlib' library (which is bundled with Compress-Raw-Zlib).
559
560       •   Config::Extensions has been upgraded from version 0.01 to 0.02.
561
562       •   Config::Perl::V has been upgraded from version 0.28 to 0.29.
563
564       •   CPAN has been upgraded from version 2.18 to 2.20.
565
566       •   Data::Dumper has been upgraded from version 2.167 to 2.170.
567
568           Quoting of glob names now obeys the Useqq option [perl #119831]
569           <https://rt.perl.org/Ticket/Display.html?id=119831>.
570
571           Attempts to set an option to "undef" through a combined
572           getter/setter method are no longer mistaken for getter calls [perl
573           #113090] <https://rt.perl.org/Ticket/Display.html?id=113090>.
574
575       •   Devel::Peek has been upgraded from version 1.26 to 1.27.
576
577       •   Devel::PPPort has been upgraded from version 3.35 to 3.40.
578
579           Devel::PPPort has moved from cpan-first to perl-first maintenance
580
581           Primary responsibility for the code in Devel::PPPort has moved into
582           core perl.  In a practical sense there should be no change except
583           that hopefully it will stay more up to date with changes made to
584           symbols in perl, rather than needing to be updated after the fact.
585
586       •   Digest::SHA has been upgraded from version 5.96 to 6.01.
587
588       •   DirHandle has been upgraded from version 1.04 to 1.05.
589
590       •   DynaLoader has been upgraded from version 1.42 to 1.45.
591
592           Its documentation now shows the use of "__PACKAGE__" and direct
593           object syntax [perl #132247]
594           <https://rt.perl.org/Ticket/Display.html?id=132247>.
595
596       •   Encode has been upgraded from version 2.88 to 2.97.
597
598       •   encoding has been upgraded from version 2.19 to 2.22.
599
600       •   Errno has been upgraded from version 1.28 to 1.29.
601
602       •   experimental has been upgraded from version 0.016 to 0.019.
603
604       •   Exporter has been upgraded from version 5.72 to 5.73.
605
606       •   ExtUtils::CBuilder has been upgraded from version 0.280225 to
607           0.280230.
608
609       •   ExtUtils::Constant has been upgraded from version 0.23 to 0.25.
610
611       •   ExtUtils::Embed has been upgraded from version 1.34 to 1.35.
612
613       •   ExtUtils::Install has been upgraded from version 2.04 to 2.14.
614
615       •   ExtUtils::MakeMaker has been upgraded from version 7.24 to 7.34.
616
617       •   ExtUtils::Miniperl has been upgraded from version 1.06 to 1.08.
618
619       •   ExtUtils::ParseXS has been upgraded from version 3.34 to 3.39.
620
621       •   ExtUtils::Typemaps has been upgraded from version 3.34 to 3.38.
622
623       •   ExtUtils::XSSymSet has been upgraded from version 1.3 to 1.4.
624
625       •   feature has been upgraded from version 1.47 to 1.52.
626
627       •   fields has been upgraded from version 2.23 to 2.24.
628
629       •   File::Copy has been upgraded from version 2.32 to 2.33.
630
631           It will now use the sub-second precision variant of utime()
632           supplied by Time::HiRes where available.  [perl #132401]
633           <https://rt.perl.org/Ticket/Display.html?id=132401>.
634
635       •   File::Fetch has been upgraded from version 0.52 to 0.56.
636
637       •   File::Glob has been upgraded from version 1.28 to 1.31.
638
639       •   File::Path has been upgraded from version 2.12_01 to 2.15.
640
641       •   File::Spec and Cwd have been upgraded from version 3.67 to 3.74.
642
643       •   File::stat has been upgraded from version 1.07 to 1.08.
644
645       •   FileCache has been upgraded from version 1.09 to 1.10.
646
647       •   Filter::Simple has been upgraded from version 0.93 to 0.95.
648
649       •   Filter::Util::Call has been upgraded from version 1.55 to 1.58.
650
651       •   GDBM_File has been upgraded from version 1.15 to 1.17.
652
653           Its documentation now explains that "each" and "delete" don't mix
654           in hashes tied to this module [perl #117449]
655           <https://rt.perl.org/Ticket/Display.html?id=117449>.
656
657           It will now retry opening with an acceptable block size if asking
658           gdbm to default the block size failed [perl #119623]
659           <https://rt.perl.org/Ticket/Display.html?id=119623>.
660
661       •   Getopt::Long has been upgraded from version 2.49 to 2.5.
662
663       •   Hash::Util::FieldHash has been upgraded from version 1.19 to 1.20.
664
665       •   I18N::Langinfo has been upgraded from version 0.13 to 0.17.
666
667           This module is now available on all platforms, emulating the system
668           nl_langinfo(3) on systems that lack it.  Some caveats apply, as
669           detailed in its documentation, the most severe being that, except
670           for MS Windows, the "CODESET" item is not implemented on those
671           systems, always returning "".
672
673           It now sets the UTF-8 flag in its returned scalar if the string
674           contains legal non-ASCII UTF-8, and the locale is UTF-8 [perl
675           #127288] <https://rt.perl.org/Ticket/Display.html?id=127288>.
676
677           This update also fixes a bug in which the underlying locale was
678           ignored for the "RADIXCHAR" (always was returned as a dot) and the
679           "THOUSEP" (always empty).  Now the locale-appropriate values are
680           returned.
681
682       •   I18N::LangTags has been upgraded from version 0.42 to 0.43.
683
684       •   if has been upgraded from version 0.0606 to 0.0608.
685
686       •   IO has been upgraded from version 1.38 to 1.39.
687
688       •   IO::Socket::IP has been upgraded from version 0.38 to 0.39.
689
690       •   IPC::Cmd has been upgraded from version 0.96 to 1.00.
691
692       •   JSON::PP has been upgraded from version 2.27400_02 to 2.97001.
693
694       •   The "libnet" distribution has been upgraded from version 3.10 to
695           3.11.
696
697       •   List::Util has been upgraded from version 1.46_02 to 1.49.
698
699       •   Locale::Codes has been upgraded from version 3.42 to 3.56.
700
701           NOTE: Locale::Codes scheduled to be removed from core in Perl 5.30.
702
703       •   Locale::Maketext has been upgraded from version 1.28 to 1.29.
704
705       •   Math::BigInt has been upgraded from version 1.999806 to 1.999811.
706
707       •   Math::BigInt::FastCalc has been upgraded from version 0.5005 to
708           0.5006.
709
710       •   Math::BigRat has been upgraded from version 0.2611 to 0.2613.
711
712       •   Module::CoreList has been upgraded from version 5.20170530 to
713           5.20180622.
714
715       •   mro has been upgraded from version 1.20 to 1.22.
716
717       •   Net::Ping has been upgraded from version 2.55 to 2.62.
718
719       •   NEXT has been upgraded from version 0.67 to 0.67_01.
720
721       •   ODBM_File has been upgraded from version 1.14 to 1.15.
722
723       •   Opcode has been upgraded from version 1.39 to 1.43.
724
725       •   overload has been upgraded from version 1.28 to 1.30.
726
727       •   PerlIO::encoding has been upgraded from version 0.25 to 0.26.
728
729       •   PerlIO::scalar has been upgraded from version 0.26 to 0.29.
730
731       •   PerlIO::via has been upgraded from version 0.16 to 0.17.
732
733       •   Pod::Functions has been upgraded from version 1.11 to 1.13.
734
735       •   Pod::Html has been upgraded from version 1.2202 to 1.24.
736
737           A title for the HTML document will now be automatically generated
738           by default from a "NAME" section in the POD document, as it used to
739           be before the module was rewritten to use Pod::Simple::XHTML to do
740           the core of its job [perl #110520]
741           <https://rt.perl.org/Ticket/Display.html?id=110520>.
742
743       •   Pod::Perldoc has been upgraded from version 3.28 to 3.2801.
744
745       •   The "podlators" distribution has been upgraded from version 4.09 to
746           4.10.
747
748           Man page references and function names now follow the Linux man
749           page formatting standards, instead of the Solaris standard.
750
751       •   POSIX has been upgraded from version 1.76 to 1.84.
752
753           Some more cautions were added about using locale-specific functions
754           in threaded applications.
755
756       •   re has been upgraded from version 0.34 to 0.36.
757
758       •   Scalar::Util has been upgraded from version 1.46_02 to 1.50.
759
760       •   SelfLoader has been upgraded from version 1.23 to 1.25.
761
762       •   Socket has been upgraded from version 2.020_03 to 2.027.
763
764       •   sort has been upgraded from version 2.02 to 2.04.
765
766       •   Storable has been upgraded from version 2.62 to 3.08.
767
768       •   Sub::Util has been upgraded from version 1.48 to 1.49.
769
770       •   subs has been upgraded from version 1.02 to 1.03.
771
772       •   Sys::Hostname has been upgraded from version 1.20 to 1.22.
773
774       •   Term::ReadLine has been upgraded from version 1.16 to 1.17.
775
776       •   Test has been upgraded from version 1.30 to 1.31.
777
778       •   Test::Harness has been upgraded from version 3.38 to 3.42.
779
780       •   Test::Simple has been upgraded from version 1.302073 to 1.302133.
781
782       •   threads has been upgraded from version 2.15 to 2.22.
783
784           The documentation now better describes the problems that arise when
785           returning values from threads, and no longer warns about creating
786           threads in "BEGIN" blocks.  [perl #96538]
787           <https://rt.perl.org/Ticket/Display.html?id=96538>
788
789       •   threads::shared has been upgraded from version 1.56 to 1.58.
790
791       •   Tie::Array has been upgraded from version 1.06 to 1.07.
792
793       •   Tie::StdHandle has been upgraded from version 4.4 to 4.5.
794
795       •   Time::gmtime has been upgraded from version 1.03 to 1.04.
796
797       •   Time::HiRes has been upgraded from version 1.9741 to 1.9759.
798
799       •   Time::localtime has been upgraded from version 1.02 to 1.03.
800
801       •   Time::Piece has been upgraded from version 1.31 to 1.3204.
802
803       •   Unicode::Collate has been upgraded from version 1.19 to 1.25.
804
805       •   Unicode::Normalize has been upgraded from version 1.25 to 1.26.
806
807       •   Unicode::UCD has been upgraded from version 0.68 to 0.70.
808
809           The function "num" now accepts an optional parameter to help in
810           diagnosing error returns.
811
812       •   User::grent has been upgraded from version 1.01 to 1.02.
813
814       •   User::pwent has been upgraded from version 1.00 to 1.01.
815
816       •   utf8 has been upgraded from version 1.19 to 1.21.
817
818       •   vars has been upgraded from version 1.03 to 1.04.
819
820       •   version has been upgraded from version 0.9917 to 0.9923.
821
822       •   VMS::DCLsym has been upgraded from version 1.08 to 1.09.
823
824       •   VMS::Stdio has been upgraded from version 2.41 to 2.44.
825
826       •   warnings has been upgraded from version 1.37 to 1.42.
827
828           It now includes new functions with names ending in "_at_level",
829           allowing callers to specify the exact call frame.  [perl #132468]
830           <https://rt.perl.org/Ticket/Display.html?id=132468>
831
832       •   XS::Typemap has been upgraded from version 0.15 to 0.16.
833
834       •   XSLoader has been upgraded from version 0.27 to 0.30.
835
836           Its documentation now shows the use of "__PACKAGE__", and direct
837           object syntax for example "DynaLoader" usage [perl #132247]
838           <https://rt.perl.org/Ticket/Display.html?id=132247>.
839
840           Platforms that use "mod2fname" to edit the names of loadable
841           libraries now look for bootstrap (.bs) files under the correct,
842           non-edited name.
843
844   Removed Modules and Pragmata
845       •   The "VMS::stdio" compatibility shim has been removed.
846

Documentation

848   Changes to Existing Documentation
849       We have attempted to update the documentation to reflect the changes
850       listed in this document.  If you find any we have missed, send email to
851       perlbug@perl.org <mailto:perlbug@perl.org>.
852
853       Additionally, the following selected changes have been made:
854
855       perlapi
856
857       •   The API functions "perl_parse()", "perl_run()", and
858           "perl_destruct()" are now documented comprehensively, where
859           previously the only documentation was a reference to the perlembed
860           tutorial.
861
862       •   The documentation of "newGIVENOP()" has been belatedly updated to
863           account for the removal of lexical $_.
864
865       •   The API functions "newCONSTSUB()" and "newCONSTSUB_flags()" are
866           documented much more comprehensively than before.
867
868       perldata
869
870       •   The section "Truth and Falsehood" in perlsyn has been moved into
871           perldata.
872
873       perldebguts
874
875       •   The description of the conditions under which "DB::sub()" will be
876           called has been clarified.  [perl #131672]
877           <https://rt.perl.org/Ticket/Display.html?id=131672>
878
879       perldiag
880
881       •   "Variable length lookbehind not implemented in regex m/%s/" in
882           perldiag
883
884           This now gives more ideas as to workarounds to the issue that was
885           introduced in Perl 5.18 (but not documented explicitly in its
886           perldelta) for the fact that some Unicode "/i" rules cause a few
887           sequences such as
888
889            (?<!st)
890
891           to be considered variable length, and hence disallowed.
892
893       •   "Use of state $_ is experimental" in perldiag
894
895           This entry has been removed, as the experimental support of this
896           construct was removed in perl 5.24.0.
897
898       •   The diagnostic "Initialization of state variables in list context
899           currently forbidden" has changed to "Initialization of state
900           variables in list currently forbidden", because list-context
901           initialization of single aggregate state variables is now
902           permitted.
903
904       perlembed
905
906       •   The examples in perlembed have been made more portable in the way
907           they exit, and the example that gets an exit code from the embedded
908           Perl interpreter now gets it from the right place.  The examples
909           that pass a constructed argv to Perl now show the mandatory null
910           "argv[argc]".
911
912       •   An example in perlembed used the string value of "ERRSV" as a
913           format string when calling croak().  If that string contains format
914           codes such as %s this could crash the program.
915
916           This has been changed to a call to croak_sv().
917
918           An alternative could have been to supply a trivial format string:
919
920             croak("%s", SvPV_nolen(ERRSV));
921
922           or as a special case for "ERRSV" simply:
923
924             croak(NULL);
925
926       perlfunc
927
928       •   There is now a note that warnings generated by built-in functions
929           are documented in perldiag and warnings.  [perl #116080]
930           <https://rt.perl.org/Ticket/Display.html?id=116080>
931
932       •   The documentation for the "exists" operator no longer says that
933           autovivification behaviour "may be fixed in a future release".
934           We've determined that we're not going to change the default
935           behaviour.  [perl #127712]
936           <https://rt.perl.org/Ticket/Display.html?id=127712>
937
938       •   A couple of small details in the documentation for the "bless"
939           operator have been clarified.  [perl #124428]
940           <https://rt.perl.org/Ticket/Display.html?id=124428>
941
942       •   The description of @INC hooks in the documentation for "require"
943           has been corrected to say that filter subroutines receive a useless
944           first argument.  [perl #115754]
945           <https://rt.perl.org/Ticket/Display.html?id=115754>
946
947       •   The documentation of "ref" has been rewritten for clarity.
948
949       •   The documentation of "use" now explains what syntactically
950           qualifies as a version number for its module version checking
951           feature.
952
953       •   The documentation of "warn" has been updated to reflect that since
954           Perl 5.14 it has treated complex exception objects in a manner
955           equivalent to "die".  [perl #121372]
956           <https://rt.perl.org/Ticket/Display.html?id=121372>
957
958       •   The documentation of "die" and "warn" has been revised for clarity.
959
960       •   The documentation of "each" has been improved, with a slightly more
961           explicit description of the sharing of iterator state, and with
962           caveats regarding the fragility of while-each loops.  [perl
963           #132644] <https://rt.perl.org/Ticket/Display.html?id=132644>
964
965       •   Clarification to "require" was added to explain the differences
966           between
967
968               require Foo::Bar;
969               require "Foo/Bar.pm";
970
971       perlgit
972
973       •   The precise rules for identifying "smoke-me" branches are now
974           stated.
975
976       perlguts
977
978       •   The section on reference counting in perlguts has been heavily
979           revised, to describe references in the way a programmer needs to
980           think about them rather than in terms of the physical data
981           structures.
982
983       •   Improve documentation related to UTF-8 multibytes.
984
985       perlintern
986
987       •   The internal functions "newXS_len_flags()" and "newATTRSUB_x()" are
988           now documented.
989
990       perlobj
991
992       •   The documentation about "DESTROY" methods has been corrected,
993           updated, and revised, especially in regard to how they interact
994           with exceptions.  [perl #122753]
995           <https://rt.perl.org/Ticket/Display.html?id=122753>
996
997       perlop
998
999       •   The description of the "x" operator in perlop has been clarified.
1000           [perl #132460] <https://rt.perl.org/Ticket/Display.html?id=132460>
1001
1002       •   perlop has been updated to note that "qw"'s whitespace rules differ
1003           from that of "split"'s in that only ASCII whitespace is used.
1004
1005       •   The general explanation of operator precedence and associativity
1006           has been corrected and clarified.  [perl #127391]
1007           <https://rt.perl.org/Ticket/Display.html?id=127391>
1008
1009       •   The documentation for the "\" referencing operator now explains the
1010           unusual context that it supplies to its operand.  [perl #131061]
1011           <https://rt.perl.org/Ticket/Display.html?id=131061>
1012
1013       perlrequick
1014
1015       •   Clarifications on metacharacters and character classes
1016
1017       perlretut
1018
1019       •   Clarify metacharacters.
1020
1021       perlrun
1022
1023       •   Clarify the differences between -M and -m.  [perl #131518]
1024           <https://rt.perl.org/Ticket/Display.html?id=131518>
1025
1026       perlsec
1027
1028       •   The documentation about set-id scripts has been updated and
1029           revised.  [perl #74142]
1030           <https://rt.perl.org/Ticket/Display.html?id=74142>
1031
1032       •   A section about using "sudo" to run Perl scripts has been added.
1033
1034       perlsyn
1035
1036       •   The section "Truth and Falsehood" in perlsyn has been removed from
1037           that document, where it didn't belong, and merged into the existing
1038           paragraph on the same topic in perldata.
1039
1040       •   The means to disambiguate between code blocks and hash
1041           constructors, already documented in perlref, are now documented in
1042           perlsyn too.  [perl #130958]
1043           <https://rt.perl.org/Ticket/Display.html?id=130958>
1044
1045       perluniprops
1046
1047       •   perluniprops has been updated to note that "\p{Word}" now includes
1048           code points matching the "\p{Join_Control}" property.  The change
1049           to the property was made in Perl 5.18, but not documented until
1050           now.  There are currently only two code points that match this
1051           property U+200C (ZERO WIDTH NON-JOINER) and U+200D (ZERO WIDTH
1052           JOINER).
1053
1054       •   For each binary table or property, the documentation now includes
1055           which characters in the range "\x00-\xFF" it matches, as well as a
1056           list of the first few ranges of code points matched above that.
1057
1058       perlvar
1059
1060       •   The entry for $+ in perlvar has been expanded upon to describe
1061           handling of multiply-named capturing groups.
1062
1063       perlfunc, perlop, perlsyn
1064
1065       •   In various places, improve the documentation of the special cases
1066           in the condition expression of a while loop, such as implicit
1067           "defined" and assignment to $_.  [perl #132644]
1068           <https://rt.perl.org/Ticket/Display.html?id=132644>
1069

Diagnostics

1071       The following additions or changes have been made to diagnostic output,
1072       including warnings and fatal error messages.  For the complete list of
1073       diagnostic messages, see perldiag.
1074
1075   New Diagnostics
1076       New Errors
1077
1078       •   Can't "goto" into a "given" block
1079
1080           (F) A "goto" statement was executed to jump into the middle of a
1081           "given" block.  You can't get there from here.  See "goto" in
1082           perlfunc.
1083
1084       •   Can't "goto" into a binary or list expression
1085
1086           Use of "goto" to jump into the parameter of a binary or list
1087           operator has been prohibited, to prevent crashes and stack
1088           corruption.  [perl #130936]
1089           <https://rt.perl.org/Ticket/Display.html?id=130936>
1090
1091           You may only enter the first argument of an operator that takes a
1092           fixed number of arguments, since this is a case that will not cause
1093           stack corruption.  [perl #132854]
1094           <https://rt.perl.org/Ticket/Display.html?id=132854>
1095
1096       New Warnings
1097
1098       •   Old package separator used in string
1099
1100           (W syntax) You used the old package separator, "'", in a variable
1101           named inside a double-quoted string; e.g., "In $name's house".
1102           This is equivalent to "In $name::s house".  If you meant the
1103           former, put a backslash before the apostrophe ("In $name\'s
1104           house").
1105
1106       •   "Locale '%s' contains (at least) the following characters which
1107           have unexpected meanings: %s  The Perl program will use the
1108           expected meanings" in perldiag
1109
1110   Changes to Existing Diagnostics
1111       •   A false-positive warning that was issued when using a numerically-
1112           quantified sub-pattern in a recursive regex has been silenced.
1113           [perl #131868]
1114           <https://rt.perl.org/Public/Bug/Display.html?id=131868>
1115
1116       •   The warning about useless use of a concatenation operator in void
1117           context is now generated for expressions with multiple
1118           concatenations, such as "$a.$b.$c", which used to mistakenly not
1119           warn.  [perl #6997]
1120           <https://rt.perl.org/Ticket/Display.html?id=6997>
1121
1122       •   Warnings that a variable or subroutine "masks earlier declaration
1123           in same ...", or that an "our" variable has been redeclared, have
1124           been moved to a new warnings category "shadow".  Previously they
1125           were in category "misc".
1126
1127       •   The deprecation warning from "Sys::Hostname::hostname()" saying
1128           that it doesn't accept arguments now states the Perl version in
1129           which the warning will be upgraded to an error.  [perl #124349]
1130           <https://rt.perl.org/Ticket/Display.html?id=124349>
1131
1132       •   The perldiag entry for the error regarding a set-id script has been
1133           expanded to make clear that the error is reporting a specific
1134           security vulnerability, and to advise how to fix it.
1135
1136       •   The "Unable to flush stdout" error message was missing a trailing
1137           newline. [debian #875361]
1138

Utility Changes

1140   perlbug
1141       •   "--help" and "--version" options have been added.
1142

Configuration and Compilation

1144       •   C89 requirement
1145
1146           Perl has been documented as requiring a C89 compiler to build since
1147           October 1998.  A variety of simplifications have now been made to
1148           Perl's internals to rely on the features specified by the C89
1149           standard. We believe that this internal change hasn't altered the
1150           set of platforms that Perl builds on, but please report a bug if
1151           Perl now has new problems building on your platform.
1152
1153       •   On GCC, "-Werror=pointer-arith" is now enabled by default,
1154           disallowing arithmetic on void and function pointers.
1155
1156       •   Where an HTML version of the documentation is installed, the HTML
1157           documents now use relative links to refer to each other.  Links
1158           from the index page of perlipc to the individual section documents
1159           are now correct.  [perl #110056]
1160           <https://rt.perl.org/Ticket/Display.html?id=110056>
1161
1162lib/unicore/mktables now correctly canonicalizes the names of the
1163           dependencies stored in the files it generates.
1164
1165           regen/mk_invlists.pl, unlike the other regen/*.pl scripts, used $0
1166           to name itself in the dependencies stored in the files it
1167           generates.  It now uses a literal so that the path stored in the
1168           generated files doesn't depend on how regen/mk_invlists.pl is
1169           invoked.
1170
1171           This lack of canonical names could cause test failures in
1172           t/porting/regen.t.  [perl #132925]
1173           <https://rt.perl.org/Ticket/Display.html?id=132925>
1174
1175       •   New probes
1176
1177           HAS_BUILTIN_ADD_OVERFLOW
1178           HAS_BUILTIN_MUL_OVERFLOW
1179           HAS_BUILTIN_SUB_OVERFLOW
1180           HAS_THREAD_SAFE_NL_LANGINFO_L
1181           HAS_LOCALECONV_L
1182           HAS_MBRLEN
1183           HAS_MBRTOWC
1184           HAS_MEMRCHR
1185           HAS_NANOSLEEP
1186           HAS_STRNLEN
1187           HAS_STRTOLD_L
1188           I_WCHAR
1189

Testing

1191       •   Testing of the XS-APItest directory is now done in parallel, where
1192           applicable.
1193
1194       •   Perl now includes a default .travis.yml file for Travis CI testing
1195           on github mirrors.  [perl #123981]
1196           <https://rt.perl.org/Ticket/Display.html?id=123981>
1197
1198       •   The watchdog timer count in re/pat_psycho.t can now be overridden.
1199
1200           This test can take a long time to run, so there is a timer to keep
1201           this in check (currently, 5 minutes). This commit adds checking the
1202           environment variable "PERL_TEST_TIME_OUT_FACTOR"; if set, the time
1203           out setting is multiplied by its value.
1204
1205harness no longer waits for 30 seconds when running t/io/openpid.t.
1206           [perl #121028] <https://rt.perl.org/Ticket/Display.html?id=121028>
1207           [perl #132867] <https://rt.perl.org/Ticket/Display.html?id=132867>
1208

Packaging

1210       For the past few years we have released perl using three different
1211       archive formats: bzip (".bz2"), LZMA2 (".xz") and gzip (".gz"). Since
1212       xz compresses better and decompresses faster, and gzip is more
1213       compatible and uses less memory, we have dropped the ".bz2" archive
1214       format with this release.  (If this poses a problem, do let us know;
1215       see "Reporting Bugs", below.)
1216

Platform Support

1218   Discontinued Platforms
1219       PowerUX / Power MAX OS
1220           Compiler hints and other support for these apparently long-defunct
1221           platforms has been removed.
1222
1223   Platform-Specific Notes
1224       CentOS
1225           Compilation on CentOS 5 is now fixed.
1226
1227       Cygwin
1228           A build with the quadmath library can now be done on Cygwin.
1229
1230       Darwin
1231           Perl now correctly uses reentrant functions, like "asctime_r", on
1232           versions of Darwin that have support for them.
1233
1234       FreeBSD
1235           FreeBSD's /usr/share/mk/sys.mk specifies "-O2" for architectures
1236           other than ARM and MIPS. By default, perl is now compiled with the
1237           same optimization levels.
1238
1239       VMS Several fix-ups for configure.com, marking function VMS has (or
1240           doesn't have).
1241
1242           CRTL features can now be set by embedders before invoking Perl by
1243           using the "decc$feature_set" and "decc$feature_set_value"
1244           functions.  Previously any attempt to set features after image
1245           initialization were ignored.
1246
1247       Windows
1248           •   Support for compiling perl on Windows using Microsoft Visual
1249               Studio 2017 (containing Visual C++ 14.1) has been added.
1250
1251           •   Visual C++ compiler version detection has been improved to work
1252               on non-English language systems.
1253
1254           •   We now set $Config{libpth} correctly for 64-bit builds using
1255               Visual C++ versions earlier than 14.1.
1256

Internal Changes

1258       •   A new optimisation phase has been added to the compiler,
1259           "optimize_optree()", which does a top-down scan of a complete
1260           optree just before the peephole optimiser is run. This phase is not
1261           currently hookable.
1262
1263       •   An "OP_MULTICONCAT" op has been added. At "optimize_optree()" time,
1264           a chain of "OP_CONCAT" and "OP_CONST" ops, together optionally with
1265           an "OP_STRINGIFY" and/or "OP_SASSIGN", are combined into a single
1266           "OP_MULTICONCAT" op. The op is of type "UNOP_AUX", and the aux
1267           array contains the argument count, plus a pointer to a constant
1268           string and a set of segment lengths. For example with
1269
1270               my $x = "foo=$foo, bar=$bar\n";
1271
1272           the constant string would be "foo=, bar=\n" and the segment lengths
1273           would be (4,6,1). If the string contains characters such as "\x80",
1274           whose representation changes under utf8, two sets of strings plus
1275           lengths are precomputed and stored.
1276
1277       •   Direct access to "PL_keyword_plugin" is not safe in the presence of
1278           multithreading. A new "wrap_keyword_plugin" function has been added
1279           to allow XS modules to safely define custom keywords even when
1280           loaded from a thread, analogous to "PL_check" / "wrap_op_checker".
1281
1282       •   The "PL_statbuf" interpreter variable has been removed.
1283
1284       •   The deprecated function "to_utf8_case()", accessible from XS code,
1285           has been removed.
1286
1287       •   A new function "is_utf8_invariant_string_loc()" has been added that
1288           is like "is_utf8_invariant_string()" but takes an extra pointer
1289           parameter into which is stored the location of the first variant
1290           character, if any are found.
1291
1292       •   A new function, "Perl_langinfo()" has been added.  It is an
1293           (almost) drop-in replacement for the system nl_langinfo(3), but
1294           works on platforms that lack that; as well as being more thread-
1295           safe, and hiding some gotchas with locale handling from the caller.
1296           Code that uses this, needn't use localeconv(3) (and be affected by
1297           the gotchas) to find the decimal point, thousands separator, or
1298           currency symbol.  See "Perl_langinfo" in perlapi.
1299
1300       •   A new API function "sv_rvunweaken()" has been added to complement
1301           "sv_rvweaken()".  The implementation was taken from "unweaken" in
1302           Scalar::Util.
1303
1304       •   A new flag, "SORTf_UNSTABLE", has been added. This will allow a
1305           future commit to make mergesort unstable when the user specifies
1306           Xno sort stableX, since it has been decided that mergesort should
1307           remain stable by default.
1308
1309       •   XS modules can now automatically get reentrant versions of system
1310           functions on threaded perls.
1311
1312           By adding
1313
1314               #define PERL_REENTRANT
1315
1316           near the beginning of an "XS" file, it will be compiled so that
1317           whatever reentrant functions perl knows about on that system will
1318           automatically and invisibly be used instead of the plain, non-
1319           reentrant versions.  For example, if you write "getpwnam()" in your
1320           code, on a system that has "getpwnam_r()" all calls to the former
1321           will be translated invisibly into the latter.  This does not happen
1322           except on threaded perls, as they aren't needed otherwise.  Be
1323           aware that which functions have reentrant versions varies from
1324           system to system.
1325
1326       •   The "PERL_NO_OP_PARENT" build define is no longer supported, which
1327           means that perl is now always built with "PERL_OP_PARENT" enabled.
1328
1329       •   The format and content of the non-utf8 transliteration table
1330           attached to the "op_pv" field of "OP_TRANS"/"OP_TRANSR" ops has
1331           changed. It's now a "struct OPtrans_map".
1332
1333       •   A new compiler "#define", "dTHX_DEBUGGING". has been added.  This
1334           is useful for XS or C code that only need the thread context
1335           because their debugging statements that get compiled only under
1336           "-DDEBUGGING" need one.
1337
1338       •   A new API function "Perl_setlocale" in perlapi has been added.
1339
1340       •   "sync_locale" in perlapi has been revised to return a boolean as to
1341           whether the system was using the global locale or not.
1342
1343       •   A new kind of magic scalar, called a "nonelem" scalar, has been
1344           introduced.  It is stored in an array to denote a non-existent
1345           element, whenever such an element is accessed in a potential lvalue
1346           context.  It replaces the existing "defelem" (deferred element)
1347           magic wherever this is possible, being significantly more
1348           efficient.  This means that "some_sub($sparse_array[$nonelem])" no
1349           longer has to create a new magic defelem scalar each time, as long
1350           as the element is within the array.
1351
1352           It partially fixes the rare bug of deferred elements getting out of
1353           synch with their arrays when the array is shifted or unshifted.
1354           [perl #132729] <https://rt.perl.org/Ticket/Display.html?id=132729>
1355

Selected Bug Fixes

1357       •   List assignment ("aassign") could in some rare cases allocate an
1358           entry on the mortals stack and leave the entry uninitialized,
1359           leading to possible crashes.  [perl #131570]
1360           <https://rt.perl.org/Ticket/Display.html?id=131570>
1361
1362       •   Attempting to apply an attribute to an "our" variable where a
1363           function of that name already exists could result in a NULL pointer
1364           being supplied where an SV was expected, crashing perl.  [perl
1365           #131597] <https://rt.perl.org/Ticket/Display.html?id=131597>
1366
1367       •   "split ' '" now correctly handles the argument being split when in
1368           the scope of the "unicode_strings" feature. Previously, when a
1369           string using the single-byte internal representation contained
1370           characters that are whitespace by Unicode rules but not by ASCII
1371           rules, it treated those characters as part of fields rather than as
1372           field separators.  [perl #130907]
1373           <https://rt.perl.org/Ticket/Display.html?id=130907>
1374
1375       •   Several built-in functions previously had bugs that could cause
1376           them to write to the internal stack without allocating room for the
1377           item being written. In rare situations, this could have led to a
1378           crash. These bugs have now been fixed, and if any similar bugs are
1379           introduced in future, they will be detected automatically in
1380           debugging builds.
1381
1382           These internal stack usage checks introduced are also done by the
1383           "entersub" operator when calling XSUBs.  This means we can report
1384           which XSUB failed to allocate enough stack space.  [perl #131975]
1385           <https://rt.perl.org/Public/Bug/Display.html?id=131975>
1386
1387       •   Using a symbolic ref with postderef syntax as the key in a hash
1388           lookup was yielding an assertion failure on debugging builds.
1389           [perl #131627] <https://rt.perl.org/Ticket/Display.html?id=131627>
1390
1391       •   Array and hash variables whose names begin with a caret now admit
1392           indexing inside their curlies when interpolated into strings, as in
1393           "${^CAPTURE[0]}" to index "@{^CAPTURE}".  [perl #131664]
1394           <https://rt.perl.org/Ticket/Display.html?id=131664>
1395
1396       •   Fetching the name of a glob that was previously UTF-8 but wasn't
1397           any longer would return that name flagged as UTF-8.  [perl #131263]
1398           <https://rt.perl.org/Ticket/Display.html?id=131263>
1399
1400       •   The perl "sprintf()" function (via the underlying C function
1401           "Perl_sv_vcatpvfn_flags()") has been heavily reworked to fix many
1402           minor bugs, including the integer wrapping of large width and
1403           precision specifiers and potential buffer overruns. It has also
1404           been made faster in many cases.
1405
1406       •   Exiting from an "eval", whether normally or via an exception, now
1407           always frees temporary values (possibly calling destructors) before
1408           setting $@. For example:
1409
1410               sub DESTROY { eval { die "died in DESTROY"; } }
1411               eval { bless []; };
1412               # $@ used to be equal to "died in DESTROY" here; it's now "".
1413
1414       •   Fixed a duplicate symbol failure with "-flto -mieee-fp" builds.
1415           pp.c defined "_LIB_VERSION" which "-lieee" already defines.  [perl
1416           #131786] <https://rt.perl.org/Ticket/Display.html?id=131786>
1417
1418       •   The tokenizer no longer consumes the exponent part of a floating
1419           point number if it's incomplete.  [perl #131725]
1420           <https://rt.perl.org/Ticket/Display.html?id=131725>
1421
1422       •   On non-threaded builds, for "m/$null/" where $null is an empty
1423           string is no longer treated as if the "/o" flag was present when
1424           the previous matching match operator included the "/o" flag.  The
1425           rewriting used to implement this behavior could confuse the
1426           interpreter.  This matches the behaviour of threaded builds.  [perl
1427           #124368] <https://rt.perl.org/Ticket/Display.html?id=124368>
1428
1429       •   Parsing a "sub" definition could cause a use after free if the
1430           "sub" keyword was followed by whitespace including newlines (and
1431           comments.)  [perl #131836]
1432           <https://rt.perl.org/Public/Bug/Display.html?id=131836>
1433
1434       •   The tokenizer now correctly adjusts a parse pointer when skipping
1435           whitespace in a "${identifier}" construct.  [perl #131949]
1436           <https://rt.perl.org/Public/Bug/Display.html?id=131949>
1437
1438       •   Accesses to "${^LAST_FH}" no longer assert after using any of a
1439           variety of I/O operations on a non-glob.  [perl #128263]
1440           <https://rt.perl.org/Public/Bug/Display.html?id=128263>
1441
1442       •   The XS-level "Copy()", "Move()", "Zero()" macros and their variants
1443           now assert if the pointers supplied are "NULL".  ISO C considers
1444           supplying NULL pointers to the functions these macros are built
1445           upon as undefined behaviour even when their count parameters are
1446           zero.  Based on these assertions and the original bug report three
1447           macro calls were made conditional.  [perl #131746]
1448           <https://rt.perl.org/Public/Bug/Display.html?id=131746> [perl
1449           #131892] <https://rt.perl.org/Public/Bug/Display.html?id=131892>
1450
1451       •   Only the "=" operator is permitted for defining defaults for
1452           parameters in subroutine signatures.  Previously other assignment
1453           operators, e.g. "+=", were also accidentally permitted.  [perl
1454           #131777] <https://rt.perl.org/Public/Bug/Display.html?id=131777>
1455
1456       •   Package names are now always included in ":prototype" warnings
1457           [perl #131833]
1458           <https://rt.perl.org/Public/Bug/Display.html?id=131833>
1459
1460       •   The "je_old_stack_hwm" field, previously only found in the "jmpenv"
1461           structure on debugging builds, has been added to non-debug builds
1462           as well. This fixes an issue with some CPAN modules caused by the
1463           size of this structure varying between debugging and non-debugging
1464           builds.  [perl #131942]
1465           <https://rt.perl.org/Public/Bug/Display.html?id=131942>
1466
1467       •   The arguments to the "ninstr()" macro are now correctly
1468           parenthesized.
1469
1470       •   A NULL pointer dereference in the "S_regmatch()" function has been
1471           fixed.  [perl #132017]
1472           <https://rt.perl.org/Public/Bug/Display.html?id=132017>
1473
1474       •   Calling exec PROGRAM LIST with an empty "LIST" has been fixed.
1475           This should call "execvp()" with an empty "argv" array (containing
1476           only the terminating "NULL" pointer), but was instead just
1477           returning false (and not setting $!).  [perl #131730]
1478           <https://rt.perl.org/Public/Bug/Display.html?id=131730>
1479
1480       •   The "gv_fetchmeth_sv" C function stopped working properly in Perl
1481           5.22 when fetching a constant with a UTF-8 name if that constant
1482           subroutine was stored in the stash as a simple scalar reference,
1483           rather than a full typeglob.  This has been corrected.
1484
1485       •   Single-letter debugger commands followed by an argument which
1486           starts with punctuation  (e.g. "p$^V" and "x@ARGV") now work again.
1487           They had been wrongly requiring a space between the command and the
1488           argument.  [perl #120174]
1489           <https://rt.perl.org/Public/Bug/Display.html?id=120174>
1490
1491       •   splice now throws an exception ("Modification of a read-only value
1492           attempted") when modifying a read-only array.  Until now it had
1493           been silently modifying the array.  The new behaviour is consistent
1494           with the behaviour of push and unshift.  [perl #131000]
1495           <https://rt.perl.org/Public/Bug/Display.html?id=131000>
1496
1497       •   "stat()", "lstat()", and file test operators now fail if given a
1498           filename containing a nul character, in the same way that "open()"
1499           already fails.
1500
1501       •   "stat()", "lstat()", and file test operators now reliably set $!
1502           when failing due to being applied to a closed or otherwise invalid
1503           file handle.
1504
1505       •   File test operators for Unix permission bits that don't exist on a
1506           particular platform, such as "-k" (sticky bit) on Windows, now
1507           check that the file being tested exists before returning the
1508           blanket false result, and yield the appropriate errors if the
1509           argument doesn't refer to a file.
1510
1511       •   Fixed a 'read before buffer' overrun when parsing a range starting
1512           with "\N{}" at the beginning of the character set for the
1513           transliteration operator.  [perl #132245]
1514           <https://rt.perl.org/Ticket/Display.html?id=132245>
1515
1516       •   Fixed a leaked scalar when parsing an empty "\N{}" at compile-time.
1517           [perl #132245] <https://rt.perl.org/Ticket/Display.html?id=132245>
1518
1519       •   Calling "do $path" on a directory or block device now yields a
1520           meaningful error code in $!.  [perl #125774]
1521           <https://rt.perl.org/Ticket/Display.html?id=125774>
1522
1523       •   Regexp substitution using an overloaded replacement value that
1524           provides a tainted stringification now correctly taints the
1525           resulting string.  [perl #115266]
1526           <https://rt.perl.org/Ticket/Display.html?id=115266>
1527
1528       •   Lexical sub declarations in "do" blocks such as "do { my sub lex;
1529           123 }" could corrupt the stack, erasing items already on the stack
1530           in the enclosing statement.  This has been fixed.  [perl #132442]
1531           <https://rt.perl.org/Ticket/Display.html?id=132442>
1532
1533       •   "pack" and "unpack" can now handle repeat counts and lengths that
1534           exceed two billion.  [perl #119367]
1535           <https://rt.perl.org/Ticket/Display.html?id=119367>
1536
1537       •   Digits past the radix point in octal and binary floating point
1538           literals now have the correct weight on platforms where a floating
1539           point significand doesn't fit into an integer type.
1540
1541       •   The canonical truth value no longer has a spurious special meaning
1542           as a callable subroutine.  It used to be a magic placeholder for a
1543           missing "import" or "unimport" method, but is now treated like any
1544           other string 1.  [perl #126042]
1545           <https://rt.perl.org/Ticket/Display.html?id=126042>
1546
1547       •   "system" now reduces its arguments to strings in the parent
1548           process, so any effects of stringifying them (such as overload
1549           methods being called or warnings being emitted) are visible in the
1550           way the program expects.  [perl #121105]
1551           <https://rt.perl.org/Ticket/Display.html?id=121105>
1552
1553       •   The "readpipe()" built-in function now checks at compile time that
1554           it has only one parameter expression, and puts it in scalar
1555           context, thus ensuring that it doesn't corrupt the stack at
1556           runtime.  [perl #4574]
1557           <https://rt.perl.org/Ticket/Display.html?id=4574>
1558
1559       •   "sort" now performs correct reference counting when aliasing $a and
1560           $b, thus avoiding premature destruction and leakage of scalars if
1561           they are re-aliased during execution of the sort comparator.  [perl
1562           #92264] <https://rt.perl.org/Ticket/Display.html?id=92264>
1563
1564       •   "reverse" with no operand, reversing $_ by default, is no longer in
1565           danger of corrupting the stack.  [perl #132544]
1566           <https://rt.perl.org/Ticket/Display.html?id=132544>
1567
1568       •   "exec", "system", et al are no longer liable to have their argument
1569           lists corrupted by reentrant calls and by magic such as tied
1570           scalars.  [perl #129888]
1571           <https://rt.perl.org/Ticket/Display.html?id=129888>
1572
1573       •   Perl's own "malloc" no longer gets confused by attempts to allocate
1574           more than a gigabyte on a 64-bit platform.  [perl #119829]
1575           <https://rt.perl.org/Ticket/Display.html?id=119829>
1576
1577       •   Stacked file test operators in a sort comparator expression no
1578           longer cause a crash.  [perl #129347]
1579           <https://rt.perl.org/Ticket/Display.html?id=129347>
1580
1581       •   An identity "tr///" transformation on a reference is no longer
1582           mistaken for that reference for the purposes of deciding whether it
1583           can be assigned to.  [perl #130578]
1584           <https://rt.perl.org/Ticket/Display.html?id=130578>
1585
1586       •   Lengthy hexadecimal, octal, or binary floating point literals no
1587           longer cause undefined behaviour when parsing digits that are of
1588           such low significance that they can't affect the floating point
1589           value.  [perl #131894]
1590           <https://rt.perl.org/Ticket/Display.html?id=131894>
1591
1592       •   "open $$scalarref..." and similar invocations no longer leak the
1593           file handle.  [perl #115814]
1594           <https://rt.perl.org/Ticket/Display.html?id=115814>
1595
1596       •   Some convoluted kinds of regexp no longer cause an arithmetic
1597           overflow when compiled.  [perl #131893]
1598           <https://rt.perl.org/Ticket/Display.html?id=131893>
1599
1600       •   The default typemap, by avoiding "newGVgen", now no longer leaks
1601           when XSUBs return file handles ("PerlIO *" or "FILE *").  [perl
1602           #115814] <https://rt.perl.org/Ticket/Display.html?id=115814>
1603
1604       •   Creating a "BEGIN" block as an XS subroutine with a prototype no
1605           longer crashes because of the early freeing of the subroutine.
1606
1607       •   The "printf" format specifier "%.0f" no longer rounds incorrectly
1608           [perl #47602] <https://rt.perl.org/Ticket/Display.html?id=47602>,
1609           and now shows the correct sign for a negative zero.
1610
1611       •   Fixed an issue where the error "Scalar value @arrayname[0] better
1612           written as $arrayname" would give an error "Cannot printf Inf with
1613           'c'" when arrayname starts with "Inf".  [perl #132645]
1614           <https://rt.perl.org/Ticket/Display.html?id=132645>
1615
1616       •   The Perl implementation of "getcwd()" in "Cwd" in the PathTools
1617           distribution now behaves the same as XS implementation on errors:
1618           it returns an error, and sets $!.  [perl #132648]
1619           <https://rt.perl.org/Ticket/Display.html?id=132648>
1620
1621       •   Vivify array elements when putting them on the stack.  Fixes [perl
1622           #8910] <https://rt.perl.org/Ticket/Display.html?id=8910> (reported
1623           in April 2002).
1624
1625       •   Fixed parsing of braced subscript after parens. Fixes [perl #8045]
1626           <https://rt.perl.org/Ticket/Display.html?id=8045> (reported in
1627           December 2001).
1628
1629       •   "tr/non_utf8/long_non_utf8/c" could give the wrong results when the
1630           length of the replacement character list was greater than 0x7fff.
1631
1632       •   "tr/non_utf8/non_utf8/cd" failed to add the implied
1633           "\x{100}-\x{7fffffff}" to the search character list.
1634
1635       •   Compilation failures within "perl-within-perl" constructs, such as
1636           with string interpolation and the right part of "s///e", now cause
1637           compilation to abort earlier.
1638
1639           Previously compilation could continue in order to report other
1640           errors, but the failed sub-parse could leave partly parsed
1641           constructs on the parser shift-reduce stack, confusing the parser,
1642           leading to perl crashes.  [perl #125351]
1643           <https://rt.perl.org/Ticket/Display.html?id=125351>
1644
1645       •   On threaded perls where the decimal point (radix) character is not
1646           a dot, it has been possible for a race to occur between threads
1647           when one needs to use the real radix character (such as with
1648           "sprintf").  This has now been fixed by use of a mutex on systems
1649           without thread-safe locales, and the problem just doesn't come up
1650           on those with thread-safe locales.
1651
1652       •   Errors while compiling a regex character class could sometime
1653           trigger an assertion failure.  [perl #132163]
1654           <https://rt.perl.org/Ticket/Display.html?id=132163>
1655

Acknowledgements

1657       Perl 5.28.0 represents approximately 13 months of development since
1658       Perl 5.26.0 and contains approximately 730,000 lines of changes across
1659       2,200 files from 77 authors.
1660
1661       Excluding auto-generated files, documentation and release tools, there
1662       were approximately 580,000 lines of changes to 1,300 .pm, .t, .c and .h
1663       files.
1664
1665       Perl continues to flourish into its fourth decade thanks to a vibrant
1666       community of users and developers. The following people are known to
1667       have contributed the improvements that became Perl 5.28.0:
1668
1669       Aaron Crane, Abigail, AEvar Arnfjoerd` Bjarmason, Alberto Simo~es,
1670       Alexandr Savca, Andrew Fresh, Andy Dougherty, Andy Lester, Aristotle
1671       Pagaltzis, Ask Bjorn Hansen, Chris 'BinGOs' Williams, Craig A. Berry,
1672       Dagfinn Ilmari Mannsaaker, Dan Collins, Daniel Dragan, David Cantrell,
1673       David Mitchell, Dmitry Ulanov, Dominic Hargreaves, E. Choroba, Eric
1674       Herman, Eugen Konkov, Father Chrysostomos, Gene Sullivan, George
1675       Hartzell, Graham Knop, Harald Joerg, H.Merijn Brand, Hugo van der
1676       Sanden, Jacques Germishuys, James E Keenan, Jarkko Hietaniemi, Jerry D.
1677       Hedden, J. Nick Koston, John Lightsey, John Peacock, John P. Linderman,
1678       John SJ Anderson, Karen Etheridge, Karl Williamson, Ken Brown, Ken
1679       Cotterill, Leon Timmermans, Lukas Mai, Marco Fontani, Marc-Philip
1680       Werner, Matthew Horsfall, Neil Bowers, Nicholas Clark, Nicolas R., Niko
1681       Tyni, Pali, Paul Marquess, Peter John Acklam, Reini Urban, Renee
1682       Baecker, Ricardo Signes, Robin Barker, Sawyer X, Scott Lanning, Sergey
1683       Aleynikov, Shirakata Kentaro, Shoichi Kaji, Slaven Rezic, Smylers,
1684       Steffen Mueller, Steve Hay, Sullivan Beck, Thomas Sibley, Todd Rinaldo,
1685       Tomasz Konojacki, Tom Hukins, Tom Wyant, Tony Cook, Vitali Peil, Yves
1686       Orton, Zefram.
1687
1688       The list above is almost certainly incomplete as it is automatically
1689       generated from version control history. In particular, it does not
1690       include the names of the (very much appreciated) contributors who
1691       reported issues to the Perl bug tracker.
1692
1693       Many of the changes included in this version originated in the CPAN
1694       modules included in Perl's core. We're grateful to the entire CPAN
1695       community for helping Perl to flourish.
1696
1697       For a more complete list of all of Perl's historical contributors,
1698       please see the AUTHORS file in the Perl source distribution.
1699

Reporting Bugs

1701       If you find what you think is a bug, you might check the perl bug
1702       database at <https://rt.perl.org/> .  There may also be information at
1703       <http://www.perl.org/> , the Perl Home Page.
1704
1705       If you believe you have an unreported bug, please run the perlbug
1706       program included with your release.  Be sure to trim your bug down to a
1707       tiny but sufficient test case.  Your bug report, along with the output
1708       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
1709       the Perl porting team.
1710
1711       If the bug you are reporting has security implications which make it
1712       inappropriate to send to a publicly archived mailing list, then see
1713       "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of
1714       how to report the issue.
1715

Give Thanks

1717       If you wish to thank the Perl 5 Porters for the work we had done in
1718       Perl 5, you can do so by running the "perlthanks" program:
1719
1720           perlthanks
1721
1722       This will send an email to the Perl 5 Porters list with your show of
1723       thanks.
1724

SEE ALSO

1726       The Changes file for an explanation of how to view exhaustive details
1727       on what changed.
1728
1729       The INSTALL file for how to build Perl.
1730
1731       The README file for general stuff.
1732
1733       The Artistic and Copying files for copyright information.
1734
1735
1736
1737perl v5.32.1                      2021-05-31                  PERL5280DELTA(1)
Impressum