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.  [GH #15982]
23       <https://github.com/Perl/perl5/issues/15982>
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       [GH #15216] <https://github.com/Perl/perl5/issues/15216>
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.  [GH #16021]
186       <https://github.com/Perl/perl5/issues/16021>
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       [GH #16025] <https://github.com/Perl/perl5/issues/16025>
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.  [GH #16051] <https://github.com/Perl/perl5/issues/16051>
198
199   Default Hash Function Change
200       Perl 5.28.0 retires various older hash functions which are not viewed
201       as sufficiently secure for use in Perl. We now support four general
202       purpose hash functions, Siphash (2-4 and 1-3 variants), and  Zaphod32,
203       and StadtX hash. In addition we support SBOX32 (a form of tabular
204       hashing) for hashing short strings, in conjunction with any of the
205       other hash functions provided.
206
207       By default Perl is configured to support SBOX hashing of strings up to
208       24 characters, in conjunction with StadtX hashing on 64 bit builds, and
209       Zaphod32 hashing for 32 bit builds.
210
211       You may control these settings with the following options to Configure:
212
213           -DPERL_HASH_FUNC_SIPHASH
214           -DPERL_HASH_FUNC_SIPHASH13
215           -DPERL_HASH_FUNC_STADTX
216           -DPERL_HASH_FUNC_ZAPHOD32
217
218       To disable SBOX hashing you can use
219
220           -DPERL_HASH_USE_SBOX32_ALSO=0
221
222       And to set the maximum length to use SBOX32 hashing on with:
223
224           -DSBOX32_MAX_LEN=16
225
226       The maximum length allowed is 256. There probably isn't much point in
227       setting it higher than the default.
228

Incompatible Changes

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

Deprecations

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

Performance Enhancements

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

Modules and Pragmata

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

Documentation

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

Diagnostics

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

Utility Changes

1133   perlbug
1134       •   "--help" and "--version" options have been added.
1135

Configuration and Compilation

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

Testing

1184       •   Testing of the XS-APItest directory is now done in parallel, where
1185           applicable.
1186
1187       •   Perl now includes a default .travis.yml file for Travis CI testing
1188           on github mirrors.  [GH #14558]
1189           <https://github.com/Perl/perl5/issues/14558>
1190
1191       •   The watchdog timer count in re/pat_psycho.t can now be overridden.
1192
1193           This test can take a long time to run, so there is a timer to keep
1194           this in check (currently, 5 minutes). This commit adds checking the
1195           environment variable "PERL_TEST_TIME_OUT_FACTOR"; if set, the time
1196           out setting is multiplied by its value.
1197
1198harness no longer waits for 30 seconds when running t/io/openpid.t.
1199           [GH #13535] <https://github.com/Perl/perl5/issues/13535> [GH
1200           #16420] <https://github.com/Perl/perl5/issues/16420>
1201

Packaging

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

Platform Support

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

Internal Changes

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

Selected Bug Fixes

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

Acknowledgements

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

Reporting Bugs

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

Give Thanks

1705       If you wish to thank the Perl 5 Porters for the work we had done in
1706       Perl 5, you can do so by running the "perlthanks" program:
1707
1708           perlthanks
1709
1710       This will send an email to the Perl 5 Porters list with your show of
1711       thanks.
1712

SEE ALSO

1714       The Changes file for an explanation of how to view exhaustive details
1715       on what changed.
1716
1717       The INSTALL file for how to build Perl.
1718
1719       The README file for general stuff.
1720
1721       The Artistic and Copying files for copyright information.
1722
1723
1724
1725perl v5.36.3                      2023-11-30                  PERL5280DELTA(1)
Impressum