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 unpack_str()
331       have changed from "I32" to "SSize_t", in order to accommodate datasets
332       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 deprecated,
372       but didn't have a removal date.  This has now been scheduled for Perl
373       5.32.  [GH #14662] <https://github.com/Perl/perl5/issues/14662>
374
375   Module removals
376       The following modules will be removed from the core distribution in a
377       future release, and will at that time need to be installed from CPAN.
378       Distributions on CPAN which require these modules will need to list
379       them as prerequisites.
380
381       The core versions of these modules will now issue "deprecated"-category
382       warnings to alert you to this fact.  To silence these deprecation
383       warnings, install the modules in question from CPAN.
384
385       Note that these are (with rare exceptions) fine modules that you are
386       encouraged to continue to use.  Their disinclusion from core primarily
387       hinges on their necessity to bootstrapping a fully functional, CPAN-
388       capable Perl installation, not usually on concerns over their design.
389
390       B::Debug
391       Locale::Codes and its associated Country, Currency and Language modules
392

Performance Enhancements

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

Modules and Pragmata

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

Documentation

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

Diagnostics

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

Utility Changes

1131   perlbug
1132       •   "--help" and "--version" options have been added.
1133

Configuration and Compilation

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

Testing

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

Packaging

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

Platform Support

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

Internal Changes

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

Selected Bug Fixes

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

Acknowledgements

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

Reporting Bugs

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

Give Thanks

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

SEE ALSO

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