5 perldelta - what is new for perl v5.22.0
9 This document describes differences between the 5.20.0 release and the 5.22.0
12 If you are upgrading from an earlier release such as 5.18.0, first read
13 L<perl5200delta>, which describes differences between 5.18.0 and 5.20.0.
15 =head1 Core Enhancements
17 =head2 New bitwise operators
19 A new experimental facility has been added that makes the four standard
20 bitwise operators (C<& | ^ ~>) treat their operands consistently as
21 numbers, and introduces four new dotted operators (C<&. |. ^. ~.>) that
22 treat their operands consistently as strings. The same applies to the
23 assignment variants (C<&= |= ^= &.= |.= ^.=>).
25 To use this, enable the "bitwise" feature and disable the
26 "experimental::bitwise" warnings category. See L<perlop/Bitwise String
27 Operators> for details.
28 L<[perl #123466]|https://rt.perl.org/Ticket/Display.html?id=123466>.
30 =head2 New double-diamond operator
32 C<<< <<>> >>> is like C<< <> >> but uses three-argument C<open> to open
33 each file in C<@ARGV>. This means that each element of C<@ARGV> will be treated
34 as an actual file name, and C<"|foo"> won't be treated as a pipe open.
36 =head2 New \b boundaries in regular expressions
40 C<gcb> stands for Grapheme Cluster Boundary. It is a Unicode property
41 that finds the boundary between sequences of characters that look like a
42 single character to a native speaker of a language. Perl has long had
43 the ability to deal with these through the C<\X> regular escape
44 sequence. Now, there is an alternative way of handling these. See
45 L<perlrebackslash/\b{}, \b, \B{}, \B> for details.
49 C<wb> stands for Word Boundary. It is a Unicode property
50 that finds the boundary between words. This is similar to the plain
51 C<\b> (without braces) but is more suitable for natural language
52 processing. It knows, for example, that apostrophes can occur in the
53 middle of words. See L<perlrebackslash/\b{}, \b, \B{}, \B> for details.
57 C<sb> stands for Sentence Boundary. It is a Unicode property
58 to aid in parsing natural language sentences.
59 See L<perlrebackslash/\b{}, \b, \B{}, \B> for details.
61 =head2 C<no re> covers more and is lexical
63 Previously running C<no re> would only turn off a few things. Now it
64 turns off all the enabled things. For example, previously, you
65 couldn't turn off debugging, once enabled, inside the same block.
67 =head2 Non-Capturing Regular Expression Flag
69 Regular expressions now support a C</n> flag that disables capturing
70 and filling in C<$1>, C<$2>, etc... inside of groups:
72 "hello" =~ /(hi|hello)/n; # $1 is not set
74 This is equivalent to putting C<?:> at the beginning of every capturing group.
76 See L<perlre/"n"> for more information.
78 =head2 C<use re 'strict'>
80 This applies stricter syntax rules to regular expression patterns
81 compiled within its scope, which hopefully will alert you to typos and
82 other unintentional behavior that backwards-compatibility issues prevent
83 us from doing in normal regular expression compilations. Because the
84 behavior of this is subject to change in future Perl releases as we gain
85 experience, using this pragma will raise a category
86 C<experimental::re_strict> warning.
87 See L<'strict' in re|re/'strict' mode>.
89 =head2 Unicode 7.0 (with correction) is now supported
91 For details on what is in this release, see
92 L<http://www.unicode.org/versions/Unicode7.0.0/>.
93 The version of Unicode 7.0 that comes with Perl includes
94 a correction dealing with glyph shaping in Arabic
95 (see L<http://www.unicode.org/errata/#current_errata>).
98 =head2 S<C<use locale>> can restrict which locale categories are affected
100 It is now possible to pass a parameter to S<C<use locale>> to specify
101 a subset of locale categories to be locale-aware, with the remaining
102 ones unaffected. See L<perllocale/The "use locale" pragma> for details.
104 =head2 Perl now supports POSIX 2008 locale currency additions
106 On platforms that are able to handle POSIX.1-2008, the
108 L<C<POSIX::localeconv()>|perllocale/The localeconv function>
109 includes the international currency fields added by that version of the
110 POSIX standard. These are
111 C<int_n_cs_precedes>,
112 C<int_n_sep_by_space>,
114 C<int_p_cs_precedes>,
115 C<int_p_sep_by_space>,
119 =head2 Better heuristics on older platforms for determining locale UTF8ness
121 On platforms that implement neither the C99 standard nor the POSIX 2001
122 standard, determining if the current locale is UTF8 or not depends on
123 heuristics. These are improved in this release.
125 =head2 Aliasing via reference
127 Variables and subroutines can now be aliased by assigning to a reference:
132 Or by using a backslash before a C<foreach> iterator variable, which is
133 perhaps the most useful idiom this feature provides:
135 foreach \%hash (@array_of_hash_refs) { ... }
137 This feature is experimental and must be enabled via C<use feature
138 'refaliasing'>. It will warn unless the C<experimental::refaliasing>
139 warnings category is disabled.
141 See L<perlref/Assigning to References>
143 =head2 C<prototype> with no arguments
145 C<prototype()> with no arguments now infers C<$_>.
146 L<[perl #123514]|https://rt.perl.org/Ticket/Display.html?id=123514>.
148 =head2 New "const" subroutine attribute
150 The "const" attribute can be applied to an anonymous subroutine. It
151 causes the new sub to be executed immediately whenever one is created
152 (i.e. when the C<sub> expression is evaluated). Its value is captured
153 and used to create a new constant subroutine that is returned. This
154 feature is experimental. See L<perlsub/Constant Functions>.
156 =head2 C<fileno> now works on directory handles
158 When the relevant support is available in the operating system, the
159 C<fileno> builtin now works on directory handles, yielding the
160 underlying file descriptor in the same way as for filehandles. On
161 operating systems without such support, C<fileno> on a directory handle
162 continues to return the undefined value, as before, but also sets C<$!> to
163 indicate that the operation is not supported.
165 Currently, this uses either a C<dd_fd> member in the OS C<DIR>
166 structure, or a C<dirfd(3)> function as specified by POSIX.1-2008.
168 =head2 List form of pipe open implemented for Win32
170 The list form of pipe:
172 open my $fh, "-|", "program", @arguments;
174 is now implemented on Win32. It has the same limitations as C<system
175 LIST> on Win32, since the Win32 API doesn't accept program arguments
178 =head2 C<close> now sets C<$!>
180 When an I/O error occurs, the fact that there has been an error is recorded
181 in the handle. C<close> returns false for such a handle. Previously, the
182 value of C<$!> would be untouched by C<close>, so the common convention of
183 writing S<C<close $fh or die $!>> did not work reliably. Now the handle
184 records the value of C<$!>, too, and C<close> restores it.
186 =head2 Assignment to list repetition
188 C<(...) x ...> can now be used within a list that is assigned to, as long
189 as the left-hand side is a valid lvalue. This allows S<C<(undef,undef,$foo)
190 = that_function()>> to be written as S<C<((undef)x2, $foo) = that_function()>>.
192 =head2 Infinity and NaN (not-a-number) handling improved
194 Floating point values are able to hold the special values infinity (also
195 -infinity), and NaN (not-a-number). Now we more robustly recognize and
196 propagate the value in computations, and on output normalize them to C<Inf> and
199 See also the L<POSIX> enhancements.
201 =head2 Floating point parsing has been improved
203 Parsing and printing of floating point values has been improved.
205 As a completely new feature, hexadecimal floating point literals
206 (like C<0x1.23p-4>) are now supported, and they can be output with
209 =head2 Packing infinity or not-a-number into a character is now fatal
211 Before, when trying to pack infinity or not-a-number into a
212 (signed) character, Perl would warn, and assumed you tried to
213 pack C<< 0xFF >>; if you gave it as an argument to C<< chr >>,
214 C<< U+FFFD >> was returned.
216 But now, all such actions (C<< pack >>, C<< chr >>, and C<< print '%c' >>)
217 result in a fatal error.
219 =head2 Experimental C Backtrace API
221 Perl now supports (via a C level API) retrieving
222 the C level backtrace (similar to what symbolic debuggers like gdb do).
224 The backtrace returns the stack trace of the C call frames,
225 with the symbol names (function names), the object names (like "perl"),
226 and if it can, also the source code locations (file:line).
228 The supported platforms are Linux and OS X (some *BSD might work at
229 least partly, but they have not yet been tested).
231 The feature needs to be enabled with C<Configure -Dusecbacktrace>.
233 See L<perlhacktips/"C backtrace"> for more information.
237 =head2 Perl is now compiled with -fstack-protector-strong if available
239 Perl has been compiled with the anti-stack-smashing option
240 C<-fstack-protector> since 5.10.1. Now Perl uses the newer variant
241 called C<-fstack-protector-strong>, if available.
243 =head2 The L<Safe> module could allow outside packages to be replaced
245 Critical bugfix: outside packages could be replaced. L<Safe> has
246 been patched to 2.38 to address this.
248 =head2 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available
250 The 'code hardening' option called C<_FORTIFY_SOURCE>, available in
251 gcc 4.*, is now always used for compiling Perl, if available.
253 Note that this isn't necessarily a huge step since in many platforms
254 the step had already been taken several years ago: many Linux
255 distributions (like Fedora) have been using this option for Perl,
256 and OS X has enforced the same for many years.
258 =head1 Incompatible Changes
260 =head2 Subroutine signatures moved before attributes
262 The experimental sub signatures feature, as introduced in 5.20, parsed
263 signatures after attributes. In this release, the positioning has been
264 moved such that signatures occur after the subroutine name (if any) and
265 before the attribute list (if any).
267 =head2 C<&> and C<\&> prototypes accepts only subs
269 The C<&> prototype character now accepts only anonymous subs (C<sub
270 {...}>), things beginning with C<\&>, or an explicit C<undef>. Formerly
271 it erroneously also allowed references to arrays, hashes, and lists.
272 L<[perl #4539]|https://rt.perl.org/Ticket/Display.html?id=4539>.
273 L<[perl #123062]|https://rt.perl.org/Ticket/Display.html?id=123062>.
274 L<[perl #123062]|https://rt.perl.org/Ticket/Display.html?id=123475>.
276 In addition, the C<\&> prototype was allowing subroutine calls, whereas
277 now it only allows subroutines: C<&foo> is still permitted as an argument,
278 while C<&foo()> and C<foo()> no longer are.
279 L<[perl #77860]|https://rt.perl.org/Ticket/Display.html?id=77860>.
281 =head2 C<use encoding> is now lexical
283 The L<encoding> pragma's effect is now limited to lexical scope. This
284 pragma is deprecated, but in the meantime, it could adversely affect
285 unrelated modules that are included in the same program.
287 =head2 List slices returning empty lists
289 List slices return an empty list now only if the original list was empty
290 (or if there are no indices). Formerly, a list slice would return an empty
291 list if all indices fell outside the original list; now it returns a list
293 L<[perl #114498]|https://rt.perl.org/Ticket/Display.html?id=114498>.
295 =head2 C<\N{}> with a sequence of multiple spaces is now a fatal error
297 E.g. C<\N{TOO MANY SPACES}> or C<\N{TRAILING SPACE }>.
298 This has been deprecated since v5.18.
300 =head2 S<C<use UNIVERSAL '...'>> is now a fatal error
302 Importing functions from C<UNIVERSAL> has been deprecated since v5.12, and
303 is now a fatal error. S<C<"use UNIVERSAL">> without any arguments is still
306 =head2 In double-quotish C<\cI<X>>, I<X> must now be a printable ASCII character
308 In prior releases, failure to do this raised a deprecation warning.
310 =head2 Splitting the tokens C<(?> and C<(*> in regular expressions is
311 now a fatal compilation error.
313 These had been deprecated since v5.18.
315 =head2 C<qr/foo/x> now ignores all Unicode pattern white space
317 The C</x> regular expression modifier allows the pattern to contain
318 white space and comments (both of which are ignored) for improved
319 readability. Until now, not all the white space characters that Unicode
320 designates for this purpose were handled. The additional ones now
324 U+200E LEFT-TO-RIGHT MARK
325 U+200F RIGHT-TO-LEFT MARK
326 U+2028 LINE SEPARATOR
327 U+2029 PARAGRAPH SEPARATOR
329 The use of these characters with C</x> outside bracketed character
330 classes and when not preceded by a backslash has raised a deprecation
331 warning since v5.18. Now they will be ignored.
333 =head2 Comment lines within S<C<(?[ ])>> are now ended only by a C<\n>
335 S<C<(?[ ])>> is an experimental feature, introduced in v5.18. It operates
336 as if C</x> is always enabled. But there was a difference: comment
337 lines (following a C<#> character) were terminated by anything matching
338 C<\R> which includes all vertical whitespace, such as form feeds. For
339 consistency, this is now changed to match what terminates comment lines
340 outside S<C<(?[ ])>>, namely a C<\n> (even if escaped), which is the
341 same as what terminates a heredoc string and formats.
343 =head2 C<(?[...])> operators now follow standard Perl precedence
345 This experimental feature allows set operations in regular expression patterns.
346 Prior to this, the intersection operator had the same precedence as the other
347 binary operators. Now it has higher precedence. This could lead to different
348 outcomes than existing code expects (though the documentation has always noted
349 that this change might happen, recommending fully parenthesizing the
350 expressions). See L<perlrecharclass/Extended Bracketed Character Classes>.
352 =head2 Omitting C<%> and C<@> on hash and array names is no longer permitted
354 Really old Perl let you omit the C<@> on array names and the C<%> on hash
355 names in some spots. This has issued a deprecation warning since Perl
356 5.000, and is no longer permitted.
358 =head2 C<"$!"> text is now in English outside C<"use locale"> scope
360 Previously, the text, unlike almost everything else, always came out
361 based on the current underlying locale of the program. (Also affected
362 on some systems is C<"$^E>".) For programs that are unprepared to
363 handle locale, this can cause garbage text to be displayed. It's better
364 to display text that is translatable via some tool than garbage text
365 which is much harder to figure out.
367 =head2 C<"$!"> text will be returned in UTF-8 when appropriate
369 The stringification of C<$!> and C<$^E> will have the UTF-8 flag set
370 when the text is actually non-ASCII UTF-8. This will enable programs
371 that are set up to be locale-aware to properly output messages in the
372 user's native language. Code that needs to continue the 5.20 and
373 earlier behavior can do the stringification within the scopes of both
374 S<C<'use bytes'>> and S<C<'use locale ":messages">>. No other Perl
376 be affected by locale; only C<$!> and C<$^E> stringification. The
377 'bytes' pragma causes the UTF-8 flag to not be set, just as in previous
378 Perl releases. This resolves
379 L<[perl #112208]|https://rt.perl.org/Ticket/Display.html?id=112208>.
381 =head2 Support for C<?PATTERN?> without explicit operator has been removed
383 Starting regular expressions matching only once directly with the
384 question mark delimiter is now a syntax error, so that the question mark
385 can be available for use in new operators. Write C<m?PATTERN?> instead,
386 explicitly using the C<m> operator: the question mark delimiter still
387 invokes match-once behaviour.
389 =head2 C<defined(@array)> and C<defined(%hash)> are now fatal errors
391 These have been deprecated since v5.6.1 and have raised deprecation
392 warnings since v5.16.
394 =head2 Using a hash or an array as a reference are now fatal errors
396 For example, C<< %foo->{"bar"} >> now causes a fatal compilation
397 error. These have been deprecated since before v5.8, and have raised
398 deprecation warnings since then.
400 =head2 Changes to the C<*> prototype
402 The C<*> character in a subroutine's prototype used to allow barewords to take
403 precedence over most, but not all, subroutine names. It was never
404 consistent and exhibited buggy behaviour.
406 Now it has been changed, so subroutines always take precedence over barewords,
407 which brings it into conformity with similarly prototyped built-in functions:
411 splat(foo); # now always splat(foo())
412 splat(bar); # still splat('bar') as before
413 close(foo); # close(foo())
414 close(bar); # close('bar')
418 =head2 Setting C<${^ENCODING}> to anything but C<undef>
420 This variable allows Perl scripts to be written in a non-ASCII,
421 non-UTF-8 encoding. However, it affects all modules globally, leading
422 to wrong answers and segmentation faults. New scripts should be written
423 in UTF-8; old scripts should be converted to UTF-8, which is easily done
424 with the L<encoding> pragma.
426 =head2 Use of non-graphic characters in single-character variable names
428 The syntax for single-character variable names is more lenient than
429 for longer variable names, allowing the one-character name to be a
430 punctuation character or even invisible (a non-graphic). Perl v5.20
431 deprecated the ASCII-range controls as such a name. Now, all
432 non-graphic characters that formerly were allowed are deprecated.
433 The practical effect of this occurs only when not under C<S<"use
434 utf8">>, and affects just the C1 controls (code points 0x80 through
435 0xFF), NO-BREAK SPACE, and SOFT HYPHEN.
437 =head2 Inlining of C<sub () { $var }> with observable side-effects
439 In many cases Perl makes S<C<sub () { $var }>> into an inlinable constant
440 subroutine, capturing the value of C<$var> at the time the C<sub> expression
441 is evaluated. This can break the closure behaviour in those cases where
442 C<$var> is subsequently modified, since the subroutine won't return the
443 changed value. (Note that this all only applies to anonymous subroutines
444 with an empty prototype (C<sub ()>).)
446 This usage is now deprecated in those cases where the variable could be
447 modified elsewhere. Perl detects those cases and emits a deprecation
448 warning. Such code will likely change in the future and stop producing a
451 If your variable is only modified in the place where it is declared, then
452 Perl will continue to make the sub inlinable with no warnings.
456 return sub () { $var }; # fine
459 sub make_constant_deprecated {
462 return sub () { $var }; # deprecated
465 sub make_constant_deprecated2 {
467 log_that_value($var); # could modify $var
468 return sub () { $var }; # deprecated
471 In the second example above, detecting that C<$var> is assigned to only once
472 is too hard to detect. That it happens in a spot other than the C<my>
473 declaration is enough for Perl to find it suspicious.
475 This deprecation warning happens only for a simple variable for the body of
476 the sub. (A C<BEGIN> block or C<use> statement inside the sub is ignored,
477 because it does not become part of the sub's body.) For more complex
478 cases, such as S<C<sub () { do_something() if 0; $var }>> the behaviour has
479 changed such that inlining does not happen if the variable is modifiable
480 elsewhere. Such cases should be rare.
482 =head2 Use of multiple /x regexp modifiers
484 It is now deprecated to say something like any of the following:
490 That is, now C<x> should only occur once in any string of contiguous
491 regular expression pattern modifiers. We do not believe there are any
492 occurrences of this in all of CPAN. This is in preparation for a future
493 Perl release having C</xx> mean to allow white-space for readability in
494 bracketed character classes (those enclosed in square brackets:
497 =head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now
500 This non-graphic character is essentially indistinguishable from a
501 regular space, and so should not be allowed. See
502 L<charnames/CUSTOM ALIASES>.
504 =head2 A literal C<"{"> should now be escaped in a pattern
506 If you want a literal left curly bracket (also called a left brace) in a
507 regular expression pattern, you should now escape it by either
508 preceding it with a backslash (C<"\{">) or enclosing it within square
509 brackets C<"[{]">, or by using C<\Q>; otherwise a deprecation warning
510 will be raised. This was first announced as forthcoming in the v5.16
511 release; it will allow future extensions to the language to happen.
513 =head2 Making all warnings fatal is discouraged
515 The documentation for L<fatal warnings|warnings/Fatal Warnings> notes that
516 C<< use warnings FATAL => 'all' >> is discouraged and provides stronger
517 language about the risks of fatal warnings in general.
519 =head1 Performance Enhancements
525 If a method or class name is known at compile time, a hash is precomputed
526 to speed up run-time method lookup. Also, compound method names like
527 C<SUPER::new> are parsed at compile time, to save having to parse them at
532 Array and hash lookups (especially nested ones) that use only constants
533 or simple variables as keys, are now considerably faster. See
534 L</Internal Changes> for more details.
538 C<(...)x1>, C<("constant")x0> and C<($scalar)x0> are now optimised in list
539 context. If the right-hand argument is a constant 1, the repetition
540 operator disappears. If the right-hand argument is a constant 0, the whole
541 expression is optimised to the empty list, so long as the left-hand
542 argument is a simple scalar or constant. C<(foo())x0> is not optimised.
546 C<substr> assignment is now optimised into 4-argument C<substr> at the end
547 of a subroutine (or as the argument to C<return>). Previously, this
548 optimisation only happened in void context.
552 Assignment to lexical variables is now more often optimised away. For
554 C<$lexical = chr $foo>, the C<chr> operator writes directly to the lexical
555 variable instead of returning a value that gets copied. This optimisation
556 has been extended to C<split>, C<x> and C<vec> on the right-hand side. It
557 has also been made to work with state variable initialization.
561 In C<"\L...">, C<"\Q...">, etc., the extra "stringify" op is now optimised
562 away, making these just as fast as C<lcfirst>, C<quotemeta>, etc.
566 Assignment to an empty list is now sometimes faster. In particular, it
567 never calls C<FETCH> on tied arguments on the right-hand side, whereas it
572 C<length> is up to 20% faster for non-magical/non-tied scalars containing a
573 string if it is a non-utf8 string or if is in scope of C<use bytes>.
577 On most perl builds with 64 bit integers, non-magical/non-tied scalars
578 that contain only a floating point value now use between 8 and 32 less bytes
579 of memory, depending on OS.
583 In C<@array = split>, the assignment can be optimized away with C<split>
584 writing directly to the array. This optimisation was happening only for
585 package arrays other than C<@_>, and only sometimes. Now this
586 optimisation happens almost all the time.
590 C<join> is now subject to constant folding. So for example
591 C<join "-", "a", "b"> is converted at compile-time to C<"a-b">.
592 Moreover, C<join> with a scalar or constant for the separator and a
593 single-item list to join is simplified to a stringification. The
594 separator doesn't even get evaluated.
598 C<qq(@array)> is implemented using two ops: a stringify op and a join op.
599 If the C<qq> contains nothing but a single array, the stringification is
604 S<C<our $var>> and S<C<our($s,@a,%h)>> in void context are no longer evaluated at
605 run time. Even a whole sequence of S<C<our $foo;>> statements will simply be
606 skipped over. The same applies to C<state> variables.
610 Many internal functions have been refactored to improve performance and reduce
611 their memory footprints.
612 L<[perl #121436]|https://rt.perl.org/Ticket/Display.html?id=121436>
613 L<[perl #121906]|https://rt.perl.org/Ticket/Display.html?id=121906>
614 L<[perl #121969]|https://rt.perl.org/Ticket/Display.html?id=121969>
618 C<-T> and C<-B> filetests will return sooner when an empty file is detected.
619 L<[perl #121489]|https://rt.perl.org/Ticket/Display.html?id=121489>
623 Hash lookups where the key is a constant are faster.
627 Subroutines with an empty prototype and bodies containing just C<undef> are now
628 eligible for inlining.
629 L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728>
633 Subroutines in packages no longer need to be stored in typeglobs:
634 declaring a subroutine will now put a simple sub reference directly in the
635 stash if possible, saving memory. The typeglob still notionally exists,
636 so accessing it will cause the stash entry to be upgraded to a typeglob
637 (i.e. this is just an internal implementation detail).
638 This optimization does not currently apply to XSUBs or exported
639 subroutines, and method calls will undo it, since they cache things in
641 L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
645 The functions C<utf8::native_to_unicode()> and C<utf8::unicode_to_native()>
646 (see L<utf8>) are now optimized out on ASCII platforms. There is now not even
647 a minimal performance hit in writing code portable between ASCII and EBCDIC
652 Win32 Perl uses 8 KB less of per-process memory than before for every perl
653 process, because some data is now memory mapped from disk and shared
654 between perl processes from the same perl binary.
658 =head1 Modules and Pragmata
660 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
661 go here. If Module::CoreList is updated, generate an initial draft of the
662 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
663 for important changes should then be added by hand. In an ideal world,
664 dual-life modules would have a F<Changes> file that could be cribbed.
666 [ Within each section, list entries as a =item entry ]
668 =head2 New Modules and Pragmata
678 =head2 Updated Modules and Pragmata
684 L<XXX> has been upgraded from version A.xx to B.yy.
688 =head2 Removed Modules and Pragmata
700 =head2 New Documentation
702 =head3 L<perlunicook>
704 This document, by Tom Christiansen, provides examples of handling Unicode in
707 =head2 Changes to Existing Documentation
715 Note that C<SvSetSV> doesn't do set magic.
719 C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
722 L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869>
726 Clarify where C<NUL> may be embedded or is required to terminate a string.
730 Previously missing documentation due to formatting errors are now included.
734 Entries are now organized into groups rather than by file where they are found.
738 Alphabetical sorting of entries is now handled by the POD generator to make
739 entries easier to find when scanning.
749 The syntax of single-character variable names has been brought
750 up-to-date and more fully explained.
760 This document has been significantly updated in the light of recent
761 improvements to EBCDIC support.
771 Mention that C<study()> is currently a no-op.
775 Calling C<delete> or C<exists> on array values is now described as "strongly
776 discouraged" rather than "deprecated".
780 Improve documentation of C<< our >>.
784 C<-l> now notes that it will return false if symlinks aren't supported by the
787 L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
791 Note that C<exec LIST> and C<system LIST> may fall back to the shell on
792 Win32. Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object
793 syntax will reliably avoid using the shell.
795 This has also been noted in L<perlport>.
797 L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046>
807 The OOK example has been updated to account for COW changes and a change in the
808 storage of the offset.
812 Details on C level symbols and libperl.t added.
816 Information on Unicode handling has been added
820 Information on EBCDIC handling has been added
824 =head3 L<perlhacktips>
830 Documentation has been added illustrating the perils of assuming the contents
831 of static memory pointed to by the return values of Perl wrappers for C library
832 functions doesn't change.
836 Recommended replacements for tmpfile, atoi, strtol, and strtoul added.
840 Updated documentation for the C<test.valgrind> C<make> target.
842 L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
846 =head3 L<perlmodstyle>
852 Instead of pointing to the module list, we are now pointing to
853 L<PrePAN|http://prepan.org/>.
863 We now have a code of conduct for the I<< p5p >> mailing list, as documented
864 in L<< perlpolicy/STANDARDS OF CONDUCT >>.
868 The conditions for marking an experimental feature as non-experimental are now
879 Out-of-date VMS-specific information has been fixed/simplified.
883 Notes about EBCDIC have been added.
893 The C</x> modifier has been clarified to note that comments cannot be continued
894 onto the next line by escaping them.
898 =head3 L<perlrebackslash>
904 Added documentation of C<\b{sb}>, C<\b{wb}>, C<\b{gcb}>, and C<\b{g}>.
908 =head3 L<perlrecharclass>
914 Clarifications have been added to L<perlrecharclass/Character Ranges>
915 to the effect that Perl guarantees that C<[A-Z]>, C<[a-z]>, C<[0-9]> and
916 any subranges thereof in regular expression bracketed character classes
917 are guaranteed to match exactly what a naive English speaker would
918 expect them to match, even on platforms (such as EBCDIC) where special
919 handling is required to accomplish this.
923 The documentation of Bracketed Character Classes has been expanded to cover the
924 improvements in C<qr/[\N{named sequence}]/> (see under L</Selected Bug Fixes>).
934 Comments added on algorithmic complexity and tied hashes.
944 An ambiguity in the documentation of the C<...> statement has been corrected.
945 L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661>
949 The empty conditional in C<< for >> and C<< while >> is now documented
954 =head3 L<perlunicode>
960 This has had extensive revisions to bring it up-to-date with current
961 Unicode support and to make it more readable.
965 =head3 L<perluniintro>
971 Advice for how to make sure your strings and regular expression patterns are
972 interpreted as Unicode has been updated.
982 Further clarify version number representations and usage.
992 Out-of-date and/or incorrect material has been removed.
996 Updated documentation on environment and shell interaction in VMS.
1006 Added a discussion of locale issues in XS code.
1012 The following additions or changes have been made to diagnostic output,
1013 including warnings and fatal error messages. For the complete list of
1014 diagnostic messages, see L<perldiag>.
1016 =head2 New Diagnostics
1024 L<Bad symbol for scalar|perldiag/"Bad symbol for scalar">
1026 (P) An internal request asked to add a scalar entry to something that
1027 wasn't a symbol table entry.
1031 L<Can't use a hash as a reference|perldiag/"Can't use a hash as a reference">
1033 (F) You tried to use a hash as a reference, as in
1034 C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl E<lt>= 5.6.1
1035 used to allow this syntax, but shouldn't have.
1039 L<Can't use an array as a reference|perldiag/"Can't use an array as a reference">
1041 (F) You tried to use an array as a reference, as in
1042 C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl E<lt>= 5.6.1 used to
1043 allow this syntax, but shouldn't have.
1047 L<Can't use 'defined(@array)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(@array)' (Maybe you should just omit the defined()?)">
1049 (F) C<defined()> is not useful on arrays because it
1050 checks for an undefined I<scalar> value. If you want to see if the
1051 array is empty, just use S<C<if (@array) { # not empty }>> for example.
1055 L<Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)">
1057 (F) C<defined()> is not usually right on hashes.
1059 Although S<C<defined %hash>> is false on a plain not-yet-used hash, it
1060 becomes true in several non-obvious circumstances, including iterators,
1061 weak references, stash names, even remaining true after S<C<undef %hash>>.
1062 These things make S<C<defined %hash>> fairly useless in practice, so it now
1063 generates a fatal error.
1065 If a check for non-empty is what you wanted then just put it in boolean
1066 context (see L<perldata/Scalar values>):
1072 If you had S<C<defined %Foo::Bar::QUUX>> to check whether such a package
1073 variable exists then that's never really been reliable, and isn't
1074 a good way to enquire about the features of a package, or whether
1079 L<Cannot chr %f|perldiag/"Cannot chr %f">
1081 (F) You passed an invalid number (like an infinity or not-a-number) to
1086 L<Cannot compress %f in pack|perldiag/"Cannot compress %f in pack">
1088 (F) You tried converting an infinity or not-a-number to an unsigned
1089 character, which makes no sense.
1093 L<Cannot pack %f with '%c'|perldiag/"Cannot pack %f with '%c'">
1095 (F) You tried converting an infinity or not-a-number to a character,
1096 which makes no sense.
1100 L<Cannot print %f with '%c'|perldiag/"Cannot printf %f with '%c'">
1102 (F) You tried printing an infinity or not-a-number as a character (C<%c>),
1103 which makes no sense. Maybe you meant C<'%s'>, or just stringifying it?
1107 L<charnames alias definitions may not contain a sequence of multiple spaces|perldiag/"charnames alias definitions may not contain a sequence of multiple spaces">
1109 (F) You defined a character name which had multiple space
1110 characters in a row. Change them to single spaces. Usually these
1111 names are defined in the C<:alias> import argument to C<use charnames>, but
1112 they could be defined by a translator installed into C<$^H{charnames}>.
1113 See L<charnames/CUSTOM ALIASES>.
1117 L<charnames alias definitions may not contain trailing white-space|perldiag/"charnames alias definitions may not contain trailing white-space">
1119 (F) You defined a character name which ended in a space
1120 character. Remove the trailing space(s). Usually these names are
1121 defined in the C<:alias> import argument to C<use charnames>, but they
1122 could be defined by a translator installed into C<$^H{charnames}>.
1123 See L<charnames/CUSTOM ALIASES>.
1127 L<:const is not permitted on named subroutines|perldiag/":const is not permitted on named subroutines">
1129 (F) The "const" attribute causes an anonymous subroutine to be run and
1130 its value captured at the time that it is cloned. Names subroutines are
1131 not cloned like this, so the attribute does not make sense on them.
1135 L<Hexadecimal float: internal error|perldiag/"Hexadecimal float: internal error">
1137 (F) Something went horribly bad in hexadecimal float handling.
1141 L<Hexadecimal float: unsupported long double format|perldiag/"Hexadecimal float: unsupported long double format">
1143 (F) You have configured Perl to use long doubles but
1144 the internals of the long double format are unknown,
1145 therefore the hexadecimal float output is impossible.
1149 L<Illegal suidscript|perldiag/"Illegal suidscript">
1151 (F) The script run under suidperl was somehow illegal.
1155 L<In '(?...)', the '(' and '?' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/">
1157 (F) The two-character sequence C<"(?"> in
1158 this context in a regular expression pattern should be an
1159 indivisible token, with nothing intervening between the C<"(">
1160 and the C<"?">, but you separated them.
1164 L<In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/">
1166 (F) The two-character sequence C<"(*"> in
1167 this context in a regular expression pattern should be an
1168 indivisible token, with nothing intervening between the C<"(">
1169 and the C<"*">, but you separated them.
1173 L<Invalid quantifier in {,} in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Invalid quantifier in {,} in regex; marked by <-- HERE in m/%s/">
1175 (F) The pattern looks like a {min,max} quantifier, but the min or max could not
1176 be parsed as a valid number - either it has leading zeroes, or it represents
1177 too big a number to cope with. The S<<-- HERE> shows where in the regular
1178 expression the problem was discovered. See L<perlre>.
1188 L<\C is deprecated in regex|perldiag/"\C is deprecated in regex; marked by <-- HERE in m/%s/">
1190 (D deprecated) The C<< /\C/ >> character class was deprecated in v5.20, and
1191 now emits a warning. It is intended that it will become an error in v5.24.
1192 This character class matches a single byte even if it appears within a
1193 multi-byte character, breaks encapsulation, and can corrupt utf8
1198 L<'%s' is an unknown bound type in regex|perldiag/"'%s' is an unknown bound type in regex; marked by <-- HERE in m/%s/">
1200 You used C<\b{...}> or C<\B{...}> and the C<...> is not known to
1201 Perl. The current valid ones are given in
1202 L<perlrebackslash/\b{}, \b, \B{}, \B>.
1206 L<"%s" is more clearly written simply as "%s" in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"%s" is more clearly written simply as "%s" in regex; marked by <-- HERE in mE<sol>%sE<sol>>
1208 (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
1210 You specified a character that has the given plainer way of writing it,
1211 and which is also portable to platforms running with different character
1216 L<Argument "%s" treated as 0 in increment (++)|perldiag/"Argument "%s" treated
1217 as 0 in increment (++)">
1219 (W numeric) The indicated string was fed as an argument to the C<++> operator
1220 which expects either a number or a string matching C</^[a-zA-Z]*[0-9]*\z/>.
1221 See L<perlop/Auto-increment and Auto-decrement> for details.
1225 L<Both or neither range ends should be Unicode in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Both or neither range ends should be Unicode in regex; marked by <-- HERE in m/%s/">
1227 (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
1229 In a bracketed character class in a regular expression pattern, you
1230 had a range which has exactly one end of it specified using C<\N{}>, and
1231 the other end is specified using a non-portable mechanism. Perl treats
1232 the range as a Unicode range, that is, all the characters in it are
1233 considered to be the Unicode characters, and which may be different code
1234 points on some platforms Perl runs on. For example, C<[\N{U+06}-\x08]>
1235 is treated as if you had instead said C<[\N{U+06}-\N{U+08}]>, that is it
1236 matches the characters whose code points in Unicode are 6, 7, and 8.
1237 But that C<\x08> might indicate that you meant something different, so
1238 the warning gets raised.
1242 L<:const is experimental|perldiag/":const is experimental">
1244 (S experimental::const_attr) The "const" attribute is experimental.
1245 If you want to use the feature, disable the warning with C<no warnings
1246 'experimental::const_attr'>, but know that in doing so you are taking
1247 the risk that your code may break in a future Perl version.
1251 L<gmtime(%f) failed|perldiag/"gmtime(%f) failed">
1253 (W overflow) You called C<gmtime> with a number that it could not handle:
1254 too large, too small, or NaN. The returned value is C<undef>.
1258 L<Hexadecimal float: exponent overflow|perldiag/"Hexadecimal float: exponent overflow">
1260 (W overflow) The hexadecimal floating point has larger exponent
1261 than the floating point supports.
1265 L<Hexadecimal float: exponent underflow|perldiag/"Hexadecimal float: exponent underflow">
1267 (W overflow) The hexadecimal floating point has smaller exponent
1268 than the floating point supports.
1272 L<Hexadecimal float: mantissa overflow|perldiag/"Hexadecimal float: mantissa overflow">
1274 (W overflow) The hexadecimal floating point literal had more bits in
1275 the mantissa (the part between the 0x and the exponent, also known as
1276 the fraction or the significand) than the floating point supports.
1280 L<Hexadecimal float: precision loss|perldiag/"Hexadecimal float: precision loss">
1282 (W overflow) The hexadecimal floating point had internally more
1283 digits than could be output. This can be caused by unsupported
1284 long double formats, or by 64-bit integers not being available
1285 (needed to retrieve the digits under some configurations).
1289 L<localtime(%f) failed|perldiag/"localtime(%f) failed">
1291 (W overflow) You called C<localtime> with a number that it could not handle:
1292 too large, too small, or NaN. The returned value is C<undef>.
1296 L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing">
1298 (W numeric) You tried to execute the
1299 L<C<x>|perlop/Multiplicative Operators> repetition operator fewer than 0
1300 times, which doesn't make sense.
1304 L<NO-BREAK SPACE in a charnames alias definition is deprecated|perldiag/"NO-BREAK SPACE in a charnames alias definition is deprecated">
1306 (D deprecated) You defined a character name which contained a no-break
1307 space character. Change it to a regular space. Usually these names are
1308 defined in the C<:alias> import argument to C<use charnames>, but they
1309 could be defined by a translator installed into C<$^H{charnames}>. See
1310 L<charnames/CUSTOM ALIASES>.
1314 L<Non-finite repeat count does nothing|perldiag/"Non-finite repeat count does nothing">
1316 (W numeric) You tried to execute the
1317 L<C<x>|perlop/Multiplicative Operators> repetition operator C<Inf> (or
1318 C<-Inf>) or C<NaN> times, which doesn't make sense.
1322 L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">
1324 (S experimental::win32_perlio) The C<:win32> PerlIO layer is
1325 experimental. If you want to take the risk of using this layer,
1326 simply disable this warning:
1328 no warnings "experimental::win32_perlio";
1332 L<Ranges of ASCII printables should be some subset of "0-9", "A-Z", or "a-z" in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Ranges of ASCII printables should be some subset of "0-9", "A-Z", or "a-z" in regex; marked by <-- HERE in mE<sol>%sE<sol>">
1334 (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
1336 Stricter rules help to find typos and other errors. Perhaps you didn't
1337 even intend a range here, if the C<"-"> was meant to be some other
1338 character, or should have been escaped (like C<"\-">). If you did
1339 intend a range, the one that was used is not portable between ASCII and
1340 EBCDIC platforms, and doesn't have an obvious meaning to a casual
1343 [3-7] # OK; Obvious and portable
1344 [d-g] # OK; Obvious and portable
1345 [A-Y] # OK; Obvious and portable
1346 [A-z] # WRONG; Not portable; not clear what is meant
1347 [a-Z] # WRONG; Not portable; not clear what is meant
1348 [%-.] # WRONG; Not portable; not clear what is meant
1349 [\x41-Z] # WRONG; Not portable; not obvious to non-geek
1351 (You can force portability by specifying a Unicode range, which means that
1352 the endpoints are specified by
1353 L<C<\N{...}>|perlrecharclass/Character Ranges>, but the meaning may
1354 still not be obvious.)
1355 The stricter rules require that ranges that start or stop with an ASCII
1356 character that is not a control have all their endpoints be a literal
1357 character, and not some escape sequence (like C<"\x41">), and the ranges
1358 must be all digits, or all uppercase letters, or all lowercase letters.
1362 L<Ranges of digits should be from the same group in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Ranges of digits should be from the same group in regex; marked by <-- HERE in m/%s/">
1364 (W regexp) (only under C<S<use re 'strict'>> or within C<(?[...])>)
1366 Stricter rules help to find typos and other errors. You included a
1367 range, and at least one of the end points is a decimal digit. Under the
1368 stricter rules, when this happens, both end points should be digits in
1369 the same group of 10 consecutive digits.
1373 L<Redundant argument in %s|perldiag/Redundant argument in %s>
1375 (W redundant) You called a function with more arguments than other
1376 arguments you supplied indicated would be needed. Currently only
1377 emitted when a printf-type format required fewer arguments than were
1378 supplied, but might be used in the future for e.g. L<perlfunc/pack>.
1380 The warnings category C<< redundant >> is new. See also
1381 L<[perl #121025]|https://rt.perl.org/Ticket/Display.html?id=121025>.
1385 L<Use of \b{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale|perldiag/"Use of \b{} for non-UTF-8 locale is wrong. Assuming a UTF-8 locale">
1387 You are matching a regular expression using locale rules,
1388 and a Unicode boundary is being matched, but the locale is not a Unicode
1389 one. This doesn't make sense. Perl will continue, assuming a Unicode
1390 (UTF-8) locale, but the results could well be wrong except if the locale
1391 happens to be ISO-8859-1 (Latin1) where this message is spurious and can
1396 L<< Using E<sol>u for '%s' instead of E<sol>%s in regex; marked by E<lt>-- HERE in mE<sol>%sE<sol>|perldiag/"Using E<sol>u for '%s' instead of E<sol>%s in regex; marked by <-- HERE in mE<sol>%sE<sol>" >>
1398 You used a Unicode boundary (C<\b{...}> or C<\B{...}>) in a
1399 portion of a regular expression where the character set modifiers C</a>
1400 or C</aa> are in effect. These two modifiers indicate an ASCII
1401 interpretation, and this doesn't make sense for a Unicode definition.
1402 The generated regular expression will compile so that the boundary uses
1403 all of Unicode. No other portion of the regular expression is affected.
1407 L<The bitwise feature is experimental|perldiag/"The bitwise feature is experimental">
1409 This warning is emitted if you use bitwise
1410 operators (C<& | ^ ~ &. |. ^. ~.>) with the "bitwise" feature enabled.
1411 Simply suppress the warning if you want to use the feature, but know
1412 that in doing so you are taking the risk of using an experimental
1413 feature which may change or be removed in a future Perl version:
1415 no warnings "experimental::bitwise";
1416 use feature "bitwise";
1421 L<Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/">
1423 (D deprecated, regexp) You used a literal C<"{"> character in a regular
1424 expression pattern. You should change to use C<"\{"> instead, because a future
1425 version of Perl (tentatively v5.26) will consider this to be a syntax error. If
1426 the pattern delimiters are also braces, any matching right brace
1427 (C<"}">) should also be escaped to avoid confusing the parser, for
1434 L<Use of literal non-graphic characters in variable names is deprecated|perldiag/"Use of literal non-graphic characters in variable names is deprecated">
1438 L<Useless use of attribute "const"|perldiag/Useless use of attribute "const">
1440 (W misc) The "const" attribute has no effect except
1441 on anonymous closure prototypes. You applied it to
1442 a subroutine via L<attributes.pm|attributes>. This is only useful
1443 inside an attribute handler for an anonymous subroutine.
1447 L<E<quot>use re 'strict'E<quot> is experimental|perldiag/"use re 'strict'" is experimental>
1449 (S experimental::re_strict) The things that are different when a regular
1450 expression pattern is compiled under C<'strict'> are subject to change
1451 in future Perl releases in incompatible ways. This means that a pattern
1452 that compiles today may not in a future Perl release. This warning is
1453 to alert you to that risk.
1457 L<Warning: unable to close filehandle properly: %s|perldiag/"Warning: unable to close filehandle properly: %s">
1459 L<Warning: unable to close filehandle %s properly: %s|perldiag/"Warning: unable to close filehandle %s properly: %s">
1461 (S io) An error occurred when Perl implicitly closed a filehandle. This
1462 usually indicates your file system ran out of disk space.
1466 L<Wide character (U+%X) in %s|perldiag/"Wide character (U+%X) in %s">
1468 (W locale) While in a single-byte locale (I<i.e.>, a non-UTF-8
1469 one), a multi-byte character was encountered. Perl considers this
1470 character to be the specified Unicode code point. Combining non-UTF8
1471 locales and Unicode is dangerous. Almost certainly some characters
1472 will have two different representations. For example, in the ISO 8859-7
1473 (Greek) locale, the code point 0xC3 represents a Capital Gamma. But so
1474 also does 0x393. This will make string comparisons unreliable.
1476 You likely need to figure out how this multi-byte character got mixed up
1477 with your single-byte locale (or perhaps you thought you had a UTF-8
1478 locale, but Perl disagrees).
1482 The following two warnings for C<tr///> used to be skipped if the
1483 transliteration contained wide characters, but now they occur regardless of
1484 whether there are wide characters or not:
1486 L<Useless use of E<sol>d modifier in transliteration operator|perldiag/"Useless use of /d modifier in transliteration operator">
1488 L<Replacement list is longer than search list|perldiag/Replacement list is longer than search list>
1492 A new C<locale> warning category has been created, with the following warning
1493 messages currently in it:
1499 L<Locale '%s' may not work well.%s|perldiag/Locale '%s' may not work well.%s>
1503 L<Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".|perldiag/Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".>
1509 =head2 Changes to Existing Diagnostics
1517 This warning has been changed to
1518 L<< <> at require-statement should be quotes|perldiag/"<> at require-statement should be quotes" >>
1519 to make the issue more identifiable.
1523 L<Argument "%s" isn't numeric%s|perldiag/"Argument "%s" isn't numeric%s">
1524 now adds the following note:
1526 Note that for the Inf and NaN (infinity and not-a-number) the
1527 definition of "numeric" is somewhat unusual: the strings themselves
1528 (like "Inf") are considered numeric, and anything following them is
1529 considered non-numeric.
1533 L<Global symbol "%s" requires explicit package name|perldiag/"Global symbol "%s" requires explicit package name (did you forget to declare "my %s"?)">
1535 This message has had '(did you forget to declare "my %s"?)' appended to it, to
1536 make it more helpful to new Perl programmers.
1537 L<[perl #121638]|https://rt.perl.org/Ticket/Display.html?id=121638>
1541 '"my" variable &foo::bar can't be in a package' has been reworded to say
1542 'subroutine' instead of 'variable'.
1546 L<\N{} in character class restricted to one character in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"\N{} in inverted character class or as a range end-point is restricted to one character in regex; marked by <-- HERE in m/%s/">
1548 This message has had 'character class' changed to 'inverted character class or
1549 as a range end-point is' to reflect improvements in C<qr/[\N{named sequence}]/>
1550 (see under L</Selected Bug Fixes>).
1554 L<panic: frexp|perldiag/"panic: frexp: %f">
1556 This message has had ': C<%f>' appended to it, to show what the offending floating
1561 B<Possible precedence problem on bitwise %c operator> reworded as
1562 L<Possible precedence problem on bitwise %s operator|perldiag/"Possible precedence problem on bitwise %s operator">.
1566 C<require> with no argument or undef used to warn about a Null filename; now
1567 it dies with C<Missing or undefined argument to require>.
1571 L<Unsuccessful %s on filename containing newline|perldiag/"Unsuccessful %s on filename containing newline">
1573 This warning is now only produced when the newline is at the end of
1578 "Variable C<%s> will not stay shared" has been changed to say "Subroutine"
1579 when it is actually a lexical sub that will not stay shared.
1583 L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/">
1585 Information about Unicode behaviour has been added.
1589 =head2 Diagnostic Removals
1595 "Ambiguous use of -foo resolved as -&foo()"
1597 There is actually no ambiguity here, and this impedes the use of negated
1598 constants; e.g., C<-Inf>.
1602 "Constant is not a FOO reference"
1604 Compile-time checking of constant dereferencing (e.g., C<< my_constant->() >>)
1605 has been removed, since it was not taking overloading into account.
1606 L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456>
1607 L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607>
1611 =head1 Utility Changes
1619 The F<x2p/> directory has been removed from the Perl core.
1621 This removes find2perl, s2p and a2p. They have all been released to CPAN as
1622 separate distributions (App::find2perl, App::s2p, App::a2p).
1632 F<h2ph> now handles hexadecimal constants in the compiler's predefined
1633 macro definitions, as visible in C<$Config{cppsymbols}>.
1634 L<[perl #123784]|https://rt.perl.org/Ticket/Display.html?id=123784>.
1644 No longer depends on non-core modules.
1648 =head1 Configuration and Compilation
1654 F<Configure> now checks for F<lrintl>, F<lroundl>, F<llrintl>, and F<llroundl>.
1658 F<Configure> with C<-Dmksymlinks> should now be faster.
1659 L<[perl #122002]|https://rt.perl.org/Ticket/Display.html?id=122002>.
1663 pthreads and lcl will be linked by default if present. This allows XS modules
1664 that require threading to work on non-threaded perls. Note that you must still
1665 pass C<-Dusethreads> if you want a threaded perl.
1669 For long doubles (to get more precision and range for floating point numbers)
1670 one can now use the GCC quadmath library which implements the quadruple
1671 precision floating point numbers on x86 and IA-64 platforms. See
1672 F<INSTALL> for details.
1676 MurmurHash64A and MurmurHash64B can now be configured as the internal hash
1681 C<make test.valgrind> now supports parallel testing.
1685 TEST_JOBS=9 make test.valgrind
1687 See L<perlhacktips/valgrind> for more information.
1689 L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
1693 The MAD (Misc Attribute Decoration) build option has been removed
1695 This was an unmaintained attempt at preserving
1696 the Perl parse tree more faithfully so that automatic conversion of
1697 Perl 5 to Perl 6 would have been easier.
1699 This build-time configuration option had been unmaintained for years,
1700 and had probably seriously diverged on both Perl 5 and Perl 6 sides.
1704 A new compilation flag, C<< -DPERL_OP_PARENT >> is available. For details,
1705 see the discussion below at L<< /Internal Changes >>.
1709 Pathtools no longer tries to load XS on miniperl. This speeds up building perl
1721 F<t/porting/re_context.t> has been added to test that L<utf8> and its
1722 dependencies only use the subset of the C<$1..$n> capture vars that
1723 C<Perl_save_re_context()> is hard-coded to localize, because that function has no
1724 efficient way of determining at runtime what vars to localize.
1728 Tests for performance issues have been added in the file F<t/perf/taint.t>.
1732 Some regular expression tests are written in such a way that they will
1733 run very slowly if certain optimizations break. These tests have been
1734 moved into new files, F<< t/re/speed.t >> and F<< t/re/speed_thr.t >>,
1735 and are run with a C<< watchdog() >>.
1739 C<< test.pl >> now allows C<< plan skip_all => $reason >>, to make it
1740 more compatible with C<< Test::More >>.
1744 A new test script, F<op/infnan.t>, has been added to test if Inf and NaN are
1745 working correctly. See L</Infinity and NaN (not-a-number) handling improved>.
1749 =head1 Platform Support
1751 =head2 Regained Platforms
1755 =item IRIX and Tru64 platforms are working again.
1757 (Some C<make test> failures remain.)
1759 =item z/OS running EBCDIC Code Page 1047
1761 Core perl now works on this EBCDIC platform. Earlier perls also worked, but,
1762 even though support wasn't officially withdrawn, recent perls would not compile
1763 and run well. Perl 5.20 would work, but had many bugs which have now been
1764 fixed. Many CPAN modules that ship with Perl still fail tests, including
1765 Pod::Simple. However the version of Pod::Simple currently on CPAN should work;
1766 it was fixed too late to include in Perl 5.22. Work is under way to fix many
1767 of the still-broken CPAN modules, which likely will be installed on CPAN when
1768 completed, so that you may not have to wait until Perl 5.24 to get a working
1773 =head2 Discontinued Platforms
1777 =item NeXTSTEP/OPENSTEP
1779 NeXTSTEP was a proprietary operating system bundled with NeXT's
1780 workstations in the early to mid 90s; OPENSTEP was an API specification
1781 that provided a NeXTSTEP-like environment on a non-NeXTSTEP system. Both
1782 are now long dead, so support for building Perl on them has been removed.
1786 =head2 Platform-Specific Notes
1792 Special handling is required on EBCDIC platforms to get C<qr/[i-j]/> to
1793 match only C<"i"> and C<"j">, since there are 7 characters between the
1794 code points for C<"i"> and C<"j">. This special handling had only been
1795 invoked when both ends of the range are literals. Now it is also
1796 invoked if any of the C<\N{...}> forms for specifying a character by
1797 name or Unicode code point is used instead of a literal. See
1798 L<perlrecharclass/Character Ranges>.
1802 The archname now distinguishes use64bitint from use64bitall.
1806 Build support has been improved for cross-compiling in general and for
1807 Android in particular.
1815 When spawning a subprocess without waiting, the return value is now
1820 Fix a prototype so linking doesn't fail under the VMS C++ compiler.
1824 C<finite>, C<finitel>, and C<isfinite> detection has been added to
1825 C<configure.com>, environment handling has had some minor changes, and
1826 a fix for legacy feature checking status.
1836 F<miniperl.exe> is now built with C<-fno-strict-aliasing>, allowing 64-bit
1837 builds to complete on GCC 4.8.
1838 L<[perl #123976]|https://rt.perl.org/Ticket/Display.html?id=123976>
1842 C<nmake minitest> now works on Win32. Due to dependency issues you
1843 need to build C<nmake test-prep> first, and a small number of the
1845 L<[perl #123394]|https://rt.perl.org/Ticket/Display.html?id=123394>
1849 Perl can now be built in C++ mode on Windows by setting the makefile macro
1850 C<USE_CPLUSPLUS> to the value "define".
1854 List form of pipe open has been implemented for Win32. Note: unlike
1855 C< system LIST >> this does not fall back to the shell.
1856 L<[perl #121159]|https://rt.perl.org/Ticket/Display.html?id=121159>
1860 New C<DebugSymbols> and C<DebugFull> configuration options added to
1865 L<B> now compiles again on Windows.
1869 Previously compiling XS modules (including CPAN ones) using Visual C++ for
1870 Win64 resulted in around a dozen warnings per file from hv_func.h. These
1871 warnings have been silenced.
1875 Support for building without PerlIO has been removed from the Windows
1876 makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are
1877 already not supported by F<Configure> on POSIX systems.
1881 Between 2 and 6 ms and 7 I/O calls have been saved per attempt to open a perl
1882 module for each path in C<@INC>.
1886 Intel C builds are now always built with C99 mode on.
1890 C<%I64d> is now being used instead of C<%lld> for MinGW.
1894 In the experimental C<:win32> layer, a crash in C<open> was fixed. Also
1895 opening C</dev/null>, which works the Win32 Perl's normal C<:unix> layer, was
1896 implemented for C<:win32>.
1897 L<[perl #122224]|https://rt.perl.org/Ticket/Display.html?id=122224>
1901 A new makefile option, C<USE_LONG_DOUBLE>, has been added to the Windows
1902 dmake makefile for gcc builds only. Set this to "define" if you want perl to
1903 use long doubles to give more accuracy and range for floating point numbers.
1909 On OpenBSD, Perl will now default to using the system C<malloc> due to the
1910 security features it provides. Perl's own malloc wrapper has been in use
1911 since v5.14 due to performance reasons, but the OpenBSD project believes
1912 the tradeoff is worth it and would prefer that users who need the speed
1913 specifically ask for it.
1915 L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>.
1923 We now look for the Sun Studio compiler in both F</opt/solstudio*> and
1924 F</opt/solarisstudio*>.
1928 Builds on Solaris 10 with C<-Dusedtrace> would fail early since make
1929 didn't follow implied dependencies to build C<perldtrace.h>. Added an
1930 explicit dependency to C<depend>.
1931 L<[perl #120120]|https://rt.perl.org/Ticket/Display.html?id=120120>
1935 C<c99> options have been cleaned up, hints look for C<solstudio>
1936 as well as C<SUNWspro>, and support for native C<setenv> has been added.
1942 =head1 Internal Changes
1948 Experimental support has been added to allow ops in the optree to locate
1949 their parent, if any. This is enabled by the non-default build option
1950 C<-DPERL_OP_PARENT>. It is envisaged that this will eventually become
1951 enabled by default, so XS code which directly accesses the C<op_silbing>
1952 field of ops should be updated to be future-proofed.
1954 On C<PERL_OP_PARENT> builds, the C<op_sibling> field has been renamed
1955 C<op_sibparent> and a new flag, C<op_moresib>, added. On the last op in a
1956 sibling chain, C<op_moresib> is false and C<op_sibparent> points to the
1957 parent (if any) rather than to being C<NULL>.
1959 To make existing code work transparently whether using C<-DPERL_OP_PARENT>
1960 or not, a number of new macros and functions have been added that should
1961 be used, rather than directly manipulating C<op_sibling>.
1963 For the case of just reading C<op_sibling> to determine the next sibling,
1964 two new macros have been added. A simple scan through a sibling chain
1967 for (; kid->op_sibling; kid = kid->op_sibling) { ... }
1969 should now be written as:
1971 for (; OpHAS_SIBLING(kid); kid = OpSIBLING(kid)) { ... }
1973 For altering optrees, A general-purpose function C<op_sibling_splice()>
1974 has been added, which allows for manipulation of a chain of sibling ops.
1975 By analogy with the Perl function C<splice()>, it allows you to cut out
1976 zero or more ops from a sibling chain and replace them with zero or more
1977 new ops. It transparently handles all the updating of sibling, parent,
1978 op_last pointers etc.
1980 If you need to manipulate ops at a lower level, then three new macros,
1981 C<OpMORESIB_set>, C<OpLASTSIB_set> and C<OpMAYBESIB_set> are intended to
1982 be a low-level portable way to set C<op_sibling> / C<op_sibparent> while
1983 also updating C<op_moresib>. The first sets the sibling pointer to a new
1984 sibling, the second makes the op the last sibling, and the third
1985 conditionally does the first or second action. Note that unlike
1986 C<op_sibling_splice()> these macros won't maintain consistency in the
1987 parent at the same time (e.g. by updating C<op_first> and C<op_last> where
1990 A C-level C<Perl_op_parent()> function and a perl-level C<B::OP::parent()>
1991 method have been added. The C function only exists under
1992 C<-DPERL_OP_PARENT> builds (using it is build-time error on vanilla
1993 perls). C<B::OP::parent()> exists always, but on a vanilla build it
1994 always returns C<NULL>. Under C<-DPERL_OP_PARENT>, they return the parent
1995 of the current op, if any. The variable C<$B::OP::does_parent> allows you
1996 to determine whether C<B> supports retrieving an op's parent.
1998 XXX C<-DPERL_OP_PARENT> was introduced in 5.21.2, but the interface was
1999 changed considerably in 5.21.11. If you updated your code before the
2000 5.21.11 changes, it may require further revision. The main changes after
2007 The C<OP_SIBLING> and C<OP_HAS_SIBLING> macros have been renamed
2008 C<OpSIBLING> and C<OpHAS_SIBLING> for consistency with other
2009 op-manipulating macros.
2013 The C<op_lastsib> field has been renamed C<op_moresib>, and its meaning
2018 The macro C<OpSIBLING_set> has been removed, and has been superseded by
2019 C<OpMORESIB_set> et al.
2023 The C<op_sibling_splice()> function now accepts a null C<parent> argument
2024 where the splicing doesn't affect the first or last ops in the sibling
2031 Macros have been created to allow XS code to better manipulate the POSIX locale
2032 category C<LC_NUMERIC>. See L<perlapi/Locale-related functions and macros>.
2036 The previous C<atoi> et al replacement function, C<grok_atou>, has now been
2037 superseded by C<grok_atoUV>. See L<perlclib> for details.
2041 Added C<Perl_sv_get_backrefs()> to determine if an SV is a weak-referent.
2043 Function either returns an SV * of type AV, which contains the set of
2044 weakreferences which reference the passed in SV, or a simple RV * which
2045 is the only weakref to this item.
2049 The C<screaminstr> perl function has been removed. Although marked as
2050 public API, it was undocumented and had no usage in CPAN modules. Calling
2051 it has been fatal since 5.17.0.
2055 C<newDEFSVOP>, C<block_start>, C<block_end> and C<intro_my> have been added
2060 The internal C<convert> function in F<op.c> has been renamed
2061 C<op_convert_list> and added to the API.
2065 C<sv_magic> no longer forbids "ext" magic on read-only values. After all,
2066 perl can't know whether the custom magic will modify the SV or not.
2067 L<[perl #123103]|https://rt.perl.org/Ticket/Display.html?id=123103>.
2071 Accessing L<perlapi/CvPADLIST> in an XSUB is now forbidden.
2072 C<CvPADLIST> has been reused for a different internal purpose for XSUBs. Guard all
2073 C<CvPADLIST> expressions with C<CvISXSUB()> if your code doesn't already block
2074 XSUB CV*s from going through optree CV* expecting code.
2078 SVs of type SVt_NV are now bodyless when a build configure and platform allow
2079 it, specifically C<sizeof(NV) <= sizeof(IV)>. The bodyless trick is the same one
2080 as for IVs since 5.9.2, but for NVs, unlike IVs, is not guaranteed on all
2081 platforms and build configurations.
2085 The C<$DB::single>, C<$DB::signal> and C<$DB::trace> now have set and
2086 get magic that stores their values as IVs and those IVs are used when
2087 testing their values in C<pp_dbstate>. This prevents perl from
2088 recursing infinitely if an overloaded object is assigned to any of those
2090 L<[perl #122445]|https://rt.perl.org/Ticket/Display.html?id=122445>.
2094 C<Perl_tmps_grow> which is marked as public API but is undocumented, has been
2095 removed from public API. If you use C<EXTEND_MORTAL> macro in your XS code to
2096 preextend the mortal stack, you are unaffected by this change.
2100 XXX C<cv_name>, which was introduced in 5.21.4, has been changed incompatibly.
2101 It now has a flags field that allows the caller to specify whether the name
2102 should be fully qualified. See L<perlapi/cv_name>.
2106 Internally Perl no longer uses the C<SVs_PADMY> flag. C<SvPADMY()> now
2107 returns a true value for anything not marked PADTMP. C<SVs_PADMY> is now
2112 The macros SETsv and SETsvUN have been removed. They were no longer used
2113 in the core since commit 6f1401dc2a, and have not been found present on
2118 The C<< SvFAKE >> bit (unused on HVs) got informally reserved by
2119 David Mitchell for future work on vtables.
2123 The C<sv_catpvn_flags> function accepts C<SV_CATBYTES> and C<SV_CATUTF8>
2124 flags, which specify whether the appended string is bytes or utf8,
2129 A new opcode class, C<< METHOP >>, has been introduced. It holds
2130 class/method related info needed at runtime to improve performance
2131 of class/object method calls.
2133 C<< OP_METHOD >> and C<< OP_METHOD_NAMED >> are moved from being
2134 C<< UNOP/SVOP >> to being C<< METHOP >>.
2138 C<save_re_context> no longer does anything and has been moved to F<mathoms.c>.
2142 C<cv_name> is a new API function that can be passed a CV or GV. It returns an
2143 SV containing the name of the subroutine for use in diagnostics.
2144 L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735>
2145 L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
2149 C<cv_set_call_checker_flags> is a new API function that works like
2150 C<cv_set_call_checker>, except that it allows the caller to specify whether the
2151 call checker requires a full GV for reporting the subroutine's name, or whether
2152 it could be passed a CV instead. Whatever value is passed will be acceptable
2153 to C<cv_name>. C<cv_set_call_checker> guarantees there will be a GV, but it
2154 may have to create one on the fly, which is inefficient.
2155 L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735>
2159 C<CvGV> (which is not part of the API) is now a more complex macro, which may
2160 call a function and reify a GV. For those cases where is has been used as a
2161 boolean, C<CvHASGV> has been added, which will return true for CVs that
2162 notionally have GVs, but without reifying the GV. C<CvGV> also returns a GV
2163 now for lexical subs.
2164 L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
2168 Added L<perlapi/sync_locale>. Changing the program's locale should be avoided
2169 by XS code. Nevertheless, certain non-Perl libraries called from XS, such as
2170 C<Gtk> do so. When this happens, Perl needs to be told that the locale has
2171 changed. Use this function to do so, before returning to Perl.
2175 The defines and labels for the flags in the C<op_private> field of OPs are now
2176 auto-generated from data in F<regen/op_private>. The noticeable effect of this
2177 is that some of the flag output of C<Concise> might differ slightly, and the
2178 flag output of C<perl -Dx> may differ considerably (they both use the same set
2179 of labels now). Also in debugging builds, there is a new assert in
2180 C<op_free()> that checks that the op doesn't have any unrecognized flags set in
2185 The deprecated variable C<PL_sv_objcount> has been removed.
2189 Perl now tries to keep the locale category C<LC_NUMERIC> set to "C"
2190 except around operations that need it to be set to the program's
2191 underlying locale. This protects the many XS modules that cannot cope
2192 with the decimal radix character not being a dot. Prior to this
2193 release, Perl initialized this category to "C", but a call to
2194 C<POSIX::setlocale()> would change it. Now such a call will change the
2195 underlying locale of the C<LC_NUMERIC> category for the program, but the
2196 locale exposed to XS code will remain "C". There are new macros
2197 to manipulate the LC_NUMERIC locale, including
2198 C<STORE_LC_NUMERIC_SET_TO_NEEDED> and
2199 C<STORE_LC_NUMERIC_FORCE_TO_UNDERLYING>.
2200 See L<perlapi/Locale-related functions and macros>.
2204 A new macro L<C<isUTF8_CHAR>|perlapi/isUTF8_CHAR> has been written which
2205 efficiently determines if the string given by its parameters begins
2206 with a well-formed UTF-8 encoded character.
2210 The following private API functions had their context parameter removed,
2211 C<Perl_cast_ulong>, C<Perl_cast_i32>, C<Perl_cast_iv>, C<Perl_cast_uv>,
2212 C<Perl_cv_const_sv>, C<Perl_mg_find>, C<Perl_mg_findext>, C<Perl_mg_magical>,
2213 C<Perl_mini_mktime>, C<Perl_my_dirfd>, C<Perl_sv_backoff>, C<Perl_utf8_hop>.
2215 Users of the public API prefix-less calls remain unaffected.
2219 The PADNAME and PADNAMELIST types are now separate types, and no longer
2220 simply aliases for SV and AV.
2221 L<[perl #123223]|https://rt.perl.org/Ticket/Display.html?id=123223>.
2225 Pad names are now always UTF8. The C<PadnameUTF8> macro always returns
2226 true. Previously, this was effectively the case already, but any support
2227 for two different internal representations of pad names has now been
2232 A new op class, C<UNOP_AUX>, has been added. This is a subclass of
2233 C<UNOP> with an C<op_aux> field added, which points to an array of unions
2234 of C<UV>, C<SV*> etc. It is intended for where an op needs to store more data
2235 than a simple C<op_sv> or whatever. Currently the only op of this type is
2236 C<OP_MULTIDEREF> (see below).
2240 A new op has been added, C<OP_MULTIDEREF>, which performs one or more
2241 nested array and hash lookups where the key is a constant or simple
2242 variable. For example the expression C<$a[0]{$k}[$i]>, which previously
2243 involved ten C<rv2Xv>, C<Xelem>, C<gvsv> and C<const> ops is now performed
2244 by a single C<multideref> op. It can also handle C<local>, C<exists> and
2245 C<delete>. A non-simple index expression, such as C<[$i+1]> is still done
2246 using C<aelem>/C<helem>, and single-level array lookup with a small constant
2247 index is still done using C<aelemfast>.
2251 =head1 Selected Bug Fixes
2257 C<pack("D", $x)> and C<pack("F", $x)> now zero the padding on x86 long double
2258 builds. GCC 4.8 and later, under some build options, would either overwrite
2259 the zero-initialized padding, or bypass the initialized buffer entirely. This
2260 caused F<op/pack.t> to fail.
2261 L<[perl #123971]|https://rt.perl.org/Ticket/Display.html?id=123971>
2265 Extending an array cloned from a parent thread could result in "Modification of
2266 a read-only value attempted" errors when attempting to modify the new elements.
2267 L<[perl #124127]|https://rt.perl.org/Ticket/Display.html?id=124127>
2271 An assertion failure and subsequent crash with C<< *x=<y> >> has been fixed.
2272 L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790>
2276 XXX An optimization for state variable initialization introduced in Perl 5.21.6 has
2277 been reverted because it was found to exacerbate some other existing buggy
2279 L<[perl #124160]|https://rt.perl.org/Ticket/Display.html?id=124160>
2283 XXX The extension of another optimization to cover more ops in Perl 5.21 has also
2284 been reverted to its Perl 5.20 state as a temporary fix for regression issues
2286 L<[perl #123790]|https://rt.perl.org/Ticket/Display.html?id=123790>
2290 A possible crashing/looping bug has been fixed.
2291 L<[perl #124099]|https://rt.perl.org/Ticket/Display.html?id=124099>
2295 UTF-8 variable names used in array indexes, unquoted UTF-8 HERE-document
2296 terminators and UTF-8 function names all now work correctly.
2297 L<[perl #124113]|https://rt.perl.org/Ticket/Display.html?id=124113>
2301 Repeated global pattern matches in scalar context on large tainted strings were
2302 exponentially slow depending on the current match position in the string.
2303 L<[perl #123202]|https://rt.perl.org/Ticket/Display.html?id=123202>
2307 Various crashes due to the parser getting confused by syntax errors have been
2309 L<[perl #123801]|https://rt.perl.org/Ticket/Display.html?id=123801>
2310 L<[perl #123802]|https://rt.perl.org/Ticket/Display.html?id=123802>
2311 L<[perl #123955]|https://rt.perl.org/Ticket/Display.html?id=123955>
2312 L<[perl #123995]|https://rt.perl.org/Ticket/Display.html?id=123995>
2316 C<split> in the scope of lexical C<$>_ has been fixed not to fail assertions.
2317 L<[perl #123763]|https://rt.perl.org/Ticket/Display.html?id=123763>
2321 C<my $x : attr> syntax inside various list operators no longer fails
2323 L<[perl #123817]|https://rt.perl.org/Ticket/Display.html?id=123817>
2327 An C<@> sign in quotes followed by a non-ASCII digit (which is not a valid
2328 identifier) would cause the parser to crash, instead of simply trying the C<@> as
2329 literal. This has been fixed.
2330 L<[perl #123963]|https://rt.perl.org/Ticket/Display.html?id=123963>
2334 C<*bar::=*foo::=*glob_with_hash> has been crashing since Perl 5.14, but no
2336 L<[perl #123847]|https://rt.perl.org/Ticket/Display.html?id=123847>
2340 C<foreach> in scalar context was not pushing an item on to the stack, resulting
2341 in bugs. (S<C<print 4, scalar do { foreach(@x){} } + 1>> would print 5.) It has
2342 been fixed to return C<undef>.
2343 L<[perl #124004]|https://rt.perl.org/Ticket/Display.html?id=124004>
2347 A regression in the behaviour of the C<readline> built-in function, caused by
2348 the introduction of the C<< <<>> >> operator, has been fixed.
2349 L<[perl #123990]|https://rt.perl.org/Ticket/Display.html?id=123990>
2353 Several cases of data used to store environment variable contents in core C
2354 code being potentially overwritten before being used have been fixed.
2355 L<[perl #123748]|https://rt.perl.org/Ticket/Display.html?id=123748>
2359 Patterns starting with C</.*/> are now fast again.
2360 L<[perl #123743]|https://rt.perl.org/Ticket/Display.html?id=123743>.
2364 The original visible value of C<$/> is now preserved when it is set to
2365 an invalid value. Previously if you set C<$/> to a reference to an
2366 array, for example, perl would produce a runtime error and not set
2367 C<PL_rs>, but perl code that checked C<$/> would see the array
2369 L<[perl #123218]|https://rt.perl.org/Ticket/Display.html?id=123218>.
2373 In a regular expression pattern, a POSIX class, like C<[:ascii:]>, must
2374 be inside a bracketed character class, like C<qr/[[:ascii:]]/>. A
2375 warning is issued when something looking like a POSIX class is not
2376 inside a bracketed class. That warning wasn't getting generated when
2377 the POSIX class was negated: C<[:^ascii:]>. This is now fixed.
2381 Fix a couple of size calculation overflows.
2382 L<[perl #123554]|https://rt.perl.org/Ticket/Display.html?id=123554>.
2386 Perl 5.14.0 introduced a bug whereby C<eval { LABEL: }> would crash. This
2388 L<[perl #123652]|https://rt.perl.org/Ticket/Display.html?id=123652>.
2392 Various crashes due to the parser getting confused by syntax errors have
2394 L<[perl #123617]|https://rt.perl.org/Ticket/Display.html?id=123617>.
2395 L<[perl #123737]|https://rt.perl.org/Ticket/Display.html?id=123737>.
2396 L<[perl #123753]|https://rt.perl.org/Ticket/Display.html?id=123753>.
2397 L<[perl #123677]|https://rt.perl.org/Ticket/Display.html?id=123677>.
2401 Code like C</$a[/> used to read the next line of input and treat it as
2402 though it came immediately after the opening bracket. Some invalid code
2403 consequently would parse and run, but some code caused crashes, so this is
2405 L<[perl #123712]|https://rt.perl.org/Ticket/Display.html?id=123712>.
2409 Fix argument underflow for C<pack>.
2410 L<[perl #123874]|https://rt.perl.org/Ticket/Display.html?id=123874>.
2414 Fix handling of non-strict C<\x{}>. Now C<\x{}> is equivalent to C<\x{0}>
2415 instead of faulting.
2419 C<stat -t> is now no longer treated as stackable, just like C<-t stat>.
2420 L<[perl #123816]|https://rt.perl.org/Ticket/Display.html?id=123816>.
2424 The following no longer causes a SEGV: C<qr{x+(y(?0))*}>.
2428 Fixed infinite loop in parsing backrefs in regexp patterns.
2432 Several minor bug fixes in behavior of Inf and NaN, including
2433 warnings when stringifying Inf-like or NaN-like strings. For example,
2434 "NaNcy" doesn't numify to NaN anymore.
2438 Only stringy classnames are now shared. This fixes some failures in L<autobox>.
2439 L<[perl #100819]|https://rt.cpan.org/Ticket/Display.html?id=100819>.
2443 A bug in regular expression patterns that could lead to segfaults and
2444 other crashes has been fixed. This occurred only in patterns compiled
2445 with C<"/i">, while taking into account the current POSIX locale (this usually
2446 means they have to be compiled within the scope of C<S<"use locale">>),
2447 and there must be a string of at least 128 consecutive bytes to match.
2448 L<[perl #123539]|https://rt.perl.org/Ticket/Display.html?id=123539>.
2452 C<s///> now works on very long strings instead of dying with 'Substitution
2454 L<[perl #103260]|https://rt.perl.org/Ticket/Display.html?id=103260>.
2455 L<[perl #123071]|https://rt.perl.org/Ticket/Display.html?id=123071>.
2459 C<gmtime> no longer crashes with not-a-number values.
2460 L<[perl #123495]|https://rt.perl.org/Ticket/Display.html?id=123495>.
2464 C<\()> (reference to an empty list) and C<y///> with lexical C<$_> in scope
2465 could do a bad write past the end of the stack. They have been fixed
2466 to extend the stack first.
2470 C<prototype()> with no arguments used to read the previous item on the
2471 stack, so C<print "foo", prototype()> would print foo's prototype. It has
2472 been fixed to infer C<$_> instead.
2473 L<[perl #123514]|https://rt.perl.org/Ticket/Display.html?id=123514>.
2477 Some cases of lexical state subs inside predeclared subs could crash but no
2482 Some cases of nested lexical state subs inside anonymous subs could cause
2483 'Bizarre copy' errors or possibly even crash.
2487 When trying to emit warnings, perl's default debugger (F<perl5db.pl>) was
2488 sometimes giving 'Undefined subroutine &DB::db_warn called' instead. This
2489 bug, which started to occur in Perl 5.18, has been fixed.
2490 L<[perl #123553]|https://rt.perl.org/Ticket/Display.html?id=123553>.
2494 Certain syntax errors in substitutions, such as C<< s/${E<lt>E<gt>{})// >>, would
2495 crash, and had done so since Perl 5.10. (In some cases the crash did not
2496 start happening till 5.16.) The crash has, of course, been fixed.
2497 L<[perl #123542]|https://rt.perl.org/Ticket/Display.html?id=123542>.
2501 A repeat expression like C<33 x ~3> could cause a large buffer
2502 overflow since the new output buffer size was not correctly handled by
2503 SvGROW(). An expression like this now properly produces a memory wrap
2505 L<[perl #123554]|https://rt.perl.org/Ticket/Display.html?id=123554>.
2509 C<< formline("@...", "a"); >> would crash. The C<FF_CHECKNL> case in
2510 pp_formline() didn't set the pointer used to mark the chop position,
2511 which led to the C<FF_MORE> case crashing with a segmentation fault.
2512 This has been fixed.
2513 L<[perl #123538]|https://rt.perl.org/Ticket/Display.html?id=123538>.
2517 A possible buffer overrun and crash when parsing a literal pattern during
2518 regular expression compilation has been fixed.
2519 L<[perl #123604]|https://rt.perl.org/Ticket/Display.html?id=123604>.
2523 C<fchmod()> and C<futimes()> now set C<$!> when they fail due to being
2524 passed a closed file handle.
2525 L<[perl #122703]|https://rt.perl.org/Ticket/Display.html?id=122703>.
2529 op_free() no longer crashes due to a stack overflow when freeing a
2530 deeply recursive op tree.
2531 L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>.
2535 scalarvoid() would crash due to a stack overflow when processing a
2536 deeply recursive op tree.
2537 L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>.
2541 In Perl 5.20.0, C<$^N> accidentally had the internal UTF8 flag turned off
2542 if accessed from a code block within a regular expression, effectively
2543 UTF8-encoding the value. This has been fixed.
2544 L<[perl #123135]|https://rt.perl.org/Ticket/Display.html?id=123135>.
2548 A failed C<semctl> call no longer overwrites existing items on the stack,
2549 causing C<(semctl(-1,0,0,0))[0]> to give an "uninitialized" warning.
2553 C<else{foo()}> with no space before C<foo> is now better at assigning the
2554 right line number to that statement.
2555 L<[perl #122695]|https://rt.perl.org/Ticket/Display.html?id=122695>.
2559 Sometimes the assignment in C<@array = split> gets optimised and C<split>
2560 itself writes directly to the array. This caused a bug, preventing this
2561 assignment from being used in lvalue context. So
2562 C<(@a=split//,"foo")=bar()> was an error. (This bug probably goes back to
2563 Perl 3, when the optimisation was added.) This optimisation, and the bug,
2564 started to happen in more cases in XXX 5.21.5. It has now been fixed.
2565 L<[perl #123057]|https://rt.perl.org/Ticket/Display.html?id=123057>.
2569 When argument lists that fail the checks installed by subroutine
2570 signatures, the resulting error messages now give the file and line number
2571 of the caller, not of the called subroutine.
2572 L<[perl #121374]|https://rt.perl.org/Ticket/Display.html?id=121374>.
2576 Flip-flop operators (C<..> and C<...> in scalar context) used to maintain
2577 a separate state for each recursion level (the number of times the
2578 enclosing sub was called recursively), contrary to the documentation. Now
2579 each closure has one internal state for each flip-flop.
2580 L<[perl #122829]|https://rt.perl.org/Ticket/Display.html?id=122829>.
2584 C<use>, C<no>, statement labels, special blocks (C<BEGIN>) and pod are now
2585 permitted as the first thing in a C<map> or C<grep> block, the block after
2586 C<print> or C<say> (or other functions) returning a handle, and within
2587 C<${...}>, C<@{...}>, etc.
2588 L<[perl #122782]|https://rt.perl.org/Ticket/Display.html?id=122782>.
2592 The repetition operator C<x> now propagates lvalue context to its left-hand
2593 argument when used in contexts like C<foreach>. That allows
2594 S<C<for(($#that_array)x2) { ... }>> to work as expected if the loop modifies
2599 C<(...) x ...> in scalar context used to corrupt the stack if one operand
2600 were an object with "x" overloading, causing erratic behaviour.
2601 L<[perl #121827]|https://rt.perl.org/Ticket/Display.html?id=121827>.
2605 Assignment to a lexical scalar is often optimised away (as mentioned under
2606 L</Performance Enhancements>). Various bugs related to this optimisation
2607 have been fixed. Certain operators on the right-hand side would sometimes
2608 fail to assign the value at all or assign the wrong value, or would call
2609 STORE twice or not at all on tied variables. The operators affected were
2610 C<$foo++>, C<$foo-->, and C<-$foo> under C<use integer>, C<chomp>, C<chr>
2615 List assignments were sometimes buggy if the same scalar ended up on both
2616 sides of the assignment due to used of C<tied>, C<values> or C<each>. The
2617 result would be the wrong value getting assigned.
2621 C<setpgrp($nonzero)> (with one argument) was accidentally changed in 5.16
2622 to mean C<setpgrp(0)>. This has been fixed.
2626 C<__SUB__> could return the wrong value or even corrupt memory under the
2627 debugger (the C<-d> switch) and in subs containing C<eval $string>.
2631 When S<C<sub () { $var }>> becomes inlinable, it now returns a different
2632 scalar each time, just as a non-inlinable sub would, though Perl still
2633 optimises the copy away in cases where it would make no observable
2638 S<C<my sub f () { $var }>> and S<C<sub () : attr { $var }>> are no longer
2639 eligible for inlining. The former would crash; the latter would just
2640 throw the attributes away. An exception is made for the little-known
2641 ":method" attribute, which does nothing much.
2645 Inlining of subs with an empty prototype is now more consistent than
2646 before. Previously, a sub with multiple statements, all but the last
2647 optimised away, would be inlinable only if it were an anonymous sub
2648 containing a string C<eval> or C<state> declaration or closing over an
2649 outer lexical variable (or any anonymous sub under the debugger). Now any
2650 sub that gets folded to a single constant after statements have been
2651 optimised away is eligible for inlining. This applies to things like C<sub
2652 () { jabber() if DEBUG; 42 }>.
2654 Some subroutines with an explicit C<return> were being made inlinable,
2655 contrary to the documentation, Now C<return> always prevents inlining.
2659 On some systems, such as VMS, C<crypt> can return a non-ASCII string. If a
2660 scalar assigned to had contained a UTF8 string previously, then C<crypt>
2661 would not turn off the UTF8 flag, thus corrupting the return value. This
2662 would happen with C<$lexical = crypt ...>.
2666 C<crypt> no longer calls C<FETCH> twice on a tied first argument.
2670 An unterminated here-doc on the last line of a quote-like operator
2671 (C<qq[${ <<END }]>, C</(?{ <<END })/>) no longer causes a double free. It
2672 started doing so in 5.18.
2676 Fixed two assertion failures introduced into C<-DPERL_OP_PARENT>
2678 L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>.
2682 C<index()> and C<rindex()> no longer crash when used on strings over 2GB in
2684 L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>.
2688 A small previously intentional memory leak in PERL_SYS_INIT/PERL_SYS_INIT3 on
2689 Win32 builds was fixed. This might affect embedders who repeatedly create and
2690 destroy perl engines within the same process.
2694 C<POSIX::localeconv()> now returns the data for the program's underlying
2695 locale even when called from outside the scope of S<C<use locale>>.
2699 C<POSIX::localeconv()> now works properly on platforms which don't have
2700 C<LC_NUMERIC> and/or C<LC_MONETARY>, or for which Perl has been compiled
2701 to disregard either or both of these locale categories. In such
2702 circumstances, there are now no entries for the corresponding values in
2703 the hash returned by C<localeconv()>.
2707 C<POSIX::localeconv()> now marks appropriately the values it returns as
2708 UTF-8 or not. Previously they were always returned as bytes, even if
2709 they were supposed to be encoded as UTF-8.
2713 On Microsoft Windows, within the scope of C<S<use locale>>, the following
2714 POSIX character classes gave results for many locales that did not
2715 conform to the POSIX standard:
2728 This was because the underlying Microsoft implementation does not
2729 follow the standard. Perl now takes special precautions to correct for
2734 Many issues have been detected by L<Coverity|http://www.coverity.com/> and
2739 system() and friends should now work properly on more Android builds.
2741 Due to an oversight, the value specified through C<-Dtargetsh> to F<Configure>
2742 would end up being ignored by some of the build process. This caused perls
2743 cross-compiled for Android to end up with defective versions of C<system()>,
2744 exec() and backticks: the commands would end up looking for C</bin/sh>
2745 instead of C</system/bin/sh>, and so would fail for the vast majority
2746 of devices, leaving C<$!> as C<ENOENT>.
2750 C<qr(...\(...\)...)>,
2751 C<qr[...\[...\]...]>,
2753 C<qr{...\{...\}...}>
2754 now work. Previously it was impossible to escape these three
2755 left-characters with a backslash within a regular expression pattern
2756 where otherwise they would be considered metacharacters, and the pattern
2757 opening delimiter was the character, and the closing delimiter was its
2762 C<< s///e >> on tainted utf8 strings got C<< pos() >> messed up. This bug,
2763 introduced in 5.20, is now fixed.
2764 L<[perl #122148]|https://rt.perl.org/Ticket/Display.html?id=122148>.
2768 A non-word boundary in a regular expression (C<< \B >>) did not always
2769 match the end of the string; in particular C<< q{} =~ /\B/ >> did not
2770 match. This bug, introduced in perl 5.14, is now fixed.
2771 L<[perl #122090]|https://rt.perl.org/Ticket/Display.html?id=122090>.
2775 C<< " P" =~ /(?=.*P)P/ >> should match, but did not. This is now fixed.
2776 L<[perl #122171]|https://rt.perl.org/Ticket/Display.html?id=122171>.
2780 Failing to compile C<use Foo> in an eval could leave a spurious
2781 C<BEGIN> subroutine definition, which would produce a "Subroutine
2782 BEGIN redefined" warning on the next use of C<use>, or other C<BEGIN>
2784 L<[perl #122107]|https://rt.perl.org/Ticket/Display.html?id=122107>.
2788 C<method { BLOCK } ARGS> syntax now correctly parses the arguments if they
2789 begin with an opening brace.
2790 L<[perl #46947]|https://rt.perl.org/Ticket/Display.html?id=46947>.
2794 External libraries and Perl may have different ideas of what the locale is.
2795 This is problematic when parsing version strings if the locale's numeric
2796 separator has been changed. Version parsing has been patched to ensure
2797 it handles the locales correctly.
2798 L<[perl #121930]|https://rt.perl.org/Ticket/Display.html?id=121930>.
2802 A bug has been fixed where zero-length assertions and code blocks inside of a
2803 regex could cause C<pos> to see an incorrect value.
2804 L<[perl #122460]|https://rt.perl.org/Ticket/Display.html?id=122460>.
2808 Constant dereferencing now works correctly for typeglob constants. Previously
2809 the glob was stringified and its name looked up. Now the glob itself is used.
2810 L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456>
2814 When parsing a funny character (C<$> C<@> C<%> C<&)> followed by braces,
2816 longer tries to guess whether it is a block or a hash constructor (causing a
2817 syntax error when it guesses the latter), since it can only be a block.
2821 S<C<undef $reference>> now frees the referent immediately, instead of hanging on
2822 to it until the next statement.
2823 L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556>
2827 Various cases where the name of a sub is used (autoload, overloading, error
2828 messages) used to crash for lexical subs, but have been fixed.
2832 Bareword lookup now tries to avoid vivifying packages if it turns out the
2833 bareword is not going to be a subroutine name.
2837 Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer deletes
2838 any subroutine named C<__ANON__> in the current package. Not only was
2839 C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug goes
2844 Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out constants
2845 of the same name declared by C<use constant>. This bug was introduced in Perl
2850 C<qr/[\N{named sequence}]/> now works properly in many instances. Some names
2851 known to C<\N{...}> refer to a sequence of multiple characters, instead of the
2852 usual single character. Bracketed character classes generally only match
2853 single characters, but now special handling has been added so that they can
2854 match named sequences, but not if the class is inverted or the sequence is
2855 specified as the beginning or end of a range. In these cases, the only
2856 behavior change from before is a slight rewording of the fatal error message
2857 given when this class is part of a C<?[...])> construct. When the C<[...]>
2858 stands alone, the same non-fatal warning as before is raised, and only the
2859 first character in the sequence is used, again just as before.
2863 Tainted constants evaluated at compile time no longer cause unrelated
2864 statements to become tainted.
2865 L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669>
2869 S<C<open $$fh, ...>>, which vivifies a handle with a name like C<"main::_GEN_0">, was
2870 not giving the handle the right reference count, so a double free could happen.
2874 When deciding that a bareword was a method name, the parser would get confused
2875 if an C<our> sub with the same name existed, and look up the method in the
2876 package of the C<our> sub, instead of the package of the invocant.
2880 The parser no longer gets confused by C<\U=> within a double-quoted string. It
2881 used to produce a syntax error, but now compiles it correctly.
2882 L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368>
2886 It has always been the intention for the C<-B> and C<-T> file test operators to
2887 treat UTF-8 encoded files as text. (L<perlfunc|perlfunc/-X FILEHANDLE> has
2888 been updated to say this.) Previously, it was possible for some files to be
2889 considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The
2890 operators now work on EBCDIC platforms as well.
2894 Under some conditions warning messages raised during regular expression pattern
2895 compilation were being output more than once. This has now been fixed.
2899 A regression has been fixed that was introduced in Perl 5.20.0 (fixed in Perl
2900 5.20.1 as well as here) in which a UTF-8 encoded regular expression pattern
2901 that contains a single ASCII lowercase letter does not match its uppercase
2903 L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655>
2907 Constant folding could incorrectly suppress warnings if lexical warnings (C<use
2908 warnings> or C<no warnings>) were not in effect and C<$^W> were false at
2909 compile time and true at run time.
2913 Loading UTF8 tables during a regular expression match could cause assertion
2914 failures under debugging builds if the previous match used the very same
2916 L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747>
2920 Thread cloning used to work incorrectly for lexical subs, possibly causing
2921 crashes or double frees on exit.
2925 Since Perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining an
2926 anonymous subroutine could corrupt things internally, resulting in
2927 L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data. This has been
2932 S<C<(caller $n)[3]>> now reports names of lexical subs, instead of treating them
2937 C<sort subname LIST> now supports lexical subs for the comparison routine.
2941 Aliasing (e.g., via C<*x = *y>) could confuse list assignments that mention the
2942 two names for the same variable on either side, causing wrong values to be
2944 L<[perl #15667]|https://rt.perl.org/Ticket/Display.html?id=15667>
2948 Long here-doc terminators could cause a bad read on short lines of input. This
2949 has been fixed. It is doubtful that any crash could have occurred. This bug
2950 goes back to when here-docs were introduced in Perl 3.000 twenty-five years
2955 An optimization in C<split> to treat C<split/^/> like C<split/^/m> had the
2956 unfortunate side-effect of also treating C<split/\A/> like C<split/^/m>, which
2957 it should not. This has been fixed. (Note, however, that C<split/^x/> does
2958 not behave like C<split/^x/m>, which is also considered to be a bug and will be
2959 fixed in a future version.)
2960 L<[perl #122761]|https://rt.perl.org/Ticket/Display.html?id=122761>
2964 The little-known S<C<my Class $var>> syntax (see L<fields> and L<attributes>)
2965 could get confused in the scope of C<use utf8> if C<Class> were a constant
2966 whose value contained Latin-1 characters.
2970 Locking and unlocking values via L<Hash::Util> or C<Internals::SvREADONLY>
2971 no longer has any effect on values that are read-only to begin.
2972 Previously, unlocking such values could result in crashes, hangs or
2973 other erratic behaviour.
2977 The flip-flop operator (C<..> in scalar context) would return the same
2978 scalar each time, unless the containing subroutine was called recursively.
2979 Now it always returns a new scalar.
2980 L<[perl #122829]|https://rt.perl.org/Ticket/Display.html?id=122829>.
2984 Some unterminated C<(?(...)...)> constructs in regular expressions would
2985 either crash or give erroneous error messages. C</(?(1)/> is one such
2990 S<C<pack "w", $tied>> no longer calls FETCH twice.
2994 List assignments like S<C<($x, $z) = (1, $y)>> now work correctly if C<$x> and
2995 C<$y> have been aliased by C<foreach>.
2999 Some patterns including code blocks with syntax errors, such as
3000 C</ (?{(^{})/>, would hang or fail assertions on debugging builds. Now
3001 they produce errors.
3005 An assertion failure when parsing C<sort> with debugging enabled has been
3007 L<[perl #122771]|https://rt.perl.org/Ticket/Display.html?id=122771>.
3011 S<C<*a = *b; @a = split //, $b[1]>> could do a bad read and produce junk
3016 In S<C<() = @array = split>>, the S<C<() =>> at the beginning no longer confuses
3017 the optimizer, making it assume a limit of 1.
3021 Fatal warnings no longer prevent the output of syntax errors.
3022 L<[perl #122966]|https://rt.perl.org/Ticket/Display.html?id=122966>.
3026 Fixed a NaN double to long double conversion error on VMS. For quiet NaNs
3027 (and only on Itanium, not Alpha) negative infinity instead of NaN was
3032 Fixed the issue that caused C<< make distclean >> to leave files behind
3034 L<[perl #122820]|https://rt.perl.org/Ticket/Display.html?id=122820>.
3038 AIX now sets the length in C<< getsockopt >> correctly.
3039 L<[perl #120835]|https://rt.perl.org/Ticket/Display.html?id=120835>.
3040 L<[cpan #91183]|https://rt.cpan.org/Ticket/Display.html?id=91183>.
3041 L<[cpan #85570]|https://rt.cpan.org/Ticket/Display.html?id=85570>.
3045 During the pattern optimization phase, we no longer recurse into
3046 C<GOSUB>/C<GOSTART> when not C<SCF_DO_SUBSTR>. This prevents the optimizer
3047 to run "forever" and exhaust all memory.
3048 L<[perl #122283]|https://rt.perl.org/Ticket/Display.html?id=122283>.
3052 F<< t/op/crypt.t >> now performs SHA-256 algorithm if the default one
3054 L<[perl #121591]|https://rt.perl.org/Ticket/Display.html?id=121591>.
3058 Fixed an off-by-one error when setting the size of shared array.
3059 L<[perl #122950]|https://rt.perl.org/Ticket/Display.html?id=122950>.
3063 Fixed a bug that could cause perl to execute an infinite loop during
3065 L<[perl #122995]|https://rt.perl.org/Ticket/Display.html?id=122995>.
3069 On Win32, restoring in a child pseudo-process a variable that was
3070 C<local()>ed in a parent pseudo-process before the C<fork> happened caused
3071 memory corruption and a crash in the child pseudo-process (and therefore OS
3073 L<[perl #40565]|https://rt.perl.org/Ticket/Display.html?id=40565>.
3077 Calling C<write> on a format with a C<^**> field could produce a panic
3078 in C<sv_chop()> if there were insufficient arguments or if the variable
3079 used to fill the field was empty.
3080 L<[perl #123245]|https://rt.perl.org/Ticket/Display.html?id=123245>.
3084 Non-ASCII lexical sub names (use in error messages) on longer have extra
3089 The C<\@> subroutine prototype no longer flattens parenthesized arrays
3090 (taking a reference to each element), but takes a reference to the array
3092 L<[perl #47363]|https://rt.perl.org/Ticket/Display.html?id=47363>.
3096 A block containing nothing except a C-style C<for> loop could corrupt the
3097 stack, causing lists outside the block to lose elements or have elements
3098 overwritten. This could happen with C<map { for(...){...} } ...> and with
3099 lists containing C<do { for(...){...} }>.
3100 L<[perl #123286]|https://rt.perl.org/Ticket/Display.html?id=123286>.
3104 C<scalar()> now propagates lvalue context, so that
3105 S<C<for(scalar($#foo)) { ... }>> can modify C<$#foo> through C<$_>.
3109 C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
3110 L<[perl #123344]|https://rt.perl.org/Ticket/Display.html?id=123344>.
3114 S<C<eval '$variable'>> in nested named subroutines would sometimes look up a
3115 global variable even with a lexical variable in scope.
3119 In perl 5.20.0, C<sort CORE::fake> where 'fake' is anything other than a
3120 keyword started chopping of the last 6 characters and treating the result
3121 as a sort sub name. The previous behaviour of treating "CORE::fake" as a
3122 sort sub name has been restored.
3123 L<[perl #123410]|https://rt.perl.org/Ticket/Display.html?id=123410>.
3127 Outside of C<use utf8>, a single-character Latin-1 lexical variable is
3128 disallowed. The error message for it, "Can't use global C<$foo>...", was
3129 giving garbage instead of the variable name.
3133 C<readline> on a nonexistent handle was causing C<${^LAST_FH}> to produce a
3134 reference to an undefined scalar (or fail an assertion). Now
3135 C<${^LAST_FH}> ends up undefined.
3139 C<(...)x...> in void context now applies scalar context to the left-hand
3140 argument, instead of the context the current sub was called in.
3141 L<[perl #123020]|https://rt.perl.org/Ticket/Display.html?id=123020>.
3145 =head1 Known Problems
3151 A goal is for Perl to be able to be recompiled to work reasonably well on any
3152 Unicode version. In Perl 5.22, though, the earliest such version is Unicode
3153 5.1 (current is 7.0).
3163 The C<cmp> (and hence C<sort>) operators do not necessarily give the
3164 correct results when both operands are UTF-EBCDIC encoded strings and
3165 there is a mixture of ASCII and/or control characters, along with other
3170 Ranges containing C<\N{...}> in the C<tr///> (and C<y///>)
3171 transliteration operators are treated differently than the equivalent
3172 ranges in regular expression pattersn. They should, but don't, cause
3173 the values in the ranges to all be treated as Unicode code points, and
3174 not native ones. (L<perlre/Version 8 Regular Expressions> gives
3175 details as to how it should work.)
3179 Encode and encoding are mostly broken.
3183 Many CPAN modules that are shipped with core show failing tests.
3187 C<pack>/C<unpack> with C<"U0"> format may not work properly.
3193 The following modules are known to have test failures with this version of
3194 Perl. Patches have been submitted, so there will hopefully be new releases
3201 L<B::Generate> version 1.50
3205 L<B::Utils> version 0.25
3209 L<Dancer> version 1.3130
3213 L<Data::Alias> version 1.18
3217 L<Data::Util> version 0.63
3221 L<Devel::Spy> version 0.07
3225 L<invoker> version 0.34
3229 L<Lexical::Var> version 0.009
3233 L<Mason> version 2.22
3237 L<NgxQueue> version 0.02
3241 L<Padre> version 1.00
3245 L<Parse::Keyword> 0.08
3253 Brian McCauley died on May 8, 2015. He was a frequent poster to Usenet, Perl
3254 Monks, and other Perl forums, and made several CPAN contributions under the
3255 nick NOBULL, including to the Perl FAQ. He attended almost every
3256 YAPC::Europe, and indeed, helped organise YAPC::Europe 2006 and the QA
3257 Hackathon 2009. His wit and his delight in intricate systems were
3258 particularly apparent in his love of board games; many Perl mongers will
3259 have fond memories of playing Fluxx and other games with Brian. He will be
3262 =head1 Acknowledgements
3264 XXX Generate this with:
3266 perl Porting/acknowledgements.pl v5.20.0..HEAD
3268 =head1 Reporting Bugs
3270 If you find what you think is a bug, you might check the articles recently
3271 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
3272 https://rt.perl.org/ . There may also be information at
3273 http://www.perl.org/ , the Perl Home Page.
3275 If you believe you have an unreported bug, please run the L<perlbug> program
3276 included with your release. Be sure to trim your bug down to a tiny but
3277 sufficient test case. Your bug report, along with the output of C<perl -V>,
3278 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
3280 If the bug you are reporting has security implications, which make it
3281 inappropriate to send to a publicly archived mailing list, then please send it
3282 to perl5-security-report@perl.org. This points to a closed subscription
3283 unarchived mailing list, which includes all the core committers, who will be
3284 able to help assess the impact of issues, figure out a resolution, and help
3285 co-ordinate the release of patches to mitigate or fix the problem across all
3286 platforms on which Perl is supported. Please only use this address for
3287 security issues in the Perl core, not for modules independently distributed on
3292 The F<Changes> file for an explanation of how to view exhaustive details on
3295 The F<INSTALL> file for how to build Perl.
3297 The F<README> file for general stuff.
3299 The F<Artistic> and F<Copying> files for copyright information.