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<perl5260delta>, which describes differences between 5.24.0 and 5.26.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 hash slices
24 L<C<delete>|perlfunc/delete EXPR> can now be used on
25 L<keyE<sol>value hash slices|perldata/KeyE<sol>Value Hash Slices>,
26 returning the keys along with the deleted values.
27 L<[perl #131328]|https://rt.perl.org/Ticket/Display.html?id=131328>
29 =head2 Experimentally, there are now alphabetic synonyms for some regular expression assertions
31 If you find it difficult to remember how to write certain of the pattern
32 assertions, there are now alphabetic synonyms.
36 (?=...) (*pla:...) or (*positive_lookahead:...)
37 (?!...) (*nla:...) or (*negative_lookahead:...)
38 (?<=...) (*plb:...) or (*positive_lookbehind:...)
39 (?<!...) (*nlb:...) or (*negative_lookbehind:...)
42 These are considered experimental, so using any of these will raise
43 (unless turned off) a warning in the C<experimental::alpha_assertions>
46 =head2 Mixed Unicode scripts are now detectable
48 A mixture of scripts, such as Cyrillic and Latin, in a string is often
49 the sign of a spoofing attack. A new regular expression construct
50 now allows for easy detection of these. For example, you can say
52 qr/(*script_run: \d+ \b )/x
54 And the digits matched will all be from the same set of 10. You won't
55 get a look-alike digit from a different script that has a different
56 value than what it appears to be.
60 qr/(*sr: \b \w+ \b )/x
62 makes sure that all the characters come from the same script.
64 You can also combine script runs with C<(?E<gt>...)> (or
75 (*atomic_script_run:...)
77 This is considered experimental, so using it will raise (unless turned
78 off) a warning in the C<experimental::script_run> category.
80 See L<perlre/Script Runs>.
82 =head2 In-place editing with C<perl -i> is now safer
84 Previously in-place editing (C<perl -i>) would delete or rename the
85 input file as soon as you started working on a new file.
87 Without backups this would result in loss of data if there was an
88 error, such as a full disk, when writing to the output file.
90 This has changed so that the input file isn't replaced until the
91 output file has been completely written and successfully closed.
93 This works by creating a work file in the same directory, which is
94 renamed over the input file once the output file is complete.
102 Since this renaming needs to only happen once, if you create a thread
103 or child process, that renaming will only happen in the original
108 If you change directories while processing a file, and your operating
109 system doesn't provide the C<unlinkat()>, C<renameat()> and C<fchmodat()>
110 functions, the final rename step may fail.
114 L<[perl #127663]|https://rt.perl.org/Public/Bug/Display.html?id=127663>
116 =head2 Initialisation of aggregate state variables
118 A persistent lexical array or hash variable can now be initialized,
119 by an expression such as C<state @a = qw(x y z)>. Initialization of a
120 list of persistent lexical variables is still not possible.
122 =head2 Full-size inode numbers
124 On platforms where inode numbers are of a type larger than perl's native
125 integer numerical types, L<stat|perlfunc/stat> will preserve the full
126 content of large inode numbers by returning them in the form of strings of
127 decimal digits. Exact comparison of inode numbers can thus be achieved by
128 comparing with C<eq> rather than C<==>. Comparison with C<==>, and other
129 numerical operations (which are usually meaningless on inode numbers),
130 work as well as they did before, which is to say they fall back to
131 floating point, and ultimately operate on a fairly useless rounded inode
132 number if the real inode number is too big for the floating point format.
134 =head2 The C<sprintf> C<%j> format size modifier is now available with pre-C99 compilers
136 The actual size used depends on the platform, so remains unportable.
138 =head2 Close-on-exec flag set atomically
140 When opening a file descriptor, perl now generally opens it with its
141 close-on-exec flag already set, on platforms that support doing so.
142 This improves thread safety, because it means that an C<exec> initiated
143 by one thread can no longer cause a file descriptor in the process
144 of being opened by another thread to be accidentally passed to the
147 Additionally, perl now sets the close-on-exec flag more reliably, whether
148 it does so atomically or not. Most file descriptors were getting the
149 flag set, but some were being missed.
151 =head2 String- and number-specific bitwise ops are no longer experimental
153 The new string-specific (C<&. |. ^. ~.>) and number-specific (C<& | ^ ~>)
154 bitwise operators introduced in Perl 5.22 that are available within the
155 scope of C<use feature 'bitwise'> are no longer experimental.
156 Because the number-specific ops are spelled the same way as the existing
157 operators that choose their behaviour based on their operands, these
158 operators must still be enabled via the "bitwise" feature, in either of
161 use feature "bitwise";
163 use v5.28; # "bitwise" now included
165 They are also now enabled by the B<-E> command-line switch.
167 The "bitwise" feature no longer emits a warning. Existing code that
168 disables the "experimental::bitwise" warning category that the feature
169 previously used will continue to work.
171 One caveat that module authors ought to be aware of is that the numeric
172 operators now pass a fifth TRUE argument to overload methods. Any methods
173 that check the number of operands may croak if they do not expect so many.
174 XS authors in particular should be aware that this:
177 bitop_handler (lobj, robj, swap)
179 may need to be changed to this:
182 bitop_handler (lobj, robj, swap, ...)
184 =head2 Locales are now thread-safe on systems that support them
186 These systems include Windows starting with Visual Studio 2005, and in
189 The implication is that you are now free to use locales and change them
190 in a threaded environment. Your changes affect only your thread.
191 See L<perllocale/Multi-threaded operation>
193 =head2 New read-only predefined variable C<${^SAFE_LOCALES}>
195 This variable is 1 if the Perl interpreter is operating in an
196 environment where it is safe to use and change locales (see
197 L<perllocale>.) This variable is true when the perl is
198 unthreaded, or compiled in a platform that supports thread-safe locale
199 operation (see previous item).
203 =head2 [CVE-2017-12837] Heap buffer overflow in regular expression compiler
205 Compiling certain regular expression patterns with the case-insensitive
206 modifier could cause a heap buffer overflow and crash perl. This has now been
208 L<[perl #131582]|https://rt.perl.org/Public/Bug/Display.html?id=131582>
210 =head2 [CVE-2017-12883] Buffer over-read in regular expression parser
212 For certain types of syntax error in a regular expression pattern, the error
213 message could either contain the contents of a random, possibly large, chunk of
214 memory, or could crash perl. This has now been fixed.
215 L<[perl #131598]|https://rt.perl.org/Public/Bug/Display.html?id=131598>
217 =head2 [CVE-2017-12814] C<$ENV{$key}> stack buffer overflow on Windows
219 A possible stack buffer overflow in the C<%ENV> code on Windows has been fixed
220 by removing the buffer completely since it was superfluous anyway.
221 L<[perl #131665]|https://rt.perl.org/Public/Bug/Display.html?id=131665>
223 =head2 Default Hash Function Change
225 Perl 5.28.0 retires various older hash functions which are not viewed as
226 sufficiently secure for use in Perl. We now support four general purpose
227 hash functions, Siphash (2-4 and 1-3 variants), and Zaphod32, and StadtX
228 hash. In addition we support SBOX32 (a form of tabular hashing) for hashing
229 short strings, in conjunction with any of the other hash functions provided.
231 By default Perl is configured to support SBOX hashing of strings up to 24
232 characters, in conjunction with StadtX hashing on 64 bit builds, and
233 Zaphod32 hashing for 32 bit builds.
235 You may control these settings with the following options to Configure:
237 -DPERL_HASH_FUNC_SIPHASH
238 -DPERL_HASH_FUNC_SIPHASH13
239 -DPERL_HASH_FUNC_STADTX
240 -DPERL_HASH_FUNC_ZAPHOD32
242 To disable SBOX hashing you can use
244 -DPERL_HASH_USE_SBOX32_ALSO=0
246 And to set the maximum length to use SBOX32 hashing on with:
250 The maximum length allowed is 256. There probably isn't much point
251 in setting it higher than the default.
253 =head1 Incompatible Changes
255 =head2 Subroutine attribute and signature order
257 The experimental subroutine signatures feature has been changed so that
258 subroutine attributes must now come before the signature rather than
259 after. This is because attributes like C<:lvalue> can affect the
260 compilation of code within the signature, for example:
262 sub f :lvalue ($a = do { $x = "abc"; return substr($x,0,1)}) { ...}
264 Note that this the second time they have been flipped:
266 sub f :lvalue ($a, $b) { ... }; # 5.20; 5.28 onwards
267 sub f ($a, $b) :lvalue { ... }; # 5.22 - 5.26
269 =head2 Comma-less variable lists in formats are no longer allowed
271 Omitting the commas between variables passed to formats is no longer
272 allowed. This has been deprecated since Perl 5.000.
274 =head2 The C<:locked> and C<:unique> attributes have been removed
276 These have been no-ops and deprecated since Perl 5.12 and 5.10,
279 =head2 C<\N{}> with nothing between the braces is now illegal.
281 This has been deprecated since Perl 5.24.
283 =head2 Opening the same symbol as both a file and directory handle is no longer allowed
285 Using C<open()> and C<opendir()> to associate both a filehandle and a dirhandle
286 to the same symbol (glob or scalar) has been deprecated since Perl 5.10.
288 =head2 Use of bare C<< << >> to mean C<< <<"" >> is no longer allowed
290 Use of a bare terminator has been deprecated since Perl 5.000.
292 =head2 Setting $/ to a reference to a non-positive integer no longer allowed
294 This used to work like setting it to C<undef>, but has been deprecated
297 =head2 Unicode code points with values exceeding C<IV_MAX> are now fatal.
299 This was deprecated since Perl 5.24.
301 =head2 The C<B::OP::terse> method has been removed.
303 Use C<B::Concise::b_terse> instead.
305 =head2 Use of inherited AUTOLOAD for non-methods is no longer allowed.
307 This was deprecated in Perl 5.004.
309 =head2 Use of strings with code points over 0xFF is not allowed for bitwise string operators
311 Code points over C<0xFF> do not make sense for bitwise operators and such
312 an operation will now croak, except for a few remaining cases. See
315 This was deprecated in Perl 5.24.
317 =head2 Setting C<${^ENCODING}> to a defined value is now illegal
319 This has been deprecated since Perl 5.22 and a no-op since Perl 5.26.
321 =head2 Backslash no longer escapes colon in PATH for the C<-S> switch
323 Previously the C<-S> switch incorrectly treated backslash ("\") as an
324 escape for colon when traversing the C<PATH> environment variable.
325 L<[perl #129183]|https://rt.perl.org/Ticket/Display.html?id=129183>
327 =head2 the -DH (DEBUG_H) misfeature has been removed
329 On a perl built with debugging support, the C<H> flag to the C<-D>
330 debugging option has been removed. This was supposed to dump hash values,
331 but has been broken for many years.
333 =head2 Yada-yada is now strictly a statement
335 By the time of its initial stable release in Perl 5.12, the C<...>
336 (yada-yada) operator was explicitly intended to serve as a statement,
337 not an expression. However, the original implementation was confused
338 on this point, leading to inconsistent parsing. The operator was
339 accidentally accepted in a few situations where it did not serve as a
340 complete statement, such as
345 The parsing has now been made consistent, permitting yada-yada only as
346 a statement. Affected code can use C<do{...}> to put a yada-yada into
347 an arbitrary expression context.
349 =head2 Sort algorithm can no longer be specified
351 Since Perl 5.8, the L<sort> pragma has had subpragmata C<_mergesort>,
352 C<_quicksort>, and C<_qsort> that can be used to specify which algorithm
353 perl should use to implement the L<sort|perlfunc/sort> builtin.
354 This was always considered a dubious feature that might not last,
355 hence the underscore spellings, and they were documented as not being
356 portable beyond Perl 5.8. These subpragmata have now been deleted,
357 and any attempt to use them is an error. The L<sort> pragma otherwise
358 remains, and the algorithm-neutral C<stable> subpragma can be used to
359 control sorting behaviour.
360 L<[perl #119635]|https://rt.perl.org/Ticket/Display.html?id=119635>
362 =head2 Over-radix digits in floating point literals
364 Octal and binary floating point literals used to permit any hexadecimal
365 digit to appear after the radix point. The digits are now restricted
366 to those appropriate for the radix, as digits before the radix point
369 =head2 Return type of C<unpackstring()>
371 The return types of the C API functions C<unpackstring()> and
372 C<unpack_str()> have changed from C<I32> to C<SSize_t>, in order to
373 accommodate datasets of more than two billion items.
377 =head2 Use of L<C<vec>|perlfunc/vec EXPR,OFFSET,BITS> on strings with code points above 0xFF is deprecated.
379 Such strings are represented internally in UTF-8, and C<vec> is a
380 bit-oriented operation that will likely give unexpected results on those
383 =head2 Some uses of unescaped C<"{"> in regexes are no longer fatal
385 Perl 5.26.0 fatalized some uses of an unescaped left brace, but an
386 exception was made at the last minute, specifically crafted to be a
387 minimal change to allow GNU Autoconf to work. That tool is heavily
388 depended upon, and continues to use the deprecated usage. Its use of an
389 unescaped left brace is one where we have no intention of repurposing
390 C<"{"> to be something other than itself.
392 That exception is now generalized to include various other such cases
393 where the C<"{"> will not be repurposed.
395 Note that these uses continue to raise a deprecation message.
397 =head2 Use of unescaped C<"{"> immediately after a C<"("> in regular expression patterns
399 Using unescaped left braces is officially deprecated everywhere, but it
400 is not enforced in contexts where their use does not interfere with
401 expected extensions to the language. A deprecation is added in this
402 release when the brace appears immediately after an opening parenthesis.
403 Before this, even if the brace was part of a legal quantifier, it was
404 not interpreted as such, but as the literal characters, unlike other
405 quantifiers that follow a C<"("> which are considered errors. Now,
406 their use will raise a deprecation message, unless turned off.
408 =head2 Assignment to C<$[> will be fatal in Perl 5.30
410 Assigning a non-zero value to L<C<$[>|perlvar/$[> has been deprecated
411 since Perl 5.12, but was never given a deadline for removal. This has
412 now been scheduled for Perl 5.30.
414 =head2 hostname() won't accept arguments in Perl 5.32
416 Passing arguments to C<Sys::Hostname::hostname()> was already deprecated,
417 but didn't have a removal date. This has now been scheduled for Perl
418 5.32. L<[perl #124349]|https://rt.perl.org/Ticket/Display.html?id=124349>
420 =head2 Module removals
422 The following modules will be removed from the core distribution in a
423 future release, and will at that time need to be installed from CPAN.
424 Distributions on CPAN which require these modules will need to list them as
427 The core versions of these modules will now issue C<"deprecated">-category
428 warnings to alert you to this fact. To silence these deprecation warnings,
429 install the modules in question from CPAN.
431 Note that these are (with rare exceptions) fine modules that you are encouraged
432 to continue to use. Their disinclusion from core primarily hinges on their
433 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
434 not usually on concerns over their design.
440 =item L<Locale::Codes> and its associated Country, Currency and Language modules
444 =head1 Performance Enhancements
450 The start up overhead for creating regular expression patterns with
451 Unicode properties (C<\p{...}>) has been greatly reduced in most cases.
455 Many string concatenation expressions are now considerably faster, due
456 to the introduction internally of a C<multiconcat> opcode which combines
457 multiple concatenations, and optionally a C<=> or C<.=>, into a single
458 action. For example, apart from retrieving C<$s>, C<$a> and C<$b>, this
459 whole expression is now handled as a single op:
463 As a special case, if the LHS of an assignment is a lexical variable or
464 C<my $s>, the op itself handles retrieving the lexical variable, which
467 In general, the more the expression includes a mix of constant strings and
468 variable expressions, the longer the expression, and the more it mixes
469 together non-utf8 and utf8 strings, the more marked the performance
470 improvement. For example on a C<x86_64> system, this code has been
471 benchmarked running four times faster:
474 my $a = "ab\x{100}cde";
476 my $c = "\x{101}klmn";
478 for my $i (1..10_000_000) {
480 $s .= "foo=$a bar=$b baz=$c";
483 In addition, C<sprintf> expressions which have a constant format
484 containing only C<%s> and C<%%> format elements, and which have a fixed
485 number of arguments, are now also optimised into a C<multiconcat> op.
489 The C<ref()> builtin is now much faster in boolean context, since it no
490 longer bothers to construct a temporary string like C<Foo=ARRAY(0x134af48)>.
494 C<keys()> in void and scalar contexts is now more efficient.
498 The common idiom of comparing the result of index() with -1 is now
499 specifically optimised, e.g.
501 if (index(...) != -1) { ... }
505 C<for()> loops and similar constructs are now more efficient in most cases.
509 L<File::Glob> has been modified to remove unnecessary backtracking and
510 recursion, thanks to Russ Cox. See L<https://research.swtch.com/glob>
515 The XS-level C<SvTRUE()> API function is now more efficient.
519 Various integer-returning ops are now more efficient in scalar/boolean context.
523 Slightly improved performance when parsing stash names.
524 L<[perl #129990]|https://rt.perl.org/Public/Bug/Display.html?id=129990>
528 Calls to C<require> for an already loaded module are now slightly faster.
529 L<[perl #132171]|https://rt.perl.org/Public/Bug/Display.html?id=132171>
533 The performance of pattern matching C<[[:ascii:]]> and C<[[:^ascii:]]>
534 has been improved significantly except on EBCDIC platforms.
538 Various optimizations have been applied to matching regular expression
539 patterns, so under the right circumstances, significant performance
540 gains may be noticed. But in an application with many varied patterns,
541 little overall improvement likely will be seen.
545 Other optimizations have been applied to UTF-8 handling, but these are
546 not typically a major factor in most applications.
550 =head1 Modules and Pragmata
552 Key highlights in this release across several modules:
554 =head2 Removal of use vars
556 The usage of C<use vars> has been discouraged since the introduction of
557 C<our> in Perl 5.6.0. Where possible the usage of this pragma has now been
558 removed from the Perl source code.
560 This had a slight effect (for the better) on the output of WARNING_BITS in
563 =head2 Use of DynaLoader changed to XSLoader in many modules
565 XSLoader is more modern, and most modules already require perl 5.6 or
566 greater, so no functionality is lost by switching. In some cases, we have
567 also made changes to the local implementation that may not be reflected in
568 the version on CPAN due to a desire to maintain more backwards
571 =head2 Updated Modules and Pragmata
577 L<Archive::Tar> has been upgraded from version 2.24 to 2.26.
581 L<arybase> has been upgraded from version 0.12 to 0.15.
585 L<Attribute::Handlers> has been upgraded from version 0.99 to 1.01.
589 L<attributes> has been upgraded from version 0.29 to 0.33.
593 L<B> has been upgraded from version 1.68 to 1.74.
597 L<B::Concise> has been upgraded from version 0.999 to 1.003.
601 L<B::Debug> has been upgraded from version 1.24 to 1.26.
603 NOTE: L<B::Debug> is deprecated and may be removed from a future version
608 L<B::Deparse> has been upgraded from version 1.40 to 1.48.
610 It includes many bug fixes, and in particular, it now deparses variable
611 attributes correctly:
613 my $x :foo; # used to deparse as
614 # 'attributes'->import('main', \$x, 'foo'), my $x;
618 L<base> has been upgraded from version 2.25 to 2.27.
622 L<bignum> has been upgraded from version 0.47 to 0.49.
626 L<blib> has been upgraded from version 1.06 to 1.07.
630 L<bytes> has been upgraded from version 1.05 to 1.06.
634 L<Carp> has been upgraded from version 1.42 to 1.50.
636 If a package on the call stack contains a constant named C<ISA>, Carp no
637 longer throws a "Not a GLOB reference" error.
639 L<Carp>, when generating stack traces, now attempts to work around
640 longstanding bugs resulting from Perl's non-reference-counted stack.
641 L<[perl #52610]|https://rt.perl.org/Ticket/Display.html?id=52610>
643 Carp has been modified to avoid assuming that objects cannot be
644 overloaded without the L<overload> module loaded (this can happen with
645 objects created by XS modules). Previously, infinite recursion would
646 result if an XS-defined overload method itself called Carp.
647 L<[perl #132828]|https://rt.perl.org/Ticket/Display.html?id=132828>
649 Carp now avoids using C<overload::StrVal>, partly because older versions
650 of L<overload> (included with perl 5.14 and earlier) load L<Scalar::Util>
651 at run time, which will fail if Carp has been invoked after a syntax error.
655 L<charnames> has been upgraded from version 1.44 to 1.45.
659 L<Compress::Raw::Zlib> has been upgraded from version 2.074 to 2.076.
661 This addresses a security vulnerability in older versions of the 'zlib' library
662 (which is bundled with Compress-Raw-Zlib).
666 L<Config::Extensions> has been upgraded from version 0.01 to 0.02.
670 L<Config::Perl::V> has been upgraded from version 0.28 to 0.29.
674 L<CPAN> has been upgraded from version 2.18 to 2.20.
678 L<Data::Dumper> has been upgraded from version 2.167 to 2.170.
680 Quoting of glob names now obeys the Useqq option
681 L<[perl #119831]|https://rt.perl.org/Ticket/Display.html?id=119831>.
683 Attempts to set an option to C<undef> through a combined getter/setter
684 method are no longer mistaken for getter calls
685 L<[perl #113090]|https://rt.perl.org/Ticket/Display.html?id=113090>.
689 L<Devel::Peek> has been upgraded from version 1.26 to 1.27.
693 L<Devel::PPPort> has been upgraded from version 3.35 to 3.40.
695 L<Devel::PPPort> has moved from cpan-first to perl-first maintenance
697 Primary responsibility for the code in Devel::PPPort has moved into core perl.
698 In a practical sense there should be no change except that hopefully it will
699 stay more up to date with changes made to symbols in perl, rather than needing
700 to be updated after the fact.
704 L<Digest::SHA> has been upgraded from version 5.96 to 6.01.
708 L<DirHandle> has been upgraded from version 1.04 to 1.05.
712 L<DynaLoader> has been upgraded from version 1.42 to 1.45.
714 Its documentation now shows the use of C<__PACKAGE__> and direct object
716 L<[perl #132247]|https://rt.perl.org/Ticket/Display.html?id=132247>.
720 L<Encode> has been upgraded from version 2.88 to 2.97.
724 L<encoding> has been upgraded from version 2.19 to 2.22.
728 L<Errno> has been upgraded from version 1.28 to 1.29.
732 L<experimental> has been upgraded from version 0.016 to 0.019.
736 L<Exporter> has been upgraded from version 5.72 to 5.73.
740 L<ExtUtils::CBuilder> has been upgraded from version 0.280225 to 0.280230.
744 L<ExtUtils::Constant> has been upgraded from version 0.23 to 0.25.
748 L<ExtUtils::Embed> has been upgraded from version 1.34 to 1.35.
752 L<ExtUtils::Install> has been upgraded from version 2.04 to 2.14.
756 L<ExtUtils::MakeMaker> has been upgraded from version 7.24 to 7.34.
760 L<ExtUtils::Miniperl> has been upgraded from version 1.06 to 1.08.
764 L<ExtUtils::ParseXS> has been upgraded from version 3.34 to 3.39.
768 L<ExtUtils::Typemaps> has been upgraded from version 3.34 to 3.38.
772 L<ExtUtils::XSSymSet> has been upgraded from version 1.3 to 1.4.
776 L<feature> has been upgraded from version 1.47 to 1.52.
780 L<fields> has been upgraded from version 2.23 to 2.24.
784 L<File::Copy> has been upgraded from version 2.32 to 2.33.
786 It will now use the sub-second precision variant of utime() supplied by
787 L<Time::HiRes> where available.
788 L<[perl #132401|https://rt.perl.org/Ticket/Display.html?id=132401>.
792 L<File::Fetch> has been upgraded from version 0.52 to 0.56.
796 L<File::Glob> has been upgraded from version 1.28 to 1.31.
800 L<File::Path> has been upgraded from version 2.12_01 to 2.15.
804 L<File::Spec> and L<Cwd> have been upgraded from version 3.67 to 3.74.
808 L<File::stat> has been upgraded from version 1.07 to 1.08.
812 L<FileCache> has been upgraded from version 1.09 to 1.10.
816 L<Filter::Simple> has been upgraded from version 0.93 to 0.95.
820 L<Filter::Util::Call> has been upgraded from version 1.55 to 1.58.
824 L<GDBM_File> has been upgraded from version 1.15 to 1.17.
826 Its documentation now explains that C<each> and C<delete> don't mix in
827 hashes tied to this module
828 L<[perl #117449]|https://rt.perl.org/Ticket/Display.html?id=117449>.
830 It will now retry opening with an acceptable block size if asking gdbm
831 to default the block size failed
832 L<[perl #119623]|https://rt.perl.org/Ticket/Display.html?id=119623>.
836 L<Getopt::Long> has been upgraded from version 2.49 to 2.5.
840 L<Hash::Util::FieldHash> has been upgraded from version 1.19 to 1.20.
844 L<I18N::Langinfo> has been upgraded from version 0.13 to 0.17.
846 This module is now available on all platforms, emulating the system
847 L<nl_langinfo(3)> on systems that lack it. Some caveats apply, as
848 L<detailed in its documentation|I18N::Langinfo>, the most severe being
849 that, except for MS Windows, the C<CODESET> item is not implemented on
850 those systems, always returning C<"">.
852 It now sets the UTF-8 flag in its returned scalar if the string contains
853 legal non-ASCII UTF-8, and the locale is UTF-8
854 L<[perl #127288]|https://rt.perl.org/Ticket/Display.html?id=127288>.
856 This update also fixes a bug in which the underlying locale was ignored
857 for the C<RADIXCHAR> (always was returned as a dot) and the C<THOUSEP>
858 (always empty). Now the locale-appropriate values are returned.
862 L<I18N::LangTags> has been upgraded from version 0.42 to 0.43.
866 L<if> has been upgraded from version 0.0606 to 0.0608.
870 L<IO> has been upgraded from version 1.38 to 1.39.
874 L<IO::Socket::IP> has been upgraded from version 0.38 to 0.39.
878 L<IPC::Cmd> has been upgraded from version 0.96 to 1.00.
882 L<JSON::PP> has been upgraded from version 2.27400_02 to 2.97001.
886 The C<libnet> distribution has been upgraded from version 3.10 to 3.11.
890 L<List::Util> has been upgraded from version 1.46_02 to 1.49.
894 L<Locale::Codes> has been upgraded from version 3.42 to 3.56.
896 B<NOTE>: L<Locale::Codes> scheduled to be removed from core in Perl 5.30.
900 L<Locale::Maketext> has been upgraded from version 1.28 to 1.29.
904 L<Math::BigInt> has been upgraded from version 1.999806 to 1.999811.
908 L<Math::BigInt::FastCalc> has been upgraded from version 0.5005 to 0.5006.
912 L<Math::BigRat> has been upgraded from version 0.2611 to 0.2613.
916 L<Module::CoreList> has been upgraded from version 5.20170530 to 5.20180606.
920 L<mro> has been upgraded from version 1.20 to 1.22.
924 L<Net::Ping> has been upgraded from version 2.55 to 2.62.
928 L<NEXT> has been upgraded from version 0.67 to 0.67_01.
932 L<ODBM_File> has been upgraded from version 1.14 to 1.15.
936 L<Opcode> has been upgraded from version 1.39 to 1.43.
940 L<overload> has been upgraded from version 1.28 to 1.30.
944 L<PerlIO::encoding> has been upgraded from version 0.25 to 0.26.
948 L<PerlIO::scalar> has been upgraded from version 0.26 to 0.29.
952 L<PerlIO::via> has been upgraded from version 0.16 to 0.17.
956 L<Pod::Functions> has been upgraded from version 1.11 to 1.13.
960 L<Pod::Html> has been upgraded from version 1.2202 to 1.24.
962 A title for the HTML document will now be automatically generated by
963 default from a "NAME" section in the POD document, as it used to be
964 before the module was rewritten to use L<Pod::Simple::XHTML> to do the
966 L<[perl #110520]|https://rt.perl.org/Ticket/Display.html?id=110520>.
970 L<Pod::Perldoc> has been upgraded from version 3.28 to 3.2801.
974 The C<podlators> distribution has been upgraded from version 4.09 to 4.10.
976 Man page references and function names now follow the Linux man page
977 formatting standards, instead of the Solaris standard.
981 L<POSIX> has been upgraded from version 1.76 to 1.84.
983 Some more cautions were added about using locale-specific functions in
984 threaded applications.
988 L<re> has been upgraded from version 0.34 to 0.36.
992 L<Scalar::Util> has been upgraded from version 1.46_02 to 1.50.
996 L<SelfLoader> has been upgraded from version 1.23 to 1.25.
1000 L<Socket> has been upgraded from version 2.020_03 to 2.027.
1004 L<sort> has been upgraded from version 2.02 to 2.04.
1008 L<Storable> has been upgraded from version 2.62 to 3.08.
1012 L<Sub::Util> has been upgraded from version 1.48 to 1.49.
1016 L<subs> has been upgraded from version 1.02 to 1.03.
1020 L<Sys::Hostname> has been upgraded from version 1.20 to 1.22.
1024 L<Term::ReadLine> has been upgraded from version 1.16 to 1.17.
1028 L<Test> has been upgraded from version 1.30 to 1.31.
1032 L<Test::Harness> has been upgraded from version 3.38 to 3.42.
1036 L<Test::Simple> has been upgraded from version 1.302073 to 1.302133.
1040 L<threads> has been upgraded from version 2.15 to 2.22.
1042 The documentation now better describes the problems that arise when
1043 returning values from threads, and no longer warns about creating threads
1045 L<[perl #96538]|https://rt.perl.org/Ticket/Display.html?id=96538>
1049 L<threads::shared> has been upgraded from version 1.56 to 1.58.
1053 L<Tie::Array> has been upgraded from version 1.06 to 1.07.
1057 L<Tie::StdHandle> has been upgraded from version 4.4 to 4.5.
1061 L<Time::gmtime> has been upgraded from version 1.03 to 1.04.
1065 L<Time::HiRes> has been upgraded from version 1.9741 to 1.9759.
1069 L<Time::localtime> has been upgraded from version 1.02 to 1.03.
1073 L<Time::Piece> has been upgraded from version 1.31 to 1.3204.
1077 L<Unicode::Collate> has been upgraded from version 1.19 to 1.25.
1081 L<Unicode::Normalize> has been upgraded from version 1.25 to 1.26.
1085 L<Unicode::UCD> has been upgraded from version 0.68 to 0.70.
1087 The function C<num> now accepts an optional parameter to help in
1088 diagnosing error returns.
1092 L<User::grent> has been upgraded from version 1.01 to 1.02.
1096 L<User::pwent> has been upgraded from version 1.00 to 1.01.
1100 L<utf8> has been upgraded from version 1.19 to 1.21.
1104 L<vars> has been upgraded from version 1.03 to 1.04.
1108 L<version> has been upgraded from version 0.9917 to 0.9923.
1112 L<VMS::DCLsym> has been upgraded from version 1.08 to 1.09.
1116 L<VMS::Stdio> has been upgraded from version 2.41 to 2.44.
1120 L<warnings> has been upgraded from version 1.37 to 1.42.
1122 It now includes new functions with names ending in C<_at_level>, allowing
1123 callers to specify the exact call frame.
1124 L<[perl #132468]|https://rt.perl.org/Ticket/Display.html?id=132468>
1128 L<XS::Typemap> has been upgraded from version 0.15 to 0.16.
1132 L<XSLoader> has been upgraded from version 0.27 to 0.30.
1134 Its documentation now shows the use of C<__PACKAGE__>, and direct object
1135 syntax for example C<DynaLoader> usage
1136 L<[perl #132247]|https://rt.perl.org/Ticket/Display.html?id=132247>.
1138 Platforms that use C<mod2fname> to edit the names of loadable
1139 libraries now look for bootstrap (.bs) files under the correct,
1144 =head2 Removed Modules and Pragmata
1150 The C<VMS::stdio> compatibility shim has been removed.
1154 =head1 Documentation
1156 =head2 Changes to Existing Documentation
1158 We have attempted to update the documentation to reflect the changes
1159 listed in this document. If you find any we have missed, send email
1160 to L<perlbug@perl.org|mailto:perlbug@perl.org>.
1162 Additionally, the following selected changes have been made:
1170 The API functions C<perl_parse()>, C<perl_run()>, and C<perl_destruct()>
1171 are now documented comprehensively, where previously the only
1172 documentation was a reference to the L<perlembed> tutorial.
1176 The documentation of C<newGIVENOP()> has been belatedly updated to
1177 account for the removal of lexical C<$_>.
1181 The API functions C<newCONSTSUB()> and C<newCONSTSUB_flags()> are
1182 documented much more comprehensively than before.
1192 The section "Truth and Falsehood" in L<perlsyn> has been moved into
1197 =head3 L<perldebguts>
1203 The description of the conditions under which C<DB::sub()> will be called
1205 L<[perl #131672]|https://rt.perl.org/Ticket/Display.html?id=131672>
1213 =item * L<perldiag/Variable length lookbehind not implemented in regex mE<sol>%sE<sol>>
1215 This now gives more ideas as to workarounds to the issue that was
1216 introduced in Perl 5.18 (but not documented explicitly in its perldelta)
1217 for the fact that some Unicode C</i> rules cause a few sequences such as
1221 to be considered variable length, and hence disallowed.
1223 =item * "Use of state $_ is experimental" in L<perldiag>
1225 This entry has been removed, as the experimental support of this construct was
1226 removed in perl 5.24.0.
1230 The diagnostic C<Initialization of state variables in list context
1231 currently forbidden> has changed to C<Initialization of state variables
1232 in list currently forbidden>, because list-context initialization of
1233 single aggregate state variables is now permitted.
1243 The examples in L<perlembed> have been made more portable in the way
1244 they exit, and the example that gets an exit code from the embedded Perl
1245 interpreter now gets it from the right place. The examples that pass
1246 a constructed argv to Perl now show the mandatory null C<argv[argc]>.
1250 An example in L<perlembed> used the string value of C<ERRSV> as a
1251 format string when calling croak(). If that string contains format
1252 codes such as C<%s> this could crash the program.
1254 This has been changed to a call to croak_sv().
1256 An alternative could have been to supply a trivial format string:
1258 croak("%s", SvPV_nolen(ERRSV));
1260 or as a special case for C<ERRSV> simply:
1272 There is now a note that warnings generated by built-in functions are
1273 documented in L<perldiag> and L<warnings>.
1274 L<[perl #116080]|https://rt.perl.org/Ticket/Display.html?id=116080>
1278 The documentation for the C<exists> operator no longer says that
1279 autovivification behaviour "may be fixed in a future release".
1280 We've determined that we're not going to change the default behaviour.
1281 L<[perl #127712]|https://rt.perl.org/Ticket/Display.html?id=127712>
1285 A couple of small details in the documentation for the C<bless> operator
1286 have been clarified.
1287 L<[perl #124428]|https://rt.perl.org/Ticket/Display.html?id=124428>
1291 The description of C<@INC> hooks in the documentation for C<require>
1292 has been corrected to say that filter subroutines receive a useless
1294 L<[perl #115754]|https://rt.perl.org/Ticket/Display.html?id=115754>
1298 The documentation of C<ref> has been rewritten for clarity.
1302 The documentation of C<use> now explains what syntactically qualifies
1303 as a version number for its module version checking feature.
1307 The documentation of C<warn> has been updated to reflect that since Perl
1308 5.14 it has treated complex exception objects in a manner equivalent
1310 L<[perl #121372]|https://rt.perl.org/Ticket/Display.html?id=121372>
1314 The documentation of C<die> and C<warn> has been revised for clarity.
1318 The documentation of C<each> has been improved, with a slightly more
1319 explicit description of the sharing of iterator state, and with
1320 caveats regarding the fragility of while-each loops.
1321 L<[perl #132644]|https://rt.perl.org/Ticket/Display.html?id=132644>
1325 Clarification to C<require> was added to explain the differences between
1328 require "Foo/Bar.pm";
1338 The precise rules for identifying C<smoke-me> branches are now stated.
1348 The section on reference counting in L<perlguts> has been heavily revised,
1349 to describe references in the way a programmer needs to think about them
1350 rather than in terms of the physical data structures.
1354 Improve documentation related to UTF-8 multibytes.
1358 =head3 L<perlintern>
1364 The internal functions C<newXS_len_flags()> and C<newATTRSUB_x()> are
1375 The documentation about C<DESTROY> methods has been corrected, updated,
1376 and revised, especially in regard to how they interact with exceptions.
1377 L<[perl #122753]|https://rt.perl.org/Ticket/Display.html?id=122753>
1387 The description of the C<x> operator in L<perlop> has been clarified.
1388 L<[perl #132460]|https://rt.perl.org/Ticket/Display.html?id=132460>
1392 L<perlop> has been updated to note that C<qw>'s whitespace rules differ
1393 from that of C<split>'s in that only ASCII whitespace is used.
1397 The general explanation of operator precedence and associativity has
1398 been corrected and clarified.
1399 L<[perl #127391]|https://rt.perl.org/Ticket/Display.html?id=127391>
1403 The documentation for the C<\> referencing operator now explains the
1404 unusual context that it supplies to its operand.
1405 L<[perl #131061]|https://rt.perl.org/Ticket/Display.html?id=131061>
1409 =head3 L<perlrequick>
1415 Clarifications on metacharacters and character classes
1425 Clarify metacharacters.
1435 Clarify the differences between B<< -M >> and B<< -m >>.
1436 L<[perl #131518]|https://rt.perl.org/Ticket/Display.html?id=131518>
1446 The documentation about set-id scripts has been updated and revised.
1447 L<[perl #74142]|https://rt.perl.org/Ticket/Display.html?id=74142>
1451 A section about using C<sudo> to run Perl scripts has been added.
1461 The section "Truth and Falsehood" in L<perlsyn> has been removed from
1462 that document, where it didn't belong, and merged into the existing
1463 paragraph on the same topic in L<perldata>.
1467 The means to disambiguate between code blocks and hash constructors,
1468 already documented in L<perlref>, are now documented in L<perlsyn> too.
1469 L<[perl #130958]|https://rt.perl.org/Ticket/Display.html?id=130958>
1473 =head3 L<perluniprops>
1479 L<perluniprops> has been updated to note that C<\p{Word}> now includes
1480 code points matching the C<\p{Join_Control}> property. The change to
1481 the property was made in Perl 5.18, but not documented until now. There
1482 are currently only two code points that match this property U+200C (ZERO
1483 WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER).
1487 For each binary table or property, the documentation now includes which
1488 characters in the range C<\x00-\xFF> it matches, as well as a list of
1489 the first few ranges of code points matched above that.
1499 The entry for C<$+> in perlvar has been expanded upon to describe handling of
1500 multiply-named capturing groups.
1504 =head3 L<perlfunc>, L<perlop>, L<perlsyn>
1510 In various places, improve the documentation of the special cases
1511 in the condition expression of a while loop, such as implicit C<defined>
1512 and assignment to C<$_>.
1513 L<[perl #132644]|https://rt.perl.org/Ticket/Display.html?id=132644>
1519 The following additions or changes have been made to diagnostic output,
1520 including warnings and fatal error messages. For the complete list of
1521 diagnostic messages, see L<perldiag>.
1523 =head2 New Diagnostics
1531 L<Can't "goto" into a "given" block|perldiag/"Can't E<quot>gotoE<quot> into a E<quot>givenE<quot> block">
1533 (F) A "goto" statement was executed to jump into the middle of a C<given>
1534 block. You can't get there from here. See L<perlfunc/goto>.
1538 L<Can't "goto" into a binary or list expression|perldiag/"Can't E<quot>gotoE<quot> into a binary or list expression">
1540 Use of C<goto> to jump into the parameter of a binary or list operator has
1541 been prohibited, to prevent crashes and stack corruption.
1542 L<[perl #130936]|https://rt.perl.org/Ticket/Display.html?id=130936>
1544 You may only enter the I<first> argument of an operator that takes a fixed
1545 number of arguments, since this is a case that will not cause stack
1547 L<[perl #132854]|https://rt.perl.org/Ticket/Display.html?id=132854>
1557 L<Old package separator used in string|perldiag/"Old package separator used in string">
1559 (W syntax) You used the old package separator, "'", in a variable
1560 named inside a double-quoted string; e.g., C<"In $name's house">. This
1561 is equivalent to C<"In $name::s house">. If you meant the former, put
1562 a backslash before the apostrophe (C<"In $name\'s house">).
1566 L<perldiag/Locale '%s' contains (at least) the following characters which
1567 have unexpected meanings: %s The Perl program will use the expected
1572 =head2 Changes to Existing Diagnostics
1578 A false-positive warning that was issued when using a
1579 numerically-quantified sub-pattern in a recursive regex has been
1580 silenced. L<[perl #131868]|https://rt.perl.org/Public/Bug/Display.html?id=131868>
1584 The warning about useless use of a concatenation operator in void context
1585 is now generated for expressions with multiple concatenations, such as
1586 C<$a.$b.$c>, which used to mistakenly not warn.
1587 L<[perl #6997]|https://rt.perl.org/Ticket/Display.html?id=6997>
1591 Warnings that a variable or subroutine "masks earlier declaration in same
1592 ...", or that an C<our> variable has been redeclared, have been moved to a
1593 new warnings category "shadow". Previously they were in category "misc".
1597 The deprecation warning from C<Sys::Hostname::hostname()> saying that
1598 it doesn't accept arguments now states the Perl version in which the
1599 warning will be upgraded to an error.
1600 L<[perl #124349]|https://rt.perl.org/Ticket/Display.html?id=124349>
1604 The L<perldiag> entry for the error regarding a set-id script has been
1605 expanded to make clear that the error is reporting a specific security
1606 vulnerability, and to advise how to fix it.
1610 The C<< Unable to flush stdout >> error message was missing a trailing
1611 newline. [debian #875361]
1615 =head1 Utility Changes
1623 C<--help> and C<--version> options have been added.
1627 =head1 Configuration and Compilation
1631 =item * C89 requirement
1633 Perl has been documented as requiring a C89 compiler to build since October
1634 1998. A variety of simplifications have now been made to Perl's internals to
1635 rely on the features specified by the C89 standard. We believe that this
1636 internal change hasn't altered the set of platforms that Perl builds on, but
1637 please report a bug if Perl now has new problems building on your platform.
1641 On GCC, C<-Werror=pointer-arith> is now enabled by default,
1642 disallowing arithmetic on void and function pointers.
1646 Where an HTML version of the documentation is installed, the HTML
1647 documents now use relative links to refer to each other. Links from
1648 the index page of L<perlipc> to the individual section documents are
1650 L<[perl #110056]|https://rt.perl.org/Ticket/Display.html?id=110056>
1654 F<lib/unicore/mktables> now correctly canonicalizes the names of the
1655 dependencies stored in the files it generates.
1657 F<regen/mk_invlists.pl>, unlike the other F<regen/*.pl> scripts, used
1658 C<$0> to name itself in the dependencies stored in the files it
1659 generates. It now uses a literal so that the path stored in the
1660 generated files doesn't depend on how F<regen/mk_invlists.pl> is
1663 This lack of canonical names could cause test failures in F<t/porting/regen.t>.
1664 L<[perl #132925]|https://rt.perl.org/Ticket/Display.html?id=132925>
1670 =item HAS_BUILTIN_ADD_OVERFLOW
1672 =item HAS_BUILTIN_MUL_OVERFLOW
1674 =item HAS_BUILTIN_SUB_OVERFLOW
1676 =item HAS_THREAD_SAFE_NL_LANGINFO_L
1678 =item HAS_LOCALECONV_L
1704 Testing of the XS-APItest directory is now done in parallel, where
1709 Perl now includes a default F<.travis.yml> file for Travis CI testing
1711 L<[perl #123981]|https://rt.perl.org/Ticket/Display.html?id=123981>
1715 The watchdog timer count in F<re/pat_psycho.t> can now be overridden.
1717 This test can take a long time to run, so there is a timer to keep
1718 this in check (currently, 5 minutes). This commit adds checking
1719 the environment variable C<< PERL_TEST_TIME_OUT_FACTOR >>; if set,
1720 the time out setting is multiplied by its value.
1724 F<harness> no longer waits for 30 seconds when running F<t/io/openpid.t>.
1725 L<[perl #121028]|https://rt.perl.org/Ticket/Display.html?id=121028>
1726 L<[perl #132867]|https://rt.perl.org/Ticket/Display.html?id=132867>
1732 For the past few years we have released perl using three different archive
1733 formats: bzip (C<.bz2>), LZMA2 (C<.xz>) and gzip (C<.gz>). Since xz compresses
1734 better and decompresses faster, and gzip is more compatible and uses less
1735 memory, we have dropped the C<.bz2> archive format with this release.
1736 (If this poses a problem, do let us know; see L</Reporting Bugs>, below.)
1738 =head1 Platform Support
1740 =head2 Discontinued Platforms
1744 =item PowerUX / Power MAX OS
1746 Compiler hints and other support for these apparently long-defunct
1747 platforms has been removed.
1751 =head2 Platform-Specific Notes
1757 Compilation on CentOS 5 is now fixed.
1761 A build with the quadmath library can now be done on Cygwin.
1765 Perl now correctly uses reentrant functions, like C<asctime_r>, on
1766 versions of Darwin that have support for them.
1770 FreeBSD's F<< /usr/share/mk/sys.mk >> specifies C<< -O2 >> for
1771 architectures other than ARM and MIPS. By default, perl is now compiled
1772 with the same optimization levels.
1776 Several fix-ups for F<configure.com>, marking function VMS has
1779 CRTL features can now be set by embedders before invoking Perl by using
1780 the C<decc$feature_set> and C<decc$feature_set_value> functions.
1781 Previously any attempt to set features after image initialization were
1790 Support for compiling perl on Windows using Microsoft Visual Studio 2017
1791 (containing Visual C++ 14.1) has been added.
1795 Visual C++ compiler version detection has been improved to work on non-English
1800 We now set C<$Config{libpth}> correctly for 64-bit builds using Visual C++
1801 versions earlier than 14.1.
1807 =head1 Internal Changes
1813 A new optimisation phase has been added to the compiler,
1814 C<optimize_optree()>, which does a top-down scan of a complete optree
1815 just before the peephole optimiser is run. This phase is not currently
1820 An C<OP_MULTICONCAT> op has been added. At C<optimize_optree()> time, a
1821 chain of C<OP_CONCAT> and C<OP_CONST> ops, together optionally with an
1822 C<OP_STRINGIFY> and/or C<OP_SASSIGN>, are combined into a single
1823 C<OP_MULTICONCAT> op. The op is of type C<UNOP_AUX>, and the aux array
1824 contains the argument count, plus a pointer to a constant string and a set
1825 of segment lengths. For example with
1827 my $x = "foo=$foo, bar=$bar\n";
1829 the constant string would be C<"foo=, bar=\n"> and the segment lengths
1830 would be (4,6,1). If the string contains characters such as C<\x80>, whose
1831 representation changes under utf8, two sets of strings plus lengths are
1832 precomputed and stored.
1836 Direct access to L<C<PL_keyword_plugin>|perlapi/PL_keyword_plugin> is not
1837 safe in the presence of multithreading. A new
1838 L<C<wrap_keyword_plugin>|perlapi/wrap_keyword_plugin> function has been
1839 added to allow XS modules to safely define custom keywords even when
1840 loaded from a thread, analogous to L<C<PL_check>|perlapi/PL_check> /
1841 L<C<wrap_op_checker>|perlapi/wrap_op_checker>.
1845 The C<PL_statbuf> interpreter variable has been removed.
1849 The deprecated function C<to_utf8_case()>, accessible from XS code, has
1855 L<C<is_utf8_invariant_string_loc()>|perlapi/is_utf8_invariant_string_loc>
1856 has been added that is like
1857 L<C<is_utf8_invariant_string()>|perlapi/is_utf8_invariant_string>
1858 but takes an extra pointer parameter into which is stored the location
1859 of the first variant character, if any are found.
1863 A new function, L<C<Perl_langinfo()>|perlapi/Perl_langinfo> has been
1864 added. It is an (almost) drop-in replacement for the system
1865 C<nl_langinfo(3)>, but works on platforms that lack that; as well as
1866 being more thread-safe, and hiding some gotchas with locale handling
1867 from the caller. Code that uses this, needn't use L<C<localeconv(3)>>
1868 (and be affected by the gotchas) to find the decimal point, thousands
1869 separator, or currency symbol. See L<perlapi/Perl_langinfo>.
1873 A new API function L<C<sv_rvunweaken()>|perlapi/sv_rvunweaken> has
1874 been added to complement L<C<sv_rvweaken()>|perlapi/sv_rvweaken>.
1875 The implementation was taken from L<Scalar::Util/unweaken>.
1879 A new flag, C<SORTf_UNSTABLE>, has been added. This will allow a
1880 future commit to make mergesort unstable when the user specifies ‘no
1881 sort stable’, since it has been decided that mergesort should remain
1886 XS modules can now automatically get reentrant versions of system
1887 functions on threaded perls.
1891 #define PERL_REENTRANT
1893 near the beginning of an C<XS> file, it will be compiled so that
1894 whatever reentrant functions perl knows about on that system will
1895 automatically and invisibly be used instead of the plain, non-reentrant
1896 versions. For example, if you write C<getpwnam()> in your code, on a
1897 system that has C<getpwnam_r()> all calls to the former will be translated
1898 invisibly into the latter. This does not happen except on threaded
1899 perls, as they aren't needed otherwise. Be aware that which functions
1900 have reentrant versions varies from system to system.
1904 The C<PERL_NO_OP_PARENT> build define is no longer supported, which means
1905 that perl is now always built with C<PERL_OP_PARENT> enabled.
1909 The format and content of the non-utf8 transliteration table attached to
1910 the C<op_pv> field of C<OP_TRANS>/C<OP_TRANSR> ops has changed. It's now a
1911 C<struct OPtrans_map>.
1915 A new compiler C<#define>, C<dTHX_DEBUGGING>. has been added. This is
1916 useful for XS or C code that only need the thread context because their
1917 debugging statements that get compiled only under C<-DDEBUGGING> need
1922 A new API function L<perlapi/Perl_setlocale> has been added.
1926 L<perlapi/sync_locale> has been revised to return a boolean as to
1927 whether the system was using the global locale or not.
1931 A new kind of magic scalar, called a "nonelem" scalar, has been introduced.
1932 It is stored in an array to denote a non-existent element, whenever such an
1933 element is accessed in a potential lvalue context. It replaces the
1934 existing "defelem" (deferred element) magic wherever this is possible,
1935 being significantly more efficient. This means that
1936 C<some_sub($sparse_array[$nonelem])> no longer has to create a new magic
1937 defelem scalar each time, as long as the element is within the array.
1939 It partially fixes the rare bug of deferred elements getting out of synch
1940 with their arrays when the array is shifted or unshifted.
1941 L<[perl #132729]|https://rt.perl.org/Ticket/Display.html?id=132729>
1945 =head1 Selected Bug Fixes
1951 List assignment (C<aassign>) could in some rare cases allocate an
1952 entry on the mortals stack and leave the entry uninitialized, leading to
1954 L<[perl #131570]|https://rt.perl.org/Ticket/Display.html?id=131570>
1958 Attempting to apply an attribute to an C<our> variable where a
1959 function of that name already exists could result in a NULL pointer
1960 being supplied where an SV was expected, crashing perl.
1961 L<[perl #131597]|https://rt.perl.org/Ticket/Display.html?id=131597>
1965 C<split ' '> now correctly handles the argument being split when in the
1966 scope of the L<< C<unicode_strings>|feature/"The 'unicode_strings' feature"
1967 >> feature. Previously, when a string using the single-byte internal
1968 representation contained characters that are whitespace by Unicode rules but
1969 not by ASCII rules, it treated those characters as part of fields rather
1970 than as field separators.
1971 L<[perl #130907]|https://rt.perl.org/Ticket/Display.html?id=130907>
1975 Several built-in functions previously had bugs that could cause them to
1976 write to the internal stack without allocating room for the item being
1977 written. In rare situations, this could have led to a crash. These bugs have
1978 now been fixed, and if any similar bugs are introduced in future, they will
1979 be detected automatically in debugging builds.
1981 These internal stack usage checks introduced are also done
1982 by the C<entersub> operator when calling XSUBs. This means we can
1983 report which XSUB failed to allocate enough stack space.
1984 L<[perl #131975]|https://rt.perl.org/Public/Bug/Display.html?id=131975>
1988 Using a symbolic ref with postderef syntax as the key in a hash lookup was
1989 yielding an assertion failure on debugging builds.
1990 L<[perl #131627]|https://rt.perl.org/Ticket/Display.html?id=131627>
1994 Array and hash variables whose names begin with a caret now admit indexing
1995 inside their curlies when interpolated into strings, as in C<<
1996 "${^CAPTURE[0]}" >> to index C<@{^CAPTURE}>.
1997 L<[perl #131664]|https://rt.perl.org/Ticket/Display.html?id=131664>
2001 Fetching the name of a glob that was previously UTF-8 but wasn't any
2002 longer would return that name flagged as UTF-8.
2003 L<[perl #131263]|https://rt.perl.org/Ticket/Display.html?id=131263>
2007 The perl C<sprintf()> function (via the underlying C function
2008 C<Perl_sv_vcatpvfn_flags()>) has been heavily reworked to fix many minor
2009 bugs, including the integer wrapping of large width and precision
2010 specifiers and potential buffer overruns. It has also been made faster in
2015 Exiting from an C<eval>, whether normally or via an exception, now always
2016 frees temporary values (possibly calling destructors) I<before> setting
2019 sub DESTROY { eval { die "died in DESTROY"; } }
2021 # $@ used to be equal to "died in DESTROY" here; it's now "".
2025 Fixed a duplicate symbol failure with C<-flto -mieee-fp> builds.
2026 F<pp.c> defined C<_LIB_VERSION> which C<-lieee> already defines.
2027 L<[perl #131786]|https://rt.perl.org/Ticket/Display.html?id=131786>
2031 The tokenizer no longer consumes the exponent part of a floating
2032 point number if it's incomplete.
2033 L<[perl #131725]|https://rt.perl.org/Ticket/Display.html?id=131725>
2037 On non-threaded builds, for C<m/$null/> where C<$null> is an empty
2038 string is no longer treated as if the C</o> flag was present when the
2039 previous matching match operator included the C</o> flag. The
2040 rewriting used to implement this behavior could confuse the
2041 interpreter. This matches the behaviour of threaded builds.
2042 L<[perl #124368]|https://rt.perl.org/Ticket/Display.html?id=124368>
2046 Parsing a C<sub> definition could cause a use after free if the C<sub>
2047 keyword was followed by whitespace including newlines (and comments.)
2048 L<[perl #131836]|https://rt.perl.org/Public/Bug/Display.html?id=131836>
2052 The tokenizer now correctly adjusts a parse pointer when skipping
2053 whitespace in a C<< ${identifier} >> construct.
2054 L<[perl #131949]|https://rt.perl.org/Public/Bug/Display.html?id=131949>
2058 Accesses to C<${^LAST_FH}> no longer assert after using any of a
2059 variety of I/O operations on a non-glob.
2060 L<[perl #128263]|https://rt.perl.org/Public/Bug/Display.html?id=128263>
2064 The XS-level C<Copy()>, C<Move()>, C<Zero()> macros and their variants now
2065 assert if the pointers supplied are C<NULL>. ISO C considers
2066 supplying NULL pointers to the functions these macros are built upon
2067 as undefined behaviour even when their count parameters are zero.
2068 Based on these assertions and the original bug report three macro
2069 calls were made conditional.
2070 L<[perl #131746]|https://rt.perl.org/Public/Bug/Display.html?id=131746>
2071 L<[perl #131892]|https://rt.perl.org/Public/Bug/Display.html?id=131892>
2075 Only the C<=> operator is permitted for defining defaults for
2076 parameters in subroutine signatures. Previously other assignment
2077 operators, e.g. C<+=>, were also accidentally permitted.
2078 L<[perl #131777]|https://rt.perl.org/Public/Bug/Display.html?id=131777>
2082 Package names are now always included in C<:prototype> warnings
2083 L<[perl #131833]|https://rt.perl.org/Public/Bug/Display.html?id=131833>
2087 The C<je_old_stack_hwm> field, previously only found in the C<jmpenv>
2088 structure on debugging builds, has been added to non-debug builds as
2089 well. This fixes an issue with some CPAN modules caused by the size of
2090 this structure varying between debugging and non-debugging builds.
2091 L<[perl #131942]|https://rt.perl.org/Public/Bug/Display.html?id=131942>
2095 The arguments to the C<ninstr()> macro are now correctly parenthesized.
2099 A NULL pointer dereference in the C<S_regmatch()> function has been
2101 L<[perl #132017]|https://rt.perl.org/Public/Bug/Display.html?id=132017>
2105 Calling L<exec PROGRAM LIST|perlfunc/exec PROGRAM LIST> with an empty C<LIST>
2106 has been fixed. This should call C<execvp()> with an empty C<argv> array
2107 (containing only the terminating C<NULL> pointer), but was instead just
2108 returning false (and not setting L<C<$!>|perlvar/$!>).
2109 L<[perl #131730]|https://rt.perl.org/Public/Bug/Display.html?id=131730>
2113 The C<gv_fetchmeth_sv> C function stopped working properly in Perl 5.22 when
2114 fetching a constant with a UTF-8 name if that constant subroutine was stored in
2115 the stash as a simple scalar reference, rather than a full typeglob. This has
2120 Single-letter debugger commands followed by an argument which starts with
2121 punctuation (e.g. C<p$^V> and C<x@ARGV>) now work again. They had been
2122 wrongly requiring a space between the command and the argument.
2123 L<[perl #120174]|https://rt.perl.org/Public/Bug/Display.html?id=120174>
2127 L<splice|perlfunc/splice ARRAY,OFFSET,LENGTH,LIST> now throws an exception
2128 ("Modification of a read-only value attempted") when modifying a read-only
2129 array. Until now it had been silently modifying the array. The new behaviour
2130 is consistent with the behaviour of L<push|perlfunc/push ARRAY,LIST> and
2131 L<unshift|perlfunc/unshift ARRAY,LIST>.
2132 L<[perl #131000]|https://rt.perl.org/Public/Bug/Display.html?id=131000>
2136 C<stat()>, C<lstat()>, and file test operators now fail if given a
2137 filename containing a nul character, in the same way that C<open()>
2142 C<stat()>, C<lstat()>, and file test operators now reliably set C<$!> when
2143 failing due to being applied to a closed or otherwise invalid file handle.
2147 File test operators for Unix permission bits that don't exist on a
2148 particular platform, such as C<-k> (sticky bit) on Windows, now check that
2149 the file being tested exists before returning the blanket false result,
2150 and yield the appropriate errors if the argument doesn't refer to a file.
2154 Fixed a 'read before buffer' overrun when parsing a range starting with
2155 C<\N{}> at the beginning of the character set for the transliteration
2157 L<[perl #132245]|https://rt.perl.org/Ticket/Display.html?id=132245>
2161 Fixed a leaked scalar when parsing an empty C<\N{}> at compile-time.
2162 L<[perl #132245]|https://rt.perl.org/Ticket/Display.html?id=132245>
2166 Calling C<do $path> on a directory or block device now yields a meaningful
2167 error code in C<$!>.
2168 L<[perl #125774]|https://rt.perl.org/Ticket/Display.html?id=125774>
2172 Regexp substitution using an overloaded replacement value that provides
2173 a tainted stringification now correctly taints the resulting string.
2174 L<[perl #115266]|https://rt.perl.org/Ticket/Display.html?id=115266>
2178 Lexical sub declarations in C<do> blocks such as C<do { my sub lex; 123 }>
2179 could corrupt the stack, erasing items already on the stack in the
2180 enclosing statement. This has been fixed.
2181 L<[perl #132442]|https://rt.perl.org/Ticket/Display.html?id=132442>
2185 C<pack> and C<unpack> can now handle repeat counts and lengths that
2187 L<[perl #119367]|https://rt.perl.org/Ticket/Display.html?id=119367>
2191 Digits past the radix point in octal and binary floating point literals
2192 now have the correct weight on platforms where a floating point
2193 significand doesn't fit into an integer type.
2197 The canonical truth value no longer has a spurious special meaning as a
2198 callable subroutine. It used to be a magic placeholder for a missing
2199 C<import> or C<unimport> method, but is now treated like any other string
2201 L<[perl #126042]|https://rt.perl.org/Ticket/Display.html?id=126042>
2205 C<system> now reduces its arguments to strings in the parent process, so
2206 any effects of stringifying them (such as overload methods being called
2207 or warnings being emitted) are visible in the way the program expects.
2208 L<[perl #121105]|https://rt.perl.org/Ticket/Display.html?id=121105>
2212 The C<readpipe()> built-in function now checks at compile time that
2213 it has only one parameter expression, and puts it in scalar context,
2214 thus ensuring that it doesn't corrupt the stack at runtime.
2215 L<[perl #4574]|https://rt.perl.org/Ticket/Display.html?id=4574>
2219 C<sort> now performs correct reference counting when aliasing C<$a> and
2220 C<$b>, thus avoiding premature destruction and leakage of scalars if they
2221 are re-aliased during execution of the sort comparator.
2222 L<[perl #92264]|https://rt.perl.org/Ticket/Display.html?id=92264>
2226 C<reverse> with no operand, reversing C<$_> by default, is no longer in
2227 danger of corrupting the stack.
2228 L<[perl #132544]|https://rt.perl.org/Ticket/Display.html?id=132544>
2232 C<exec>, C<system>, et al are no longer liable to have their argument
2233 lists corrupted by reentrant calls and by magic such as tied scalars.
2234 L<[perl #129888]|https://rt.perl.org/Ticket/Display.html?id=129888>
2238 Perl's own C<malloc> no longer gets confused by attempts to allocate
2239 more than a gigabyte on a 64-bit platform.
2240 L<[perl #119829]|https://rt.perl.org/Ticket/Display.html?id=119829>
2244 Stacked file test operators in a sort comparator expression no longer
2246 L<[perl #129347]|https://rt.perl.org/Ticket/Display.html?id=129347>
2250 An identity C<tr///> transformation on a reference is no longer mistaken
2251 for that reference for the purposes of deciding whether it can be
2253 L<[perl #130578]|https://rt.perl.org/Ticket/Display.html?id=130578>
2257 Lengthy hexadecimal, octal, or binary floating point literals no
2258 longer cause undefined behaviour when parsing digits that are of such
2259 low significance that they can't affect the floating point value.
2260 L<[perl #131894]|https://rt.perl.org/Ticket/Display.html?id=131894>
2264 C<open $$scalarref...> and similar invocations no longer leak the file
2266 L<[perl #115814]|https://rt.perl.org/Ticket/Display.html?id=115814>
2270 Some convoluted kinds of regexp no longer cause an arithmetic overflow
2272 L<[perl #131893]|https://rt.perl.org/Ticket/Display.html?id=131893>
2276 The default typemap, by avoiding C<newGVgen>, now no longer leaks when
2277 XSUBs return file handles (C<PerlIO *> or C<FILE *>).
2278 L<[perl #115814]|https://rt.perl.org/Ticket/Display.html?id=115814>
2282 Creating a C<BEGIN> block as an XS subroutine with a prototype no longer
2283 crashes because of the early freeing of the subroutine.
2287 The C<printf> format specifier C<%.0f> no longer rounds incorrectly
2288 L<[perl #47602]|https://rt.perl.org/Ticket/Display.html?id=47602>,
2289 and now shows the correct sign for a negative zero.
2293 Fixed an issue where the error C<< Scalar value @arrayname[0] better
2294 written as $arrayname >> would give an error C<< Cannot printf Inf with 'c' >>
2295 when arrayname starts with C<< Inf >>.
2296 L<[perl #132645]|https://rt.perl.org/Ticket/Display.html?id=132645>
2300 The Perl implementation of C<< getcwd() >> in C<< Cwd >> in the PathTools
2301 distribution now behaves the same as XS implementation on errors: it
2302 returns an error, and sets C<< $! >>.
2303 L<[perl #132648]|https://rt.perl.org/Ticket/Display.html?id=132648>
2307 Vivify array elements when putting them on the stack.
2308 Fixes L<[perl #8910]|https://rt.perl.org/Ticket/Display.html?id=8910>
2309 (reported in April 2002).
2313 Fixed parsing of braced subscript after parens. Fixes
2314 L<[perl #8045]|https://rt.perl.org/Ticket/Display.html?id=8045>
2315 (reported in December 2001).
2319 C<tr/non_utf8/long_non_utf8/c> could give the wrong results when the
2320 length of the replacement character list was greater than 0x7fff.
2324 C<tr/non_utf8/non_utf8/cd> failed to add the implied
2325 C<\x{100}-\x{7fffffff}> to the search character list.
2329 Compilation failures within "perl-within-perl" constructs, such as with
2330 string interpolation and the right part of C<s///e>, now cause
2331 compilation to abort earlier.
2333 Previously compilation could continue in order to report other errors,
2334 but the failed sub-parse could leave partly parsed constructs on the
2335 parser shift-reduce stack, confusing the parser, leading to perl
2337 L<[perl #125351]|https://rt.perl.org/Ticket/Display.html?id=125351>
2341 On threaded perls where the decimal point (radix) character is not a
2342 dot, it has been possible for a race to occur between threads when one
2343 needs to use the real radix character (such as with C<sprintf>). This has
2344 now been fixed by use of a mutex on systems without thread-safe locales,
2345 and the problem just doesn't come up on those with thread-safe locales.
2349 Errors while compiling a regex character class could sometime trigger an
2351 L<[perl #132163]|https://rt.perl.org/Ticket/Display.html?id=132163>
2355 =head1 Acknowledgements
2357 Perl 5.28.0 represents approximately 12 months of development since Perl
2358 5.26.0 and contains approximately 730,000 lines of changes across 2,200
2359 files from 77 authors.
2361 Excluding auto-generated files, documentation and release tools, there were
2362 approximately 580,000 lines of changes to 1,300 .pm, .t, .c and .h files.
2364 Perl continues to flourish into its fourth decade thanks to a vibrant
2365 community of users and developers. The following people are known to have
2366 contributed the improvements that became Perl 5.28.0:
2368 Aaron Crane, Abigail, Ævar Arnfjörð Bjarmason, Alberto Simões, Alexandr
2369 Savca, Andrew Fresh, Andy Dougherty, Andy Lester, Aristotle Pagaltzis, Ask
2370 Bjørn Hansen, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari
2371 Mannsåker, Dan Collins, Daniel Dragan, David Cantrell, David Mitchell,
2372 Dmitry Ulanov, Dominic Hargreaves, E. Choroba, Eric Herman, Eugen Konkov,
2373 Father Chrysostomos, Gene Sullivan, George Hartzell, Graham Knop, Harald
2374 Jörg, H.Merijn Brand, Hugo van der Sanden, Jacques Germishuys, James E
2375 Keenan, Jarkko Hietaniemi, Jerry D. Hedden, J. Nick Koston, John Lightsey,
2376 John Peacock, John P. Linderman, John SJ Anderson, Karen Etheridge, Karl
2377 Williamson, Ken Brown, Ken Cotterill, Leon Timmermans, Lukas Mai, Marco
2378 Fontani, Marc-Philip Werner, Matthew Horsfall, Neil Bowers, Nicholas Clark,
2379 Nicolas R., Niko Tyni, Pali, Paul Marquess, Peter John Acklam, Reini Urban,
2380 Renee Baecker, Ricardo Signes, Robin Barker, Sawyer X, Scott Lanning, Sergey
2381 Aleynikov, Shirakata Kentaro, Shoichi Kaji, Slaven Rezic, Smylers, Steffen
2382 Müller, Steve Hay, Sullivan Beck, Thomas Sibley, Todd Rinaldo, Tomasz
2383 Konojacki, Tom Hukins, Tom Wyant, Tony Cook, Vitali Peil, Yves Orton,
2386 The list above is almost certainly incomplete as it is automatically
2387 generated from version control history. In particular, it does not include
2388 the names of the (very much appreciated) contributors who reported issues to
2389 the Perl bug tracker.
2391 Many of the changes included in this version originated in the CPAN modules
2392 included in Perl's core. We're grateful to the entire CPAN community for
2393 helping Perl to flourish.
2395 For a more complete list of all of Perl's historical contributors, please
2396 see the F<AUTHORS> file in the Perl source distribution.
2398 =head1 Reporting Bugs
2400 If you find what you think is a bug, you might check the perl bug database
2401 at L<https://rt.perl.org/> . There may also be information at
2402 L<http://www.perl.org/> , the Perl Home Page.
2404 If you believe you have an unreported bug, please run the L<perlbug> program
2405 included with your release. Be sure to trim your bug down to a tiny but
2406 sufficient test case. Your bug report, along with the output of C<perl -V>,
2407 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
2409 If the bug you are reporting has security implications which make it
2410 inappropriate to send to a publicly archived mailing list, then see
2411 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
2412 for details of how to report the issue.
2416 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
2417 you can do so by running the C<perlthanks> program:
2421 This will send an email to the Perl 5 Porters list with your show of thanks.
2425 The F<Changes> file for an explanation of how to view exhaustive details on
2428 The F<INSTALL> file for how to build Perl.
2430 The F<README> file for general stuff.
2432 The F<Artistic> and F<Copying> files for copyright information.