5 perldelta - what is new for perl v5.28.0
9 This document describes differences between the 5.26.0 release and the 5.28.0
12 If you are upgrading from an earlier release such as 5.24.0, first read
13 L<perl5240delta>, which describes differences between 5.22.0 and 5.24.0.
15 =head1 Core Enhancements
17 =head2 Unicode 10.0 is supported
19 A list of changes is at
20 L<http://www.unicode.org/versions/Unicode10.0.0>.
22 =head2 L<C<delete>|perlfunc/delete EXPR> on key/value slices
24 L<C<delete>|perlfunc/delete EXPR> can now be used on key/value slices,
25 returning the keys along with the deleted values.
26 L<[perl #131328]|https://rt.perl.org/Ticket/Display.html?id=131328>
28 =head2 Experimentally, there are now alphabetic synonyms for some regular expression assertions
30 If you find it difficult to remember how to write certain of the pattern
31 assertions, there are now alphabetic synonyms.
35 (?=...) (*pla:...) or (*positive_lookahead:...)
36 (?!...) (*nla:...) or (*negative_lookahead:...)
37 (?<=...) (*plb:...) or (*positive_lookbehind:...)
38 (?<!...) (*nlb:...) or (*negative_lookbehind:...)
41 These are considered experimental, so using any of these will raise
42 (unless turned off) a warning in the C<experimental::alpha_assertions>
45 =head2 Mixed Unicode scripts are now detectable
47 A mixture of scripts, such as Cyrillic and Latin, in a string is often
48 the sign of a spoofing attack. A new regular expression construct
49 now allows for easy detection of these. For example, you can say
51 qr/(*script_run: \d+ \b )/x
53 And the digits matched will all be from the same set of 10. You won't
54 get a look-alike digit from a different script that has a different
55 value than what it appears to be.
59 qr/(*sr: \b \w+ \b )/x
61 makes sure that all the characters come from the same script.
63 You can also combine script runs with C<(?E<gt>...)> (or
74 (*atomic_script_run:...)
76 This is considered experimental, so using it will raise (unless turned
77 off) a warning in the C<experimental::script_run> category.
79 See L<perlre/Script Runs>.
81 =head2 In-place editing is now safer
83 Previously in-place editing would delete or rename the input file
84 as soon as you started working on a new file.
86 Without backups this would result in loss of data if there was an
87 error, such as a full disk, when writing to the output file.
89 This has changed so that the input file isn't replaced until the
90 output file has been completely written and successfully closed.
92 This works by creating a work file in the same directory, which is
93 renamed over the input file once the output file is complete.
101 Since this renaming needs to only happen once, if you create a thread
102 or child process, that renaming will only happen in the original
107 If you change directories while processing a file, and your operating
108 system doesn't provide the C<unlinkat()>, C<renameat()> and C<fchmodat()>
109 functions, the final rename step may fail.
113 L<[perl #127663]|https://rt.perl.org/Public/Bug/Display.html?id=127663>
115 =head2 Initialisation of aggregate state variables
117 A persistent lexical array or hash variable can now be initialized,
118 by an expression such as C<state @a = qw(x y z)>. Initialization of a
119 list of persistent lexical variables is still not possible.
121 =head2 Full-size inode numbers
123 On platforms where inode numbers are of a type larger than perl's native
124 integer numerical types, L<stat|perlfunc/stat> will preserve the full
125 content of large inode numbers by returning them in the form of strings of
126 decimal digits. Exact comparison of inode numbers can thus be achieved by
127 comparing with C<eq> rather than C<==>. Comparison with C<==>, and other
128 numerical operations (which are usually meaningless on inode numbers),
129 work as well as they did before, which is to say they fall back to
130 floating point, and ultimately operate on a fairly useless rounded inode
131 number if the real inode number is too big for the floating point format.
133 =head2 The C<sprintf> C<%j> format size modifier is now available with pre-C99 compilers
135 The actual size used depends on the platform, so remains unportable.
137 =head2 Close-on-exec flag set atomically
139 When opening a file descriptor, perl now generally opens it with its
140 close-on-exec flag already set, on platforms that support doing so.
141 This improves thread safety, because it means that an C<exec> initiated
142 by one thread can no longer cause a file descriptor in the process
143 of being opened by another thread to be accidentally passed to the
146 Additionally, perl now sets the close-on-exec flag more reliably, whether
147 it does so atomically or not. Most file descriptors were getting the
148 flag set, but some were being missed.
150 =head2 String- and number-specific bitwise ops are no longer experimental
152 The new string-specific (C<&. |. ^. ~.>) and number-specific (C<& | ^ ~>)
153 bitwise operators introduced in Perl 5.22 are no longer experimental.
154 Because the number-specific ops are spelled the same way as the existing
155 operators that choose their behaviour based on their operands, these
156 operators must still be enabled via the "bitwise" feature, in either of
159 use feature "bitwise";
161 use v5.28; # "bitwise" now included
163 They are also now enabled by the B<-E> command-line switch.
165 The "bitwise" feature no longer emits a warning. Existing code that
166 disables the "experimental::bitwise" warning category that the feature
167 previously used will continue to work.
169 One caveat that module authors ought to be aware of is that the numeric
170 operators now pass a fifth TRUE argument to overload methods. Any methods
171 that check the number of operands may croak if they do not expect so many.
172 XS authors in particular should be aware that this:
175 bitop_handler (lobj, robj, swap)
177 may need to be changed to this:
180 bitop_handler (lobj, robj, swap, ...)
181 =head2 Locales are now thread-safe on systems that support them
183 These systems include Windows starting with Visual Studio 2005, and in
186 The implication is that you are now free to use locales and changes them
187 in a threaded environment. Your changes affect only your thread.
188 See L<perllocale/Multi-threaded operation>
190 =head2 New read-only predefined variable C<${^SAFE_LOCALES}>
192 This variable is 1 if the Perl interpreter is operating in an
193 environment where it is safe to use and change locales (see
194 L<perllocale>.) This variable is true when the perl is
195 unthreaded, or compiled in a platform that supports thread-safe locale
196 operation (see previous item).
200 =head2 [CVE-2017-12837] Heap buffer overflow in regular expression compiler
202 Compiling certain regular expression patterns with the case-insensitive
203 modifier could cause a heap buffer overflow and crash perl. This has now been
205 L<[perl #131582]|https://rt.perl.org/Public/Bug/Display.html?id=131582>
207 =head2 [CVE-2017-12883] Buffer over-read in regular expression parser
209 For certain types of syntax error in a regular expression pattern, the error
210 message could either contain the contents of a random, possibly large, chunk of
211 memory, or could crash perl. This has now been fixed.
212 L<[perl #131598]|https://rt.perl.org/Public/Bug/Display.html?id=131598>
214 =head2 [CVE-2017-12814] C<$ENV{$key}> stack buffer overflow on Windows
216 A possible stack buffer overflow in the C<%ENV> code on Windows has been fixed
217 by removing the buffer completely since it was superfluous anyway.
218 L<[perl #131665]|https://rt.perl.org/Public/Bug/Display.html?id=131665>
220 =head2 Default Hash Function Change
222 Perl 5.28.0 retires various older hash functions which are not viewed as
223 sufficiently secure for use in Perl. We now support four general purpose
224 hash functions, Siphash (2-4 and 1-3 variants), and Zaphod32, and StadtX
225 hash. In addition we support SBOX32 (a form of tabular hashing) for hashing
226 short strings, in conjunction with any of the other hash functions provided.
228 By default Perl is configured to support SBOX hashing of strings up to 24
229 characters, in conjunction with StadtX hashing on 64 bit builds, and
230 Zaphod32 hashing for 32 bit builds.
232 You may control these settings with the following options to Configure:
234 -DPERL_HASH_FUNC_SIPHASH
235 -DPERL_HASH_FUNC_SIPHASH13
236 -DPERL_HASH_FUNC_STADTX
237 -DPERL_HASH_FUNC_ZAPHOD32
239 To disable SBOX hashing you can use
241 -DPERL_HASH_USE_SBOX32_ALSO=0
243 And to set the maximum length to use SBOX32 hashing on with:
247 The maximum length allowed is 256. There probably isn't much point
248 in setting it higher than the default.
250 =head1 Incompatible Changes
252 =head2 Subroutine attribute and signature order
254 The experimental subroutine signatures feature has been changed so that
255 subroutine attributes must now come before the signature rather than
256 after. This is because attributes like C<:lvalue> can affect the
257 compilation of code within the signature, for example:
259 sub f :lvalue ($a = do { $x = "abc"; return substr($x,0,1)}) { ...}
261 Note that this the second time they have been flipped:
263 sub f :lvalue ($a, $b) { ... }; # 5.20; 5.28 onwards
264 sub f ($a, $b) :lvalue { ... }; # 5.22 - 5.26
266 =head2 Comma-less variable lists in formats are no longer allowed
268 Omitting the commas between variables passed to formats is no longer
269 allowed. This has been deprecated since Perl 5.000.
271 =head2 The C<:locked> and C<:unique> attributes have been removed
273 These have been no-ops and deprecated since Perl 5.12 and 5.10,
276 =head2 C<\N{}> with nothing between the braces is now illegal.
278 This has been deprecated since Perl 5.24.
280 =head2 Opening the same symbol as both a file and directory handle is no longer allowed
282 Using C<open()> and C<opendir()> to associate both a filehandle and a dirhandle
283 to the same symbol (glob or scalar) has been deprecated since Perl 5.10.
285 =head2 Use of bare C<< << >> to mean C<< <<"" >> is no longer allowed
287 Use of a bare terminator has been deprecated since Perl 5.000.
289 =head2 Setting $/ to a reference to a non-positive integer no longer allowed
291 This used to work like setting it to C<undef>, but has been deprecated
294 =head2 Unicode code points with values exceeding C<IV_MAX> are now fatal.
296 This was deprecated since Perl 5.24.
298 =head2 C<B::OP::terse> no longer exists.
300 Use C<B::Concise::b_terse> instead.
302 =head2 Use of inherited AUTOLOAD for non-methods is no longer allowed.
304 This was deprecated in Perl 5.004.
306 =head2 Use of strings with code points over 0xFF is not allowed for bitwise string operators
308 Code points over C<0xFF> do not make sense for bitwise operators.
310 See L<perldeprecation>.
312 =head2 Setting C<${^ENCODING}> to a defined value is now illegal
314 This has been deprecated since Perl 5.22 and a no-op since Perl 5.26.
316 =head2 Backslash no longer escapes colon in PATH for the C<-S> switch
318 Previously the C<-S> switch incorrectly treated backslash ("\") as an
319 escape for colon when traversing the C<PATH> environment variable.
320 L<[perl #129183]|https://rt.perl.org/Ticket/Display.html?id=129183>
322 =head2 the -DH (DEBUG_H) misfeature has been removed
324 On a perl built with debugging support, the C<H> flag to the C<-D>
325 debugging option has been removed. This was supposed to dump hash values,
326 but has been broken for many years.
328 =head2 Yada-yada is now strictly a statement
330 By the time of its initial stable release in Perl 5.12, the C<...>
331 (yada-yada) operator was explicitly intended to serve as a statement,
332 not an expression. However, the original implementation was confused
333 on this point, leading to inconsistent parsing. The operator was
334 accidentally accepted in a few situations where it did not serve as a
335 complete statement, such as
340 The parsing has now been made consistent, permitting yada-yada only as
341 a statement. Affected code can use C<do{...}> to put a yada-yada into
342 an arbitrary expression context.
344 =head2 Sort algorithm can no longer be specified
346 Since Perl 5.8, the L<sort> pragma has had subpragmata C<_mergesort>,
347 C<_quicksort>, and C<_qsort> that can be used to specify which algorithm
348 perl should use to implement the L<sort|perlfunc/sort> builtin.
349 This was always considered a dubious feature that might not last,
350 hence the underscore spellings, and they were documented as not being
351 portable beyond Perl 5.8. These subpragmata have now been deleted,
352 and any attempt to use them is an error. The L<sort> pragma otherwise
353 remains, and the algorithm-neutral C<stable> subpragma can be used to
354 control sorting behaviour.
355 L<[perl #119635]|https://rt.perl.org/Ticket/Display.html?id=119635>
357 =head2 Over-radix digits in floating point literals
359 Octal and binary floating point literals used to permit any hexadecimal
360 digit to appear after the radix point. The digits are now restricted
361 to those appropriate for the radix, as digits before the radix point
364 =head2 Return type of C<unpackstring()>
366 The return types of the C API functions C<unpackstring()> and
367 C<unpack_str()> have changed from C<I32> to C<SSize_t>, in order to
368 accommodate datasets of more than two billion items.
372 =head2 Use of L<C<vec>|perlfunc/vec EXPR,OFFSET,BITS> on strings with code points above 0xFF is deprecated.
374 Such strings are represented internally in UTF-8, and C<vec> is a
375 bit-oriented operation that will likely give unexpected results on those
378 =head2 Some uses of unescaped C<"{"> are no longer fatal
380 Perl 5.26.0 fatalized some uses of an unescaped left brace, but an
381 exception was made at the last minute, specifically crafted to be a
382 minimal change to allow GNU Autoconf to work. This code is heavily
383 depended upon, and continues to use the deprecated usage. Its use of an
384 unescaped left brace is one where we have no intention of repurposing
385 C<"{"> to be something other than itself.
387 That exception is now generalized to include various other such cases
388 where the C<"{"> will not be repurposed.
390 Note that these uses continue to raise a deprecation message.
392 =head2 Use of unescaped C<"{"> immediately after a C<"("> in regular expression patterns
394 Using unescaped left braces is officially deprecated everywhere, but it
395 is not enforced in contexts where their use does not interfere with
396 expected extensions to the language. A deprecation is added in this
397 release when the brace appears immediately after an opening parenthesis.
398 Before this, even if the brace was part of a legal quantifier, it was
399 not interpreted as such, but as the literal characters, unlike other
400 quantifiers that follow a C<"("> which are considered errors. Now,
401 their use will raise a deprecation message, unless turned off.
403 =head2 Assignment to C<$[> will be fatal in Perl 5.30
405 Assigning a non-zero value to L<C<$[>|perlvar/$[> has been deprecated
406 since Perl 5.12, but was never given a deadline for removal. This has
407 now been scheduled for Perl 5.30.
409 =head2 hostname() won't accept arguments in Perl 5.32
411 Passing arguments to C<Sys::Hostname::hostname()> was already deprecated,
412 but didn't have a removal date. This has now been scheduled for Perl
413 5.32. L<[perl #124349]|https://rt.perl.org/Ticket/Display.html?id=124349>
415 =head2 Module removals
417 The following modules will be removed from the core distribution in a
418 future release, and will at that time need to be installed from CPAN.
419 Distributions on CPAN which require these modules will need to list them as
422 The core versions of these modules will now issue C<"deprecated">-category
423 warnings to alert you to this fact. To silence these deprecation warnings,
424 install the modules in question from CPAN.
426 Note that these are (with rare exceptions) fine modules that you are encouraged
427 to continue to use. Their disinclusion from core primarily hinges on their
428 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
429 not usually on concerns over their design.
435 =item L<Locale::Codes> and its associated Country, Currency and Language modules
439 =head1 Performance Enhancements
445 The start up overhead for creating regular expression patterns with
446 Unicode properties (C<\p{...}>) has been greatly reduced in most cases.
450 Many string concatenation expressions are now considerably faster, due
451 to the introduction internally of a C<multiconcat> opcode which combines
452 multiple concatenations, and optionally a C<=> or C<.=>, into a single
453 action. For example, apart from retrieving C<$s>, C<$a> and C<$b>, this
454 whole expression is now handled as a single op:
458 As a special case, if the LHS of an assignment is a lexical variable or
459 C<my $s>, the op itself handles retrieving the lexical variable, which
462 In general, the more the expression includes a mix of constant strings and
463 variable expressions, the longer the expression, and the more it mixes
464 together non-utf8 and utf8 strings, the more marked the performance
465 improvement. For example on a C<x86_64> system, this code has been
466 benchmarked running four times faster:
469 my $a = "ab\x{100}cde";
471 my $c = "\x{101}klmn";
473 for my $i (1..10_000_000) {
475 $s .= "foo=$a bar=$b baz=$c";
478 In addition, C<sprintf> expressions which have a constant format
479 containing only C<%s> and C<%%> format elements, and which have a fixed
480 number of arguments, are now also optimised into a C<multiconcat> op.
484 The C<ref()> builtin is now much faster in boolean context, since it no
485 longer bothers to construct a temporary string like C<Foo=ARRAY(0x134af48)>.
489 C<keys()> in void and scalar contexts is now more efficient.
493 C<< if (index(...) != -1) { ... } >> is now more efficient.
497 C<for()> loops and similar constructs are now more efficient in most cases.
501 L<File::Glob> has been modified to remove unnecessary backtracking and
502 recursion, thanks to Russ Cox. See L<https://research.swtch.com/glob>
507 C<SvTRUE()> is now more efficient.
511 Various integer-returning ops are now more efficient in scalar/boolean context.
515 Slightly improved performance when parsing stash names.
516 L<[perl #129990]|https://rt.perl.org/Public/Bug/Display.html?id=129990>
520 Calls to C<require> for an already loaded module are now slightly faster.
521 L<[perl #132171]|https://rt.perl.org/Public/Bug/Display.html?id=132171>
525 The performance of pattern matching C<[[:ascii:]]> and C<[[:^ascii:]]>
526 has been improved significantly except on EBCDIC platforms.
530 Various optimizations have been applied to matching regular expression
531 patterns, so under the right circumstances, significant performance
532 gains may be noticed. But in an application with many varied patterns,
533 little overall improvement likely will be seen.
537 Other optimizations have been applied to UTF-8 handling, but these are
538 not typically a major factor in most applications.
542 =head1 Modules and Pragmata
544 Key highlights in this release across several modules:
546 =head2 Removal of use vars
548 The usage of C<use vars> has been discouraged since the introduction of C<our> in
549 Perl 5.6.0. Where possible the usage of this pragma has now been removed from
550 the Perl source code.
552 This had a slight effect (for the better) on the output of WARNING_BITS in
555 =head2 Use of DynaLoader changed to XSLoader in many modules
557 XSLoader is more modern, and most modules already require perl 5.6 or greater, so
558 no functionality is lost by switching. In some cases, we have also made changes to
559 the local implementation that may not be reflected in the version on CPAN due
560 to a desire to maintain more backwards compatibility.
562 =head2 Updated Modules and Pragmata
568 L<Archive::Tar> has been upgraded from version 2.24 to 2.26.
572 L<arybase> has been upgraded from version 0.12 to 0.15.
576 L<Attribute::Handlers> has been upgraded from version 0.99 to 1.01.
580 L<attributes> has been upgraded from version 0.29 to 0.33.
584 L<B> has been upgraded from version 1.68 to 1.74.
588 L<B::Concise> has been upgraded from version 0.999 to 1.003.
592 L<B::Debug> has been upgraded from version 1.24 to 1.26.
594 NOTE: L<B::Debug> is deprecated and may be removed from a future version of Perl.
598 L<B::Deparse> has been upgraded from version 1.40 to 1.48.
600 It includes many bug fixes, and in particular, it now deparses variable
601 attributes correctly:
603 my $x :foo; # used to deparse as
604 # 'attributes'->import('main', \$x, 'foo'), my $x;
608 L<base> has been upgraded from version 2.25 to 2.27.
612 L<bignum> has been upgraded from version 0.47 to 0.49.
616 L<blib> has been upgraded from version 1.06 to 1.07.
620 L<bytes> has been upgraded from version 1.05 to 1.06.
624 L<Carp> has been upgraded from version 1.42 to 1.50.
626 If a package on the call stack contains a constant named C<ISA>, Carp no
627 longer throws a "Not a GLOB reference" error.
629 L<Carp>, when generating stack traces, now attempts to work around
630 longstanding bugs resulting from Perl's non-reference-counted stack.
631 L<[perl #52610]|https://rt.perl.org/Ticket/Display.html?id=52610>
633 Carp has been modified to avoid assuming that objects cannot be
634 overloaded without the L<overload> module loaded (this can happen with
635 objects created by XS modules). Previously, infinite recursion would
636 result if an XS-defined overload method itself called Carp.
637 L<[perl #132828]|https://rt.perl.org/Ticket/Display.html?id=132828>
639 Carp now avoids using C<overload::StrVal>, partly because older versions
640 of L<overload> (included with perl 5.14 and earlier) load L<Scalar::Util>
641 at run time, which will fail if Carp has been invoked after a syntax error.
645 L<charnames> has been upgraded from version 1.44 to 1.45.
649 L<Compress::Raw::Zlib> has been upgraded from version 2.074 to 2.076.
651 This addresses a security vulnerability in older versions of the 'zlib' library
652 (which is bundled with Compress-Raw-Zlib).
656 L<Config::Extensions> has been upgraded from version 0.01 to 0.02.
660 L<Config::Perl::V> has been upgraded from version 0.28 to 0.29.
664 L<CPAN> has been upgraded from version 2.18 to 2.20.
668 L<Data::Dumper> has been upgraded from version 2.167 to 2.170.
670 Quoting of glob names now obeys the Useqq option
671 L<[perl #119831]|https://rt.perl.org/Ticket/Display.html?id=119831>.
673 Attempts to set an option to C<undef> through a combined getter/setter
674 method are no longer mistaken for getter calls
675 L<[perl #113090]|https://rt.perl.org/Ticket/Display.html?id=113090>.
679 L<Devel::Peek> has been upgraded from version 1.26 to 1.27.
683 L<Devel::PPPort> has been upgraded from version 3.35 to 3.40.
685 L<Devel::PPPort> has moved from cpan-first to perl-first maintenance
687 Primary responsibility for the code in Devel::PPPort has moved into core perl.
688 In a practical sense there should be no change except that hopefully it will
689 stay more up to date with changes made to symbols in perl, rather than needing
690 to be updated after the fact.
694 L<Digest::SHA> has been upgraded from version 5.96 to 6.01.
698 L<DirHandle> has been upgraded from version 1.04 to 1.05.
702 L<DynaLoader> has been upgraded from version 1.42 to 1.45.
704 Its documentation now shows the use of C<__PACKAGE__> and direct object
706 L<[perl #132247]|https://rt.perl.org/Ticket/Display.html?id=132247>.
710 L<Encode> has been upgraded from version 2.88 to 2.97.
714 L<encoding> has been upgraded from version 2.19 to 2.22.
718 L<Errno> has been upgraded from version 1.28 to 1.29.
722 L<experimental> has been upgraded from version 0.016 to 0.019.
726 L<Exporter> has been upgraded from version 5.72 to 5.73.
730 L<ExtUtils::CBuilder> has been upgraded from version 0.280225 to 0.280230.
734 L<ExtUtils::Constant> has been upgraded from version 0.23 to 0.25.
738 L<ExtUtils::Embed> has been upgraded from version 1.34 to 1.35.
742 L<ExtUtils::Install> has been upgraded from version 2.04 to 2.14.
746 L<ExtUtils::MakeMaker> has been upgraded from version 7.24 to 7.34.
750 L<ExtUtils::Miniperl> has been upgraded from version 1.06 to 1.08.
754 L<ExtUtils::ParseXS> has been upgraded from version 3.34 to 3.39.
758 L<ExtUtils::Typemaps> has been upgraded from version 3.34 to 3.38.
762 L<ExtUtils::XSSymSet> has been upgraded from version 1.3 to 1.4.
766 L<feature> has been upgraded from version 1.47 to 1.52.
770 L<fields> has been upgraded from version 2.23 to 2.24.
774 L<File::Copy> has been upgraded from version 2.32 to 2.33.
776 It will now use L<Time::HiRes> utime where available (perl #132401).
780 L<File::Fetch> has been upgraded from version 0.52 to 0.56.
784 L<File::Glob> has been upgraded from version 1.28 to 1.31.
788 L<File::Path> has been upgraded from version 2.12_01 to 2.15.
792 L<File::Spec> and L<Cwd> have been upgraded from version 3.67 to 3.74.
796 L<File::stat> has been upgraded from version 1.07 to 1.08.
800 L<FileCache> has been upgraded from version 1.09 to 1.10.
804 L<Filter::Simple> has been upgraded from version 0.93 to 0.95.
808 L<Filter::Util::Call> has been upgraded from version 1.55 to 1.58.
812 L<GDBM_File> has been upgraded from version 1.15 to 1.17.
814 Its documentation now explains that C<each> and C<delete> don't mix in
815 hashes tied to this module
816 L<[perl #117449]|https://rt.perl.org/Ticket/Display.html?id=117449>.
818 It will now retry opening with an acceptable block size if asking gdbm
819 to default the block size failed
820 L<[perl #119623]|https://rt.perl.org/Ticket/Display.html?id=119623>.
824 L<Getopt::Long> has been upgraded from version 2.49 to 2.5.
828 L<Hash::Util::FieldHash> has been upgraded from version 1.19 to 1.20.
832 L<I18N::Langinfo> has been upgraded from version 0.13 to 0.17.
834 This module is now available on all platforms, emulating the system
835 L<nl_langinfo(3)> on systems that lack it. Some caveats apply, as
836 L<detailed in its documentation|I18N::Langinfo>, the most severe being
837 that, except for MS Windows, the C<CODESET> item is not implemented on
838 those systems, always returning C<"">.
840 It now sets the UTF-8 flag in its returned scalar if the string contains
841 legal non-ASCII UTF-8, and the locale is UTF-8
842 L<[perl #127288]|https://rt.perl.org/Ticket/Display.html?id=127288>.
844 This update also fixes a bug in which the underlying locale was ignored
845 for the C<RADIXCHAR> (always was returned as a dot) and the C<THOUSEP>
846 (always empty). Now the locale-appropriate values are returned.
850 L<I18N::LangTags> has been upgraded from version 0.42 to 0.43.
854 L<if> has been upgraded from version 0.0606 to 0.0608.
858 L<IO> has been upgraded from version 1.38 to 1.39.
862 L<IO::Socket::IP> has been upgraded from version 0.38 to 0.39.
866 L<IPC::Cmd> has been upgraded from version 0.96 to 1.00.
870 L<JSON::PP> has been upgraded from version 2.27400_02 to 2.97001.
874 libnet has been upgraded from version 3.10 to 3.11.
878 L<List::Util> has been upgraded from version 1.46_02 to 1.49.
882 L<Locale::Codes> has been upgraded from version 3.42 to 3.56.
884 B<NOTE>: L<Locale::Codes> scheduled to be removed from core in Perl 5.30.
888 L<Locale::Maketext> has been upgraded from version 1.28 to 1.29.
892 L<Math::BigInt> has been upgraded from version 1.999806 to 1.999811.
896 L<Math::BigInt::FastCalc> has been upgraded from version 0.5005 to 0.5006.
900 L<Math::BigRat> has been upgraded from version 0.2611 to 0.2613.
904 L<Module::CoreList> has been upgraded from version 5.20170530 to 5.20180521.
908 L<mro> has been upgraded from version 1.20 to 1.22.
912 L<Net::Ping> has been upgraded from version 2.55 to 2.62.
916 L<NEXT> has been upgraded from version 0.67 to 0.67_01.
920 L<ODBM_File> has been upgraded from version 1.14 to 1.15.
924 L<Opcode> has been upgraded from version 1.39 to 1.43.
928 L<overload> has been upgraded from version 1.28 to 1.30.
932 L<PerlIO::encoding> has been upgraded from version 0.25 to 0.26.
936 L<PerlIO::scalar> has been upgraded from version 0.26 to 0.29.
940 L<PerlIO::via> has been upgraded from version 0.16 to 0.17.
944 L<Pod::Functions> has been upgraded from version 1.11 to 1.13.
948 L<Pod::Html> has been upgraded from version 1.2202 to 1.24.
950 A title for the HTML document will now be automatically generated by
951 default from a "NAME" section in the POD document, as it used to be
952 before the module was rewritten to use L<Pod::Simple::XHTML> to do the
954 L<[perl #110520]|https://rt.perl.org/Ticket/Display.html?id=110520>.
958 L<Pod::Perldoc> has been upgraded from version 3.28 to 3.2801.
962 podlators has been upgraded from version 4.09 to 4.10.
964 Man page references and function names now follow the Linux man page
965 formatting standards, instead of the Solaris standard.
969 L<POSIX> has been upgraded from version 1.76 to 1.84.
971 Some more cautions were added about using locale-specific functions in
972 threaded applications.
976 L<re> has been upgraded from version 0.34 to 0.36.
980 L<Scalar::Util> has been upgraded from version 1.46_02 to 1.50.
984 L<SelfLoader> has been upgraded from version 1.23 to 1.25.
988 L<Socket> has been upgraded from version 2.020_03 to 2.027.
992 L<sort> has been upgraded from version 2.02 to 2.04.
996 L<Storable> has been upgraded from version 2.62 to 3.08.
1000 L<Sub::Util> has been upgraded from version 1.48 to 1.49.
1004 L<subs> has been upgraded from version 1.02 to 1.03.
1008 L<Sys::Hostname> has been upgraded from version 1.20 to 1.22.
1012 L<Term::ReadLine> has been upgraded from version 1.16 to 1.17.
1016 L<Test> has been upgraded from version 1.30 to 1.31.
1020 L<Test::Harness> has been upgraded from version 3.38 to 3.42.
1024 L<Test::Simple> has been upgraded from version 1.302073 to 1.302133.
1028 L<threads> has been upgraded from version 2.15 to 2.22.
1030 The documentation now better describes the problems that arise when
1031 returning values from threads, and no longer warns about creating threads
1033 L<[perl #96538]|https://rt.perl.org/Ticket/Display.html?id=96538>
1037 L<threads::shared> has been upgraded from version 1.56 to 1.58.
1041 L<Tie::Array> has been upgraded from version 1.06 to 1.07.
1045 L<Tie::StdHandle> has been upgraded from version 4.4 to 4.5.
1049 L<Time::gmtime> has been upgraded from version 1.03 to 1.04.
1053 L<Time::HiRes> has been upgraded from version 1.9741 to 1.9759.
1057 L<Time::localtime> has been upgraded from version 1.02 to 1.03.
1061 L<Time::Piece> has been upgraded from version 1.31 to 1.3204.
1065 L<Unicode::Collate> has been upgraded from version 1.19 to 1.25.
1069 L<Unicode::Normalize> has been upgraded from version 1.25 to 1.26.
1073 L<Unicode::UCD> has been upgraded from version 0.68 to 0.70.
1075 The function C<num> now accepts an optional parameter to help in
1076 diagnosing error returns.
1080 L<User::grent> has been upgraded from version 1.01 to 1.02.
1084 L<User::pwent> has been upgraded from version 1.00 to 1.01.
1088 L<utf8> has been upgraded from version 1.19 to 1.21.
1092 L<vars> has been upgraded from version 1.03 to 1.04.
1096 L<version> has been upgraded from version 0.9917 to 0.9923.
1100 L<VMS::DCLsym> has been upgraded from version 1.08 to 1.09.
1104 L<VMS::Stdio> has been upgraded from version 2.41 to 2.44.
1108 L<warnings> has been upgraded from version 1.37 to 1.42.
1110 It now includes new functions with names ending in C<_at_level>, allowing
1111 callers to specify the exact call frame.
1112 L<[perl #132468]|https://rt.perl.org/Ticket/Display.html?id=132468>
1116 L<XS::Typemap> has been upgraded from version 0.15 to 0.16.
1120 L<XSLoader> has been upgraded from version 0.27 to 0.30.
1122 Its documentation now shows the use of C<__PACKAGE__>, and direct object
1123 syntax for example C<DynaLoader> usage
1124 L<[perl #132247]|https://rt.perl.org/Ticket/Display.html?id=132247>.
1126 Platforms that use C<mod2fname> to edit the names of loadable
1127 libraries now look for bootstrap (.bs) files under the correct,
1132 =head2 Removed Modules and Pragmata
1138 The C<VMS::stdio> compatibility shim has been removed.
1142 =head1 Documentation
1144 =head2 Changes to Existing Documentation
1146 We have attempted to update the documentation to reflect the changes
1147 listed in this document. If you find any we have missed, send email
1148 to L<perlbug@perl.org|mailto:perlbug@perl.org>.
1150 Additionally, the following selected changes have been made:
1158 The API functions C<perl_parse()>, C<perl_run()>, and C<perl_destruct()>
1159 are now documented comprehensively, where previously the only
1160 documentation was a reference to the L<perlembed> tutorial.
1164 The documentation of C<newGIVENOP()> has been belatedly updated to
1165 account for the removal of lexical C<$_>.
1169 The API functions C<newCONSTSUB()> and C<newCONSTSUB_flags()> are
1170 documented much more comprehensively than before.
1180 The section "Truth and Falsehood" in L<perlsyn> has been moved into
1185 =head3 L<perldebguts>
1191 The description of the conditions under which C<DB::sub()> will be called
1193 L<[perl #131672]|https://rt.perl.org/Ticket/Display.html?id=131672>
1201 =item * L<perldiag/Variable length lookbehind not implemented in regex m/%s/>
1203 This now gives more ideas as to workarounds to the issue that was
1204 introduced in Perl 5.18 (but not documented explicitly in its perldelta)
1205 for the fact that some Unicode C</i> rules cause a few sequences such as
1209 to be considered variable length, and hence disallowed.
1211 =item * "Use of state $_ is experimental" in L<perldiag>
1213 This entry has been removed, as the experimental support of this construct was
1214 removed in perl 5.24.0.
1218 The diagnostic C<Initialization of state variables in list context
1219 currently forbidden> has changed to C<Initialization of state variables
1220 in list currently forbidden>, because list-context initialization of
1221 single aggregate state variables is now permitted.
1231 The examples in L<perlembed> have been made more portable in the way
1232 they exit, and the example that gets an exit code from the embedded Perl
1233 interpreter now gets it from the right place. The examples that pass
1234 a constructed argv to Perl now show the mandatory null C<argv[argc]>.
1238 An example in L<perlembed> used the string value of C<ERRSV> as a
1239 format string when calling croak(). If that string contains format
1240 codes such as C<%s> this could crash the program.
1242 This has been changed to a call to croak_sv().
1244 An alternative could have been to supply a trivial format string:
1246 croak("%s", SvPV_nolen(ERRSV));
1248 or as a special case for C<ERRSV> simply:
1260 There is now a note that warnings generated by built-in functions are
1261 documented in L<perldiag> and L<warnings>.
1262 L<[perl #116080]|https://rt.perl.org/Ticket/Display.html?id=116080>
1266 The documentation for the C<exists> operator no longer says that
1267 autovivification behaviour "may be fixed in a future release".
1268 We've determined that we're not going to change the default behaviour.
1269 L<[perl #127712]|https://rt.perl.org/Ticket/Display.html?id=127712>
1273 A couple of small details in the documentation for the C<bless> operator
1274 have been clarified.
1275 L<[perl #124428]|https://rt.perl.org/Ticket/Display.html?id=124428>
1279 The description of C<@INC> hooks in the documentation for C<require>
1280 has been corrected to say that filter subroutines receive a useless
1282 L<[perl #115754]|https://rt.perl.org/Ticket/Display.html?id=115754>
1286 The documentation of C<ref> has been rewritten for clarity.
1290 The documentation of C<use> now explains what syntactically qualifies
1291 as a version number for its module version checking feature.
1295 The documentation of C<warn> has been updated to reflect that since Perl
1296 5.14 it has treated complex exception objects in a manner equivalent
1298 L<[perl #121372]|https://rt.perl.org/Ticket/Display.html?id=121372>
1302 The documentation of C<die> and C<warn> has been revised for clarity.
1306 Improve the documentation of C<each> with a slightly more
1307 explicit description of the sharing of iterator state, and with
1308 caveats regarding the fragility of while-each loops.
1309 L<[perl #132644]|https://rt.perl.org/Ticket/Display.html?id=132644>
1313 Clarification to require was added to show that
1315 require "Foo/Bar.pm";
1319 eval "require Foo::Bar";
1329 The precise rules for identifying C<smoke-me> branches are now stated.
1339 The section on reference counting in L<perlguts> has been heavily revised,
1340 to describe references in the way a programmer needs to think about them
1341 rather than in terms of the physical data structures.
1345 Improve documentation related to UTF-8 multibytes.
1349 =head3 L<perlintern>
1355 The internal functions C<newXS_len_flags()> and C<newATTRSUB_x()> are
1366 The documentation about C<DESTROY> methods has been corrected, updated,
1367 and revised, especially in regard to how they interact with exceptions.
1368 L<[perl #122753]|https://rt.perl.org/Ticket/Display.html?id=122753>
1378 The description of the C<x> operator in L<perlop> has been clarified.
1379 L<[perl #132460]|https://rt.perl.org/Ticket/Display.html?id=132460>
1383 L<perlop> has been updated to note that C<qw>'s whitespace rules differ from that of
1384 C<split>'s in that only ASCII whitespace is used.
1388 The general explanation of operator precedence and associativity has
1389 been corrected and clarified.
1390 L<[perl #127391]|https://rt.perl.org/Ticket/Display.html?id=127391>
1394 The documentation for the C<\> referencing operator now explains the
1395 unusual context that it supplies to its operand.
1396 L<[perl #131061]|https://rt.perl.org/Ticket/Display.html?id=131061>
1400 =head3 L<perlrequick>
1406 Clarifications on metacharacters and character classes
1416 Clarify metacharacters.
1426 Clarify the documentation of B<< -m >>.
1427 L<[perl #131518]|https://rt.perl.org/Ticket/Display.html?id=131518>
1437 The documentation about set-id scripts has been updated and revised.
1438 L<[perl #74142]|https://rt.perl.org/Ticket/Display.html?id=74142>
1442 A section about using C<sudo> to run Perl scripts has been added.
1452 The section "Truth and Falsehood" in L<perlsyn> has been removed from
1453 that document, where it didn't belong, and merged into the existing
1454 paragraph on the same topic in L<perldata>.
1458 The means to disambiguate between code blocks and hash constructors,
1459 already documented in L<perlref>, are now documented in L<perlsyn> too.
1460 L<[perl #130958]|https://rt.perl.org/Ticket/Display.html?id=130958>
1464 =head3 L<perluniprops>
1470 L<perluniprops> has been updated to note that C<\p{Word}> now includes
1471 code points matching the C<\p{Join_Control}> property. The change to
1472 the property was made in Perl 5.18, but not documented until now. There
1473 are currently only two code points that match this property U+200C (ZERO
1474 WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER).
1478 For each binary table or property, the documentation now includes which
1479 characters in the range C<\x00-\xFF> it matches, as well as a list of
1480 the first few ranges of code points matched above that.
1490 The entry for C<$+> in perlvar has been expanded upon to describe handling of
1491 multiply-named capturing groups.
1495 =head3 L<perlfunc>, L<perlop>, L<perlsyn>
1501 Improve the documentation of while condition magic in various places.
1502 L<[perl #132644]|https://rt.perl.org/Ticket/Display.html?id=132644>
1508 The following additions or changes have been made to diagnostic output,
1509 including warnings and fatal error messages. For the complete list of
1510 diagnostic messages, see L<perldiag>.
1512 =head2 New Diagnostics
1520 L<Can't "goto" into a "given" block|perldiag/"Can't E<quot>gotoE<quot> into a E<quot>givenE<quot> block">
1522 (F) A "goto" statement was executed to jump into the middle of a C<given>
1523 block. You can't get there from here. See L<perlfunc/goto>.
1527 L<Can't "goto" into a binary or list expression|perldiag/"Can't E<quot>gotoE<quot> into a binary or list expression">
1529 Use of C<goto> to jump into the parameter of a binary or list operator has
1530 been prohibited, to prevent crashes and stack corruption.
1531 L<[perl #130936]|https://rt.perl.org/Ticket/Display.html?id=130936>
1533 You may only enter the I<first> argument of an operator that takes a fixed
1534 number of arguments, since this is a case that will not cause stack
1536 L<[perl #132854]|https://rt.perl.org/Ticket/Display.html?id=132854>
1546 L<Old package separator used in string|perldiag/"Old package separator used in string">
1548 (W syntax) You used the old package separator, "'", in a variable
1549 named inside a double-quoted string; e.g., C<"In $name's house">. This
1550 is equivalent to C<"In $name::s house">. If you meant the former, put
1551 a backslash before the apostrophe (C<"In $name\'s house">).
1555 L<perldiag/Locale '%s' contains (at least) the following characters which
1556 have unexpected meanings: %s The Perl program will use the expected
1561 =head2 Changes to Existing Diagnostics
1567 A false-positive warning that was issued when using a
1568 numerically-quantified sub-pattern in a recursive regex has been
1569 silenced. L<[perl #131868]|https://rt.perl.org/Public/Bug/Display.html?id=131868>
1573 The warning about useless use of a concatenation operator in void context
1574 is now generated for expressions with multiple concatenations, such as
1575 C<$a.$b.$c>, which used to mistakenly not warn.
1576 L<[perl #6997]|https://rt.perl.org/Ticket/Display.html?id=6997>
1580 Warnings that a variable or subroutine "masks earlier declaration in same
1581 ...", or that an C<our> variable has been redeclared, have been moved to a
1582 new warnings category "shadow". Previously they were in category "misc".
1586 The deprecation warning from C<Sys::Hostname::hostname()> saying that
1587 it doesn't accept arguments now states the Perl version in which the
1588 warning will be upgraded to an error.
1589 L<[perl #124349]|https://rt.perl.org/Ticket/Display.html?id=124349>
1593 The L<perldiag> entry for the error regarding a set-id script has been
1594 expanded to make clear that the error is reporting a specific security
1595 vulnerability, and to advise how to fix it.
1599 The C<< Unable to flush stdout >> error message was missing a trailing
1600 newline. [debian #875361]
1604 =head1 Utility Changes
1612 C<--help> and C<--version> options have been added.
1616 =head1 Configuration and Compilation
1620 =item * C89 requirement
1622 Perl has been documented as requiring a C89 compiler to build since October
1623 1998. A variety of simplifications have now been made to Perl's internals to
1624 rely on the features specified by the C89 standard. We believe that this
1625 internal change hasn't altered the set of platforms that Perl builds on, but
1626 please report a bug if Perl now has new problems building on your platform.
1630 On GCC, C<-Werror=pointer-arith> is now enabled by default,
1631 disallowing arithmetic on void and function pointers.
1635 Where an HTML version of the doucmentation is installed, the HTML
1636 documents now use relative links to refer to each other. Links from
1637 the index page of L<perlipc> to the individual section documents are
1639 L<[perl #110056]|https://rt.perl.org/Ticket/Display.html?id=110056>
1643 F<lib/unicore/mktables> now correctly canonicalizes the names of the
1644 dependencies stored in the files it generates.
1646 F<regen/mk_invlists.pl>, unlike the other F<regen/*.pl> scripts, used
1647 C<$0> to name itself in the dependencies stored in the files it
1648 generates. It now uses a literal so that the path stored in the
1649 generated files doesn't depend on how F<regen/mk_invlists.pl> is
1652 This lack of canonical names could cause test failures in F<t/porting/regen.t>.
1653 L<[perl #132925]|https://rt.perl.org/Ticket/Display.html?id=132925>
1659 =item HAS_BUILTIN_ADD_OVERFLOW
1661 =item HAS_BUILTIN_MUL_OVERFLOW
1663 =item HAS_BUILTIN_SUB_OVERFLOW
1665 =item HAS_THREAD_SAFE_NL_LANGINFO_L
1667 =item HAS_LOCALECONV_L
1693 Testing of the XS-APItest directory is now done in parallel, where
1698 Perl now includes a default F<.travis.yml> file for Travis CI testing
1700 L<[perl #123981]|https://rt.perl.org/Ticket/Display.html?id=123981>
1704 Allow override of watchdog timer count in F<re/pat_psycho.t>.
1706 This test can take a long time to run, so there is a timer to keep
1707 this in check (currently, 5 minutes). This commit adds checking
1708 the environment variable C<< PERL_TEST_TIME_OUT_FACTOR >>; if set,
1709 the time out setting is multiplied by its value.
1713 F<harness> no longer waits for 30 seconds when running F<t/io/openpid.t>.
1714 L<[perl #121028]|https://rt.perl.org/Ticket/Display.html?id=121028>
1715 L<[perl #132867]|https://rt.perl.org/Ticket/Display.html?id=132867>
1721 For the past few years we have released perl using three different archive
1722 formats: bzip (C<.bz2>), LZMA2 (C<.xz>) and gzip (C<.gz>). Since xz compresses
1723 better and decompresses faster, and gzip is more compatible and uses less memory,
1724 we have dropped the C<.bz2> archive format with this release.
1725 (If this poses a problem, do let us know; see L</Reporting Bugs>, below.)
1727 =head1 Platform Support
1729 =head2 Discontinued Platforms
1733 =item PowerUX / Power MAX OS
1735 Compiler hints and other support for these apparently long-defunct platforms has been removed.
1739 =head2 Platform-Specific Notes
1745 Compilation on CentOS 5 is now fixed.
1749 A build with the quadmath library can now be done on Cygwin.
1753 Perl now correctly uses reentrant functions, like C<asctime_r>, on
1754 versions of Darwin that have support for them.
1758 FreeBSD's F<< /usr/share/mk/sys.mk >> specifies C<< -O2 >> for
1759 architectures other than arm and mips. By default, compile perl
1760 with the same optimization levels.
1764 Several fix-ups for F<configure.com>, marking function VMS has
1767 CRTL features can now be set by embedders before invoking Perl by using the
1768 C<decc$feature_set> and C<decc$feature_set_value> functions. Previously any attempt
1769 to set features after image initialization were ignored.
1777 Support for compiling perl on Windows using Microsoft Visual Studio 2017
1778 (containing Visual C++ 14.1) has been added.
1782 Visual C++ compiler version detection has been improved to work on non-English
1787 We now set C<$Config{libpth}> correctly for 64-bit builds using Visual C++
1788 versions earlier than 14.1.
1794 =head1 Internal Changes
1800 A new optimisation phase has been added to the compiler,
1801 C<optimize_optree()>, which does a top-down scan of a complete optree
1802 just before the peephole optimiser is run. This phase is not currently
1807 An C<OP_MULTICONCAT> op has been added. At C<optimize_optree()> time, a
1808 chain of C<OP_CONCAT> and C<OP_CONST> ops, together optionally with an
1809 C<OP_STRINGIFY> and/or C<OP_SASSIGN>, are combined into a single
1810 C<OP_MULTICONCAT> op. The op is of type C<UNOP_AUX>, and the aux array
1811 contains the argument count, plus a pointer to a constant string and a set
1812 of segment lengths. For example with
1814 my $x = "foo=$foo, bar=$bar\n";
1816 the constant string would be C<"foo=, bar=\n"> and the segment lengths
1817 would be (4,6,1). If the string contains characters such as C<\x80>, whose
1818 representation changes under utf8, two sets of strings plus lengths are
1819 precomputed and stored.
1823 Direct access to L<C<PL_keyword_plugin>|perlapi/PL_keyword_plugin> is not
1824 safe in the presence of multithreading. A new
1825 L<C<wrap_keyword_plugin>|perlapi/wrap_keyword_plugin> function has been
1826 added to allow XS modules to safely define custom keywords even when
1827 loaded from a thread, analogous to L<C<PL_check>|perlapi/PL_check> /
1828 L<C<wrap_op_checker>|perlapi/wrap_op_checker>.
1832 The C<PL_statbuf> interpreter variable has been removed.
1836 The deprecated function C<to_utf8_case()>, accessible from XS code, has
1842 L<C<is_utf8_invariant_string_loc()>|perlapi/is_utf8_invariant_string_loc>
1843 has been added that is like
1844 L<C<is_utf8_invariant_string()>|perlapi/is_utf8_invariant_string>
1845 but takes an extra pointer parameter into which is stored the location
1846 of the first variant character, if any are found.
1850 A new function, L<C<Perl_langinfo()>|perlapi/Perl_langinfo> has been
1851 added. It is an (almost) drop-in replacement for the system
1852 C<nl_langinfo(3)>, but works on platforms that lack that; as well as
1853 being more thread-safe, and hiding some gotchas with locale handling
1854 from the caller. Code that uses this, needn't use L<C<localeconv(3)>>
1855 (and be affected by the gotchas) to find the decimal point, thousands
1856 separator, or currency symbol. See L<perlapi/Perl_langinfo>.
1860 A new API function L<C<sv_rvunweaken()>|perlapi/sv_rvunweaken> has
1861 been added to complement L<C<sv_rvweaken()>|perlapi/sv_rvweaken>.
1862 The implementation was taken from L<Scalar::Util/unweaken>.
1866 A new flag, C<SORTf_UNSTABLE>, has been added. This will allow a
1867 future commit to make mergesort unstable when the user specifies ‘no
1868 sort stable’, since it has been decided that mergesort should remain
1873 XS modules can now automatically get reentrant versions of system
1874 functions on threaded perls.
1878 #define PERL_REENTRANT
1880 near the beginning of an C<XS> file, it will be compiled so that
1881 whatever reentrant functions perl knows about on that system will
1882 automatically and invisibly be used instead of the plain, non-reentrant
1883 versions. For example, if you write C<getpwnam()> in your code, on a
1884 system that has C<getpwnam_r()> all calls to the former will be translated
1885 invisibly into the latter. This does not happen except on threaded
1886 perls, as they aren't needed otherwise. Be aware that which functions
1887 have reentrant versions varies from system to system.
1891 The C<PERL_NO_OP_PARENT> build define is no longer supported, which means
1892 that perl is now always built with C<PERL_OP_PARENT> enabled.
1896 The format of the non-utf8 transliteration table attached to the C<op_pv>
1897 field of C<OP_TRANS>/C<OP_TRANSR> ops has changed. It's now a
1898 C<struct OPtrans_map>.
1902 A new compiler C<#define>, C<dTHX_DEBUGGING>. has been added. This is
1903 useful for XS or C code that only need the thread context because their
1904 debugging statements that get compiled only under C<-DDEBUGGING> need
1909 A new API function L<perlapi/Perl_setlocale> has been added.
1913 L<perlapi/sync_locale> has been revised to return a boolean as to
1914 whether the system was using the global locale or not.
1918 A new kind of magic scalar, called a "nonelem" scalar, has been introduced.
1919 It is stored in an array to denote a nonexistent element, whenever such an
1920 element is accessed in a potential lvalue context. It replaces the
1921 existing "defelem" (deferred element) magic wherever this is possible,
1922 being significantly more efficient. This means that
1923 C<some_sub($sparse_array[$nonelem])> no longer has to create a new magic
1924 defelem scalar each time, as long as the element is within the array.
1926 It partially fixes the rare bug of deferred elements getting out of synch
1927 with their arrays when the array is shifted or unshifted.
1928 L<[perl #132729]|https://rt.perl.org/Ticket/Display.html?id=132729>
1932 =head1 Selected Bug Fixes
1938 List assignment (C<aassign>) could in some rare cases allocate an
1939 entry on the mortal stack and leave the entry uninitialized. [perl
1944 Attempting to apply an attribute to an C<our> variable where a
1945 function of that name already exists could result in a NULL pointer
1946 being supplied where an SV was expected, crashing perl. [perl
1951 C<split ' '> now correctly handles the argument being split when in the
1952 scope of the L<< C<unicode_strings>|feature/"The 'unicode_strings' feature"
1953 >> feature. Previously, when a string using the single-byte internal
1954 representation contained characters that are whitespace by Unicode rules but
1955 not by ASCII rules, it treated those characters as part of fields rather
1956 than as field separators.
1957 L<[perl #130907]|https://rt.perl.org/Ticket/Display.html?id=130907>
1961 Several built-in functions previously had bugs that could cause them to
1962 write to the internal stack without allocating room for the item being
1963 written. In rare situations, this could have led to a crash. These bugs have
1964 now been fixed, and if any similar bugs are introduced in future, they will
1965 be detected automatically in debugging builds.
1967 These internal stack usage checks introduced are also done
1968 by the C<entersub> operator when calling XSUBs. This means we can
1969 report which XSUB failed to allocate enough stack space.
1970 L<[perl #131975]|https://rt.perl.org/Public/Bug/Display.html?id=131975>
1974 Using a symbolic ref with postderef syntax as the key in a hash lookup was
1975 yielding an assertion failure on debugging builds.
1976 L<[perl #131627]|https://rt.perl.org/Ticket/Display.html?id=131627>
1980 Array and hash variables whose names begin with a caret now admit indexing
1981 inside their curlies when interpolated into strings, as in C<<
1982 "${^CAPTURE[0]}" >> to index C<@{^CAPTURE}>.
1983 L<[perl #131664]|https://rt.perl.org/Ticket/Display.html?id=131664>
1987 Fetching the name of a glob that was previously UTF-8 but wasn't any
1988 longer would return that name flagged as UTF-8.
1989 L<[perl #131263]|https://rt.perl.org/Ticket/Display.html?id=131263>
1993 The perl C<sprintf()> function (via the underlying C function
1994 C<Perl_sv_vcatpvfn_flags()>) has been heavily reworked to fix many minor
1995 bugs, including the integer wrapping of large width and precision
1996 specifiers and potential buffer overruns. It has also been made faster in
2001 Exiting from an C<eval>, whether normally or via an exception, now always
2002 frees temporary values (possibly calling destructors) I<before> setting
2005 sub DESTROY { eval { die "died in DESTROY"; } }
2007 # $@ used to be equal to "died in DESTROY" here; it's now "".
2011 Fixed a duplicate symbol failure with C<-flto -mieee-fp> builds.
2012 F<pp.c> defined C<_LIB_VERSION> which C<-lieee> already defines. [perl
2017 The tokenizer no longer consumes the exponent part of a floating
2018 point number if it's incomplete.
2019 L<[perl #131725]|https://rt.perl.org/Ticket/Display.html?id=131725>
2023 On non-threaded builds, for C<m/$null/> where C<$null> is an empty
2024 string is no longer treated as if the C</o> flag was present when the
2025 previous matching match operator included the C</o> flag. The
2026 rewriting used to implement this behavior could confuse the
2027 interpreter. This matches the behaviour of threaded builds. [perl
2032 Parsing a C<sub> definition could cause a use after free if the C<sub>
2033 keyword was followed by whitespace including newlines (and comments.)
2034 L<[perl #131836]|https://rt.perl.org/Public/Bug/Display.html?id=131836>
2038 The tokenizer now correctly adjusts a parse pointer when skipping
2039 whitespace in a C<< ${identifier} >> construct.
2040 L<[perl #131949]|https://rt.perl.org/Public/Bug/Display.html?id=131949>
2044 Accesses to C<${^LAST_FH}> no longer assert after using any of a
2045 variety of I/O operations on a non-glob.
2046 L<[perl #128263]|https://rt.perl.org/Public/Bug/Display.html?id=128263>
2050 The C<Copy()>, C<Move()>, C<Zero()> macros and their variants now
2051 assert if the pointers supplied are C<NULL>. ISO C considers
2052 supplying NULL pointers to the functions these macros are built upon
2053 as undefined behaviour even when their count parameters are zero.
2054 Based on these assertions and the original bug report three macro
2055 calls were made conditional.
2056 L<[perl #131746]|https://rt.perl.org/Public/Bug/Display.html?id=131746>
2057 L<[perl #131892]|https://rt.perl.org/Public/Bug/Display.html?id=131892>
2061 Only the C<=> operator is permitted for defining defaults for
2062 parameters in subroutine signatures. Previously other assignment
2063 operators, e.g. C<+=>, were also accidentally permitted.
2064 L<[perl #131777]|https://rt.perl.org/Public/Bug/Display.html?id=131777>
2068 Package names are now always included in C<:prototype> warnings
2069 L<[perl #131833]|https://rt.perl.org/Public/Bug/Display.html?id=131833>
2073 Creating a thread with no parameters no longer tries to C<Copy()> a
2074 null pointer. This fixes an assertion failure and allows threaded
2075 builds to work again.
2079 The C<je_old_stack_hwm> field, previously only found in the C<jmpenv>
2080 structure on debugging builds, has been added to non-debug builds as
2081 well. This fixes an issue with some CPAN modules caused by the size of
2082 this structure varying between debugging and non-debugging builds.
2083 L<[perl #131942]|https://rt.perl.org/Public/Bug/Display.html?id=131942>
2087 The arguments to the C<ninstr()> macro are now correctly parenthesized.
2091 A NULL pointer dereference in the C<S_regmatch()> function has been
2093 L<[perl #132017]|https://rt.perl.org/Public/Bug/Display.html?id=132017>
2097 Calling L<exec PROGRAM LIST|perlfunc/exec PROGRAM LIST> with an empty C<LIST>
2098 has been fixed. This should call C<execvp()> with an empty C<argv> array
2099 (containing only the terminating C<NULL> pointer), but was instead just
2100 returning false (and not setting L<C<$!>|perlvar/$!>).
2101 L<[perl #131730]|https://rt.perl.org/Public/Bug/Display.html?id=131730>
2105 The C<gv_fetchmeth_sv> C function stopped working properly in Perl 5.22 when
2106 fetching a constant with a UTF-8 name if that constant subroutine was stored in
2107 the stash as a simple scalar reference, rather than a full typeglob. This has
2112 Single-letter debugger commands followed by an argument which starts with
2113 punctuation (e.g. C<p$^V> and C<x@ARGV>) now work again. They had been
2114 wrongly requiring a space between the command and the argument.
2115 L<[perl #120174]|https://rt.perl.org/Public/Bug/Display.html?id=120174>
2119 L<splice|perlfunc/splice ARRAY,OFFSET,LENGTH,LIST> now throws an exception
2120 ("Modification of a read-only value attempted") when modifying a read-only
2121 array. Until now it had been silently modifying the array. The new behaviour
2122 is consistent with the behaviour of L<push|perlfunc/push ARRAY,LIST> and
2123 L<unshift|perlfunc/unshift ARRAY,LIST>.
2124 L<[perl #131000]|https://rt.perl.org/Public/Bug/Display.html?id=131000>
2128 C<stat()>, C<lstat()>, and file test operators now fail if given a
2129 filename containing a nul character, in the same way that C<open()>
2134 C<stat()>, C<lstat()>, and file test operators now reliably set C<$!> when
2135 failing due to being applied to a closed or otherwise invalid file handle.
2139 File test operators for Unix permission bits that don't exist on a
2140 particular platform, such as C<-k> (sticky bit) on Windows, now check that
2141 the file being tested exists before returning the blanket false result,
2142 and yield the appropriate errors if the argument doesn't refer to a file.
2146 The in-place reverse optimisation now correctly strengthens weak
2147 references using the L<C<sv_rvunweaken()>|perlapi/sv_rvunweaken>
2152 Fixed a read before buffer when parsing a range starting with C<\N{}>
2153 at the beginning of the character set for the transliteration
2155 L<[perl #132245]|https://rt.perl.org/Ticket/Display.html?id=132245>
2159 Fixed a leaked SV when parsing an empty C<\N{}> at compile-time.
2160 L<[perl #132245]|https://rt.perl.org/Ticket/Display.html?id=132245>
2164 Calling C<do $path> on a directory or block device now yields a meaningful
2165 error code in C<$!>.
2166 L<[perl #125774]|https://rt.perl.org/Ticket/Display.html?id=125774>
2170 Regexp substitution using an overloaded replacement value that provides
2171 a tainted stringification now correctly taints the resulting string.
2172 L<[perl #115266]|https://rt.perl.org/Ticket/Display.html?id=115266>
2176 Lexical sub declarations in C<do> blocks such as C<do { my sub lex; 123 }>
2177 could corrupt the stack, erasing items already on the stack in the
2178 enclosing statement. This has been fixed.
2179 L<[perl #132442]|https://rt.perl.org/Ticket/Display.html?id=132442>
2183 C<pack> and C<unpack> can now handle repeat counts and lengths that
2185 L<[perl #119367]|https://rt.perl.org/Ticket/Display.html?id=119367>
2189 Digits past the radix point in octal and binary floating point literals
2190 now have the correct weight on platforms where a floating point
2191 significand doesn't fit into an integer type.
2195 The canonical truth value no longer has a spurious special meaning as
2196 a callable. It used to be a magic placeholder for a missing C<import>
2197 or C<unimport> method. It is now treated like any other string C<1>.
2198 L<[perl #126042]|https://rt.perl.org/Ticket/Display.html?id=126042>
2202 C<system> now reduces its arguments to strings in the parent process, so
2203 any effects of stringifying them (such as overload methods being called
2204 or warnings being emitted) are visible in the way the program expects.
2205 L<[perl #121105]|https://rt.perl.org/Ticket/Display.html?id=121105>
2209 The C<readpipe()> built-in function now checks at compile time that
2210 it has only one parameter expression, and puts it in scalar context,
2211 thus ensuring that it doesn't corrupt the stack at runtime.
2212 L<[perl #4574]|https://rt.perl.org/Ticket/Display.html?id=4574>
2216 C<sort> now performs correct reference counting when aliasing C<$a> and
2217 C<$b>, thus avoiding premature destruction and leakage of scalars if they
2218 are re-aliased during execution of the sort comparator.
2219 L<[perl #92264]|https://rt.perl.org/Ticket/Display.html?id=92264>
2223 C<reverse> with no operand, reversing C<$_> by default, is no longer in
2224 danger of corrupting the stack.
2225 L<[perl #132544]|https://rt.perl.org/Ticket/Display.html?id=132544>
2229 C<exec>, C<system>, et al are no longer liable to have their argument
2230 lists corrupted by reentrant calls and by magic such as tied scalars.
2231 L<[perl #129888]|https://rt.perl.org/Ticket/Display.html?id=129888>
2235 Perl's own C<malloc> no longer gets confused by attempts to allocate
2236 more than a gigabyte on a 64-bit platform.
2237 L<[perl #119829]|https://rt.perl.org/Ticket/Display.html?id=119829>
2241 Stacked file test operators in a sort comparator expression no longer
2243 L<[perl #129347]|https://rt.perl.org/Ticket/Display.html?id=129347>
2247 An identity C<tr///> transformation on a reference is no longer mistaken
2248 for that reference for the purposes of deciding whether it can be
2250 L<[perl #130578]|https://rt.perl.org/Ticket/Display.html?id=130578>
2254 Lengthy hexadecimal, octal, or binary floating point literals no
2255 longer cause undefined behaviour when parsing digits that are of such
2256 low significance that they can't affect the floating point value.
2257 L<[perl #131894]|https://rt.perl.org/Ticket/Display.html?id=131894>
2261 C<open $$scalarref...> and similar invocations no longer leak the file
2263 L<[perl #115814]|https://rt.perl.org/Ticket/Display.html?id=115814>
2267 Some convoluted kinds of regexp no longer cause an arithmetic overflow
2269 L<[perl #131893]|https://rt.perl.org/Ticket/Display.html?id=131893>
2273 The default typemap, by avoiding C<newGVgen>, now no longer leaks when
2274 XSUBs return file handles (C<PerlIO *> or C<FILE *>).
2275 L<[perl #115814]|https://rt.perl.org/Ticket/Display.html?id=115814>
2279 Creating a C<BEGIN> block as an XS subroutine with a prototype no longer
2280 crashes because of the early freeing of the subroutine.
2284 The C<printf> format specifier C<%.0f> no longer rounds incorrectly
2285 L<[perl #47602]|https://rt.perl.org/Ticket/Display.html?id=47602>,
2286 and now shows the correct sign for a negative zero.
2290 Fixed an issue where the error C<< Scalar value @arrayname[0] better
2291 written as $arrayname >> would give an error C<< Cannot printf Inf with 'c' >>
2292 when arrayname starts with C<< Inf >>.
2293 L<[perl #132645]|https://rt.perl.org/Ticket/Display.html?id=132645>
2297 The Perl implementation of C<< getcwd() >> in C<< Cwd >> in the PathTools
2298 distribution now behaves the same as XS implementation on errors: it
2299 returns an error, and sets C<< $! >>.
2300 L<[perl #132648]|https://rt.perl.org/Ticket/Display.html?id=132648>
2304 Vivify array elements when putting them on the stack.
2305 Fixes L<[perl #8910]|https://rt.perl.org/Ticket/Display.html?id=8910>
2306 (reported in April 2002).
2310 Fixed parsing of braced subscript after parens. Fixes
2311 L<[perl #8045]|https://rt.perl.org/Ticket/Display.html?id=8045>
2312 (reported in December 2001).
2316 C<tr/non_utf8/long_non_utf8/c> could give the wrong results when the
2317 length of the replacement character list was greater than 0x7fff.
2321 C<tr/non_utf8/non_utf8/cd> failed to add the implied
2322 C<\x{100}-\x{7fffffff}> to the search character list.
2326 Failures while compiling code within other constructs, such as with
2327 string interpolation and the right part of C<s///e> now cause
2328 compilation to abort earlier.
2330 Previously compilation could continue in order to report other errors,
2331 but the failed sub-parse could leave partly parsed constructs on the
2332 parser shift-reduce stack, confusing the parser, leading to perl
2334 L<[perl #125351]|https://rt.perl.org/Ticket/Display.html?id=125351>
2338 On threaded perls where the decimal point (radix) character is not a
2339 dot, it has been possible for a race to occur between threads when one
2340 needs to use the real radix character. This has now been fixed by use
2341 of a mutex on systems without thread-safe locales, and the problem just
2342 doesn't come up on those with thread-safe locales.
2346 Regex assertion failure
2347 L<[perl #132163]|https://rt.perl.org/Ticket/Display.html?id=132163>
2351 fix line numbers in multi-line s///
2355 warnings.pm: sprintf is faster than concat
2359 =head1 Acknowledgements
2361 Perl 5.28.0 represents approximately 12 months of development since Perl
2362 5.26.0 and contains approximately 730,000 lines of changes across 2,200
2363 files from 76 authors.
2365 Excluding auto-generated files, documentation and release tools, there were
2366 approximately 580,000 lines of changes to 1,300 .pm, .t, .c and .h files.
2368 Perl continues to flourish into its fourth decade thanks to a vibrant
2369 community of users and developers. The following people are known to have
2370 contributed the improvements that became Perl 5.28.0:
2372 Aaron Crane, Abigail, Ævar Arnfjörð Bjarmason, Alberto Simões, Alexandr
2373 Savca, Andrew Fresh, Andy Dougherty, Andy Lester, Aristotle Pagaltzis, Ask
2374 Bjørn Hansen, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari
2375 Mannsåker, Dan Collins, Daniel Dragan, David Cantrell, David Mitchell,
2376 Dmitry Ulanov, Dominic Hargreaves, E. Choroba, Eric Herman, Eugen Konkov,
2377 Father Chrysostomos, Gene Sullivan, George Hartzell, Graham Knop, Harald
2378 Jörg, H.Merijn Brand, Hugo van der Sanden, Jacques Germishuys, James E
2379 Keenan, Jarkko Hietaniemi, Jerry D. Hedden, J. Nick Koston, John Lightsey,
2380 John Peacock, John P. Linderman, John SJ Anderson, Karen Etheridge, Karl
2381 Williamson, Ken Brown, Ken Cotterill, Leon Timmermans, Lukas Mai, Marco
2382 Fontani, Marc-Philip Werner, Matthew Horsfall, Neil Bowers, Nicholas Clark,
2383 Nicolas R., Niko Tyni, Pali, Paul Marquess, Peter John Acklam, Reini Urban,
2384 Renee Baecker, Ricardo Signes, Robin Barker, Sawyer X, Scott Lanning, Sergey
2385 Aleynikov, Shoichi Kaji, Slaven Rezic, Smylers, Steffen Müller, Steve Hay,
2386 Sullivan Beck, Thomas Sibley, Todd Rinaldo, Tomasz Konojacki, Tom Hukins,
2387 Tom Wyant, Tony Cook, Vitali Peil, Yves Orton, Zefram.
2389 The list above is almost certainly incomplete as it is automatically
2390 generated from version control history. In particular, it does not include
2391 the names of the (very much appreciated) contributors who reported issues to
2392 the Perl bug tracker.
2394 Many of the changes included in this version originated in the CPAN modules
2395 included in Perl's core. We're grateful to the entire CPAN community for
2396 helping Perl to flourish.
2398 For a more complete list of all of Perl's historical contributors, please
2399 see the F<AUTHORS> file in the Perl source distribution.
2401 =head1 Reporting Bugs
2403 If you find what you think is a bug, you might check the perl bug database
2404 at L<https://rt.perl.org/> . There may also be information at
2405 L<http://www.perl.org/> , the Perl Home Page.
2407 If you believe you have an unreported bug, please run the L<perlbug> program
2408 included with your release. Be sure to trim your bug down to a tiny but
2409 sufficient test case. Your bug report, along with the output of C<perl -V>,
2410 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
2412 If the bug you are reporting has security implications which make it
2413 inappropriate to send to a publicly archived mailing list, then see
2414 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
2415 for details of how to report the issue.
2419 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
2420 you can do so by running the C<perlthanks> program:
2424 This will send an email to the Perl 5 Porters list with your show of thanks.
2428 The F<Changes> file for an explanation of how to view exhaustive details on
2431 The F<INSTALL> file for how to build Perl.
2433 The F<README> file for general stuff.
2435 The F<Artistic> and F<Copying> files for copyright information.