1PERL5200DELTA(1)       Perl Programmers Reference Guide       PERL5200DELTA(1)
2
3
4

NAME

6       perl5200delta - what is new for perl v5.20.0
7

DESCRIPTION

9       This document describes differences between the 5.18.0 release and the
10       5.20.0 release.
11
12       If you are upgrading from an earlier release such as 5.16.0, first read
13       perl5180delta, which describes differences between 5.16.0 and 5.18.0.
14

Core Enhancements

16   Experimental Subroutine signatures
17       Declarative syntax to unwrap argument list into lexical variables.
18       "sub foo ($a,$b) {...}" checks the number of arguments and puts the
19       arguments into lexical variables.  Signatures are not equivalent to the
20       existing idiom of "sub foo { my($a,$b) = @_; ... }".  Signatures are
21       only available by enabling a non-default feature, and generate warnings
22       about being experimental.  The syntactic clash with prototypes is
23       managed by disabling the short prototype syntax when signatures are
24       enabled.
25
26       See "Signatures" in perlsub for details.
27
28   "sub"s now take a "prototype" attribute
29       When declaring or defining a "sub", the prototype can now be specified
30       inside of a "prototype" attribute instead of in parens following the
31       name.
32
33       For example, "sub foo($$){}" could be rewritten as "sub foo :
34       prototype($$){}".
35
36   More consistent prototype parsing
37       Multiple semicolons in subroutine prototypes have long been tolerated
38       and treated as a single semicolon.  There was one case where this did
39       not happen.  A subroutine whose prototype begins with "*" or ";*" can
40       affect whether a bareword is considered a method name or sub call.
41       This now applies also to ";;;*".
42
43       Whitespace has long been allowed inside subroutine prototypes, so "sub(
44       $ $ )" is equivalent to "sub($$)", but until now it was stripped when
45       the subroutine was parsed.  Hence, whitespace was not allowed in
46       prototypes set by "Scalar::Util::set_prototype".  Now it is permitted,
47       and the parser no longer strips whitespace.  This means "prototype
48       &mysub" returns the original prototype, whitespace and all.
49
50   "rand" now uses a consistent random number generator
51       Previously perl would use a platform specific random number generator,
52       varying between the libc rand(), random() or drand48().
53
54       This meant that the quality of perl's random numbers would vary from
55       platform to platform, from the 15 bits of rand() on Windows to 48-bits
56       on POSIX platforms such as Linux with drand48().
57
58       Perl now uses its own internal drand48() implementation on all
59       platforms.  This does not make perl's "rand" cryptographically secure.
60       [perl #115928]
61
62   New slice syntax
63       The new %hash{...} and %array[...] syntax returns a list of key/value
64       (or index/value) pairs.  See "Key/Value Hash Slices" in perldata.
65
66   Experimental Postfix Dereferencing
67       When the "postderef" feature is in effect, the following syntactical
68       equivalencies are set up:
69
70         $sref->$*;  # same as ${ $sref }  # interpolates
71         $aref->@*;  # same as @{ $aref }  # interpolates
72         $href->%*;  # same as %{ $href }
73         $cref->&*;  # same as &{ $cref }
74         $gref->**;  # same as *{ $gref }
75
76         $aref->$#*; # same as $#{ $aref }
77
78         $gref->*{ $slot }; # same as *{ $gref }{ $slot }
79
80         $aref->@[ ... ];  # same as @$aref[ ... ]  # interpolates
81         $href->@{ ... };  # same as @$href{ ... }  # interpolates
82         $aref->%[ ... ];  # same as %$aref[ ... ]
83         $href->%{ ... };  # same as %$href{ ... }
84
85       Those marked as interpolating only interpolate if the associated
86       "postderef_qq" feature is also enabled.  This feature is experimental
87       and will trigger "experimental::postderef"-category warnings when used,
88       unless they are suppressed.
89
90       For more information, consult the Postfix Dereference Syntax section of
91       perlref.
92
93   Unicode 6.3 now supported
94       Perl now supports and is shipped with Unicode 6.3 (though Perl may be
95       recompiled with any previous Unicode release as well).  A detailed list
96       of Unicode 6.3 changes is at
97       <http://www.unicode.org/versions/Unicode6.3.0/>.
98
99   New "\p{Unicode}" regular expression pattern property
100       This is a synonym for "\p{Any}" and matches the set of Unicode-defined
101       code points 0 - 0x10FFFF.
102
103   Better 64-bit support
104       On 64-bit platforms, the internal array functions now use 64-bit
105       offsets, allowing Perl arrays to hold more than 2**31 elements, if you
106       have the memory available.
107
108       The regular expression engine now supports strings longer than 2**31
109       characters.  [perl #112790, #116907]
110
111       The functions PerlIO_get_bufsiz, PerlIO_get_cnt, PerlIO_set_cnt and
112       PerlIO_set_ptrcnt now have SSize_t, rather than int, return values and
113       parameters.
114
115   "use locale" now works on UTF-8 locales
116       Until this release, only single-byte locales, such as the ISO 8859
117       series were supported.  Now, the increasingly common multi-byte UTF-8
118       locales are also supported.  A UTF-8 locale is one in which the
119       character set is Unicode and the encoding is UTF-8.  The POSIX
120       "LC_CTYPE" category operations (case changing (like "lc()", "\U"), and
121       character classification ("\w", "\D", "qr/[[:punct:]]/")) under such a
122       locale work just as if not under locale, but instead as if under
123       "use feature 'unicode_strings'", except taint rules are followed.
124       Sorting remains by code point order in this release.  [perl #56820].
125
126   "use locale" now compiles on systems without locale ability
127       Previously doing this caused the program to not compile.  Within its
128       scope the program behaves as if in the "C" locale.  Thus programs
129       written for platforms that support locales can run on locale-less
130       platforms without change.  Attempts to change the locale away from the
131       "C" locale will, of course, fail.
132
133   More locale initialization fallback options
134       If there was an error with locales during Perl start-up, it immediately
135       gave up and tried to use the "C" locale.  Now it first tries using
136       other locales given by the environment variables, as detailed in
137       "ENVIRONMENT" in perllocale.  For example, if "LC_ALL" and "LANG" are
138       both set, and using the "LC_ALL" locale fails, Perl will now try the
139       "LANG" locale, and only if that fails, will it fall back to "C".  On
140       Windows machines, Perl will try, ahead of using "C", the system default
141       locale if all the locales given by environment variables fail.
142
143   "-DL" runtime option now added for tracing locale setting
144       This is designed for Perl core developers to aid in field debugging
145       bugs regarding locales.
146
147   -F now implies -a and -a implies -n
148       Previously -F without -a was a no-op, and -a without -n or -p was a no-
149       op, with this change, if you supply -F then both -a and -n are implied
150       and if you supply -a then -n is implied.
151
152       You can still use -p for its extra behaviour. [perl #116190]
153
154   $a and $b warnings exemption
155       The special variables $a and $b, used in "sort", are now exempt from
156       "used once" warnings, even where "sort" is not used.  This makes it
157       easier for CPAN modules to provide functions using $a and $b for
158       similar purposes.  [perl #120462]
159

Security

161   Avoid possible read of free()d memory during parsing
162       It was possible that free()d memory could be read during parsing in the
163       unusual circumstance of the Perl program ending with a heredoc and the
164       last line of the file on disk having no terminating newline character.
165       This has now been fixed.
166

Incompatible Changes

168   "do" can no longer be used to call subroutines
169       The "do SUBROUTINE(LIST)" form has resulted in a deprecation warning
170       since Perl v5.0.0, and is now a syntax error.
171
172   Quote-like escape changes
173       The character after "\c" in a double-quoted string ("..." or qq(...))
174       or regular expression must now be a printable character and may not be
175       "{".
176
177       A literal "{" after "\B" or "\b" is now fatal.
178
179       These were deprecated in perl v5.14.0.
180
181   Tainting happens under more circumstances; now conforms to documentation
182       This affects regular expression matching and changing the case of a
183       string ("lc", "\U", etc.) within the scope of "use locale".  The result
184       is now tainted based on the operation, no matter what the contents of
185       the string were, as the documentation (perlsec, "SECURITY" in
186       perllocale) indicates it should.  Previously, for the case change
187       operation, if the string contained no characters whose case change
188       could be affected by the locale, the result would not be tainted.  For
189       example, the result of "uc()" on an empty string or one containing only
190       above-Latin1 code points is now tainted, and wasn't before.  This leads
191       to more consistent tainting results.  Regular expression patterns taint
192       their non-binary results (like $&, $2) if and only if the pattern
193       contains elements whose matching depends on the current (potentially
194       tainted) locale.  Like the case changing functions, the actual contents
195       of the string being matched now do not matter, whereas formerly it did.
196       For example, if the pattern contains a "\w", the results will be
197       tainted even if the match did not have to use that portion of the
198       pattern to succeed or fail, because what a "\w" matches depends on
199       locale.  However, for example, a "." in a pattern will not enable
200       tainting, because the dot matches any single character, and what the
201       current locale is doesn't change in any way what matches and what
202       doesn't.
203
204   "\p{}", "\P{}" matching has changed for non-Unicode code points.
205       "\p{}" and "\P{}" are defined by Unicode only on Unicode-defined code
206       points ("U+0000" through "U+10FFFF").  Their behavior on matching these
207       legal Unicode code points is unchanged, but there are changes for code
208       points 0x110000 and above.  Previously, Perl treated the result of
209       matching "\p{}" and "\P{}" against these as "undef", which translates
210       into "false".  For "\P{}", this was then complemented into "true".  A
211       warning was supposed to be raised when this happened.  However, various
212       optimizations could prevent the warning, and the results were often
213       counter-intuitive, with both a match and its seeming complement being
214       false.  Now all non-Unicode code points are treated as typical
215       unassigned Unicode code points.  This generally is more Do-What-I-Mean.
216       A warning is raised only if the results are arguably different from a
217       strict Unicode approach, and from what Perl used to do.  Code that
218       needs to be strictly Unicode compliant can make this warning fatal, and
219       then Perl always raises the warning.
220
221       Details are in "Beyond Unicode code points" in perlunicode.
222
223   "\p{All}" has been expanded to match all possible code points
224       The Perl-defined regular expression pattern element "\p{All}", unused
225       on CPAN, used to match just the Unicode code points; now it matches all
226       possible code points; that is, it is equivalent to "qr/./s".  Thus
227       "\p{All}" is no longer synonymous with "\p{Any}", which continues to
228       match just the Unicode code points, as Unicode says it should.
229
230   Data::Dumper's output may change
231       Depending on the data structures dumped and the settings set for
232       Data::Dumper, the dumped output may have changed from previous
233       versions.
234
235       If you have tests that depend on the exact output of Data::Dumper, they
236       may fail.
237
238       To avoid this problem in your code, test against the data structure
239       from evaluating the dumped structure, instead of the dump itself.
240
241   Locale decimal point character no longer leaks outside of "use locale"
242       scope
243       This is actually a bug fix, but some code has come to rely on the bug
244       being present, so this change is listed here.  The current locale that
245       the program is running under is not supposed to be visible to Perl code
246       except within the scope of a "use locale".  However, until now under
247       certain circumstances, the character used for a decimal point (often a
248       comma) leaked outside the scope.  If your code is affected by this
249       change, simply add a "use locale".
250
251   Assignments of Windows sockets error codes to $! now prefer errno.h values
252       over WSAGetLastError() values
253       In previous versions of Perl, Windows sockets error codes as returned
254       by WSAGetLastError() were assigned to $!, and some constants such as
255       ECONNABORTED, not in errno.h in VC++ (or the various Windows ports of
256       gcc) were defined to corresponding WSAE* values to allow $! to be
257       tested against the E* constants exported by Errno and POSIX.
258
259       This worked well until VC++ 2010 and later, which introduced new E*
260       constants with values > 100 into errno.h, including some being
261       (re)defined by perl to WSAE* values.  That caused problems when linking
262       XS code against other libraries which used the original definitions of
263       errno.h constants.
264
265       To avoid this incompatibility, perl now maps WSAE* error codes to E*
266       values where possible, and assigns those values to $!.  The E*
267       constants exported by Errno and POSIX are updated to match so that
268       testing $! against them, wherever previously possible, will continue to
269       work as expected, and all E* constants found in errno.h are now
270       exported from those modules with their original errno.h values.
271
272       In order to avoid breakage in existing Perl code which assigns WSAE*
273       values to $!, perl now intercepts the assignment and performs the same
274       mapping to E* values as it uses internally when assigning to $! itself.
275
276       However, one backwards-incompatibility remains: existing Perl code
277       which compares $! against the numeric values of the WSAE* error codes
278       that were previously assigned to $! will now be broken in those cases
279       where a corresponding E* value has been assigned instead.  This is only
280       an issue for those E* values < 100, which were always exported from
281       Errno and POSIX with their original errno.h values, and therefore could
282       not be used for WSAE* error code tests (e.g. WSAEINVAL is 10022, but
283       the corresponding EINVAL is 22).  (E* values > 100, if present, were
284       redefined to WSAE* values anyway, so compatibility can be achieved by
285       using the E* constants, which will work both before and after this
286       change, albeit using different numeric values under the hood.)
287
288   Functions "PerlIO_vsprintf" and "PerlIO_sprintf" have been removed
289       These two functions, undocumented, unused in CPAN, and problematic,
290       have been removed.
291

Deprecations

293   The "/\C/" character class
294       The "/\C/" regular expression character class is deprecated. From perl
295       5.22 onwards it will generate a warning, and from perl 5.24 onwards it
296       will be a regular expression compiler error. If you need to examine the
297       individual bytes that make up a UTF8-encoded character, then use
298       "utf8::encode()" on the string (or a copy) first.
299
300   Literal control characters in variable names
301       This deprecation affects things like $\cT, where \cT is a literal
302       control (such as a "NAK" or "NEGATIVE ACKNOWLEDGE" character) in the
303       source code.  Surprisingly, it appears that originally this was
304       intended as the canonical way of accessing variables like $^T, with the
305       caret form only being added as an alternative.
306
307       The literal control form is being deprecated for two main reasons.  It
308       has what are likely unfixable bugs, such as $\cI not working as an
309       alias for $^I, and their usage not being portable to non-ASCII
310       platforms: While $^T will work everywhere, \cT is whitespace in EBCDIC.
311       [perl #119123]
312
313   References to non-integers and non-positive integers in $/
314       Setting $/ to a reference to zero or a reference to a negative integer
315       is now deprecated, and will behave exactly as though it was set to
316       "undef".  If you want slurp behavior set $/ to "undef" explicitly.
317
318       Setting $/ to a reference to a non integer is now forbidden and will
319       throw an error. Perl has never documented what would happen in this
320       context and while it used to behave the same as setting $/ to the
321       address of the references in future it may behave differently, so we
322       have forbidden this usage.
323
324   Character matching routines in POSIX
325       Use of any of these functions in the "POSIX" module is now deprecated:
326       "isalnum", "isalpha", "iscntrl", "isdigit", "isgraph", "islower",
327       "isprint", "ispunct", "isspace", "isupper", and "isxdigit".  The
328       functions are buggy and don't work on UTF-8 encoded strings.  See their
329       entries in POSIX for more information.
330
331       A warning is raised on the first call to any of them from each place in
332       the code that they are called.  (Hence a repeated statement in a loop
333       will raise just the one warning.)
334
335   Interpreter-based threads are now discouraged
336       The "interpreter-based threads" provided by Perl are not the fast,
337       lightweight system for multitasking that one might expect or hope for.
338       Threads are implemented in a way that make them easy to misuse.  Few
339       people know how to use them correctly or will be able to provide help.
340
341       The use of interpreter-based threads in perl is officially discouraged.
342
343   Module removals
344       The following modules will be removed from the core distribution in a
345       future release, and will at that time need to be installed from CPAN.
346       Distributions on CPAN which require these modules will need to list
347       them as prerequisites.
348
349       The core versions of these modules will now issue "deprecated"-category
350       warnings to alert you to this fact.  To silence these deprecation
351       warnings, install the modules in question from CPAN.
352
353       Note that the planned removal of these modules from core does not
354       reflect a judgement about the quality of the code and should not be
355       taken as a suggestion that their use be halted.  Their disinclusion
356       from core primarily hinges on their necessity to bootstrapping a fully
357       functional, CPAN-capable Perl installation, not on concerns over their
358       design.
359
360       CGI and its associated CGI:: packages
361       inc::latest
362       Package::Constants
363       Module::Build and its associated Module::Build:: packages
364
365   Utility removals
366       The following utilities will be removed from the core distribution in a
367       future release, and will at that time need to be installed from CPAN.
368
369       find2perl
370       s2p
371       a2p
372

Performance Enhancements

374       •   Perl has a new copy-on-write mechanism that avoids the need to copy
375           the internal string buffer when assigning from one scalar to
376           another. This makes copying large strings appear much faster.
377           Modifying one of the two (or more) strings after an assignment will
378           force a copy internally. This makes it unnecessary to pass strings
379           by reference for efficiency.
380
381           This feature was already available in 5.18.0, but wasn't enabled by
382           default. It is the default now, and so you no longer need build
383           perl with the Configure argument:
384
385               -Accflags=-DPERL_NEW_COPY_ON_WRITE
386
387           It can be disabled (for now) in a perl build with:
388
389               -Accflags=-DPERL_NO_COW
390
391           On some operating systems Perl can be compiled in such a way that
392           any attempt to modify string buffers shared by multiple SVs will
393           crash.  This way XS authors can test that their modules handle
394           copy-on-write scalars correctly.  See "Copy on Write" in perlguts
395           for detail.
396
397       •   Perl has an optimizer for regular expression patterns.  It analyzes
398           the pattern to find things such as the minimum length a string has
399           to be to match, etc.  It now better handles code points that are
400           above the Latin1 range.
401
402       •   Executing a regex that contains the "^" anchor (or its variant
403           under the "/m" flag) has been made much faster in several
404           situations.
405
406       •   Precomputed hash values are now used in more places during method
407           lookup.
408
409       •   Constant hash key lookups ($hash{key} as opposed to $hash{$key})
410           have long had the internal hash value computed at compile time, to
411           speed up lookup.  This optimisation has only now been applied to
412           hash slices as well.
413
414       •   Combined "and" and "or" operators in void context, like those
415           generated for "unless ($a && $b)" and "if ($a || b)" now short
416           circuit directly to the end of the statement. [perl #120128]
417
418       •   In certain situations, when "return" is the last statement in a
419           subroutine's main scope, it will be optimized out. This means code
420           like:
421
422             sub baz { return $cat; }
423
424           will now behave like:
425
426             sub baz { $cat; }
427
428           which is notably faster.
429
430           [perl #120765]
431
432       •   Code like:
433
434             my $x; # or @x, %x
435             my $y;
436
437           is now optimized to:
438
439             my ($x, $y);
440
441           In combination with the padrange optimization introduced in
442           v5.18.0, this means longer uninitialized my variable statements are
443           also optimized, so:
444
445             my $x; my @y; my %z;
446
447           becomes:
448
449             my ($x, @y, %z);
450
451           [perl #121077]
452
453       •   The creation of certain sorts of lists, including array and hash
454           slices, is now faster.
455
456       •   The optimisation for arrays indexed with a small constant integer
457           is now applied for integers in the range -128..127, rather than
458           0..255. This should speed up Perl code using expressions like
459           $x[-1], at the expense of (presumably much rarer) code using
460           expressions like $x[200].
461
462       •   The first iteration over a large hash (using "keys" or "each") is
463           now faster. This is achieved by preallocating the hash's internal
464           iterator state, rather than lazily creating it when the hash is
465           first iterated. (For small hashes, the iterator is still created
466           only when first needed. The assumption is that small hashes are
467           more likely to be used as objects, and therefore never allocated.
468           For large hashes, that's less likely to be true, and the cost of
469           allocating the iterator is swamped by the cost of allocating space
470           for the hash itself.)
471
472       •   When doing a global regex match on a string that came from the
473           "readline" or "<>" operator, the data is no longer copied
474           unnecessarily.  [perl #121259]
475
476       •   Dereferencing (as in "$obj->[0]" or "$obj->{k}") is now faster when
477           $obj is an instance of a class that has overloaded methods, but
478           doesn't overload any of the dereferencing methods "@{}", "%{}", and
479           so on.
480
481       •   Perl's optimiser no longer skips optimising code that follows
482           certain "eval {}" expressions (including those with an apparent
483           infinite loop).
484
485       •   The implementation now does a better job of avoiding meaningless
486           work at runtime. Internal effect-free "null" operations (created as
487           a side-effect of parsing Perl programs) are normally deleted during
488           compilation. That deletion is now applied in some situations that
489           weren't previously handled.
490
491       •   Perl now does less disk I/O when dealing with Unicode properties
492           that cover up to three ranges of consecutive code points.
493

Modules and Pragmata

495   New Modules and Pragmata
496       •   experimental 0.007 has been added to the Perl core.
497
498       •   IO::Socket::IP 0.29 has been added to the Perl core.
499
500   Updated Modules and Pragmata
501       •   Archive::Tar has been upgraded from version 1.90 to 1.96.
502
503       •   arybase has been upgraded from version 0.06 to 0.07.
504
505       •   Attribute::Handlers has been upgraded from version 0.94 to 0.96.
506
507       •   attributes has been upgraded from version 0.21 to 0.22.
508
509       •   autodie has been upgraded from version 2.13 to 2.23.
510
511       •   AutoLoader has been upgraded from version 5.73 to 5.74.
512
513       •   autouse has been upgraded from version 1.07 to 1.08.
514
515       •   B has been upgraded from version 1.42 to 1.48.
516
517       •   B::Concise has been upgraded from version 0.95 to 0.992.
518
519       •   B::Debug has been upgraded from version 1.18 to 1.19.
520
521       •   B::Deparse has been upgraded from version 1.20 to 1.26.
522
523       •   base has been upgraded from version 2.18 to 2.22.
524
525       •   Benchmark has been upgraded from version 1.15 to 1.18.
526
527       •   bignum has been upgraded from version 0.33 to 0.37.
528
529       •   Carp has been upgraded from version 1.29 to 1.3301.
530
531       •   CGI has been upgraded from version 3.63 to 3.65.  NOTE: CGI is
532           deprecated and may be removed from a future version of Perl.
533
534       •   charnames has been upgraded from version 1.36 to 1.40.
535
536       •   Class::Struct has been upgraded from version 0.64 to 0.65.
537
538       •   Compress::Raw::Bzip2 has been upgraded from version 2.060 to 2.064.
539
540       •   Compress::Raw::Zlib has been upgraded from version 2.060 to 2.065.
541
542       •   Config::Perl::V has been upgraded from version 0.17 to 0.20.
543
544       •   constant has been upgraded from version 1.27 to 1.31.
545
546       •   CPAN has been upgraded from version 2.00 to 2.05.
547
548       •   CPAN::Meta has been upgraded from version 2.120921 to 2.140640.
549
550       •   CPAN::Meta::Requirements has been upgraded from version 2.122 to
551           2.125.
552
553       •   CPAN::Meta::YAML has been upgraded from version 0.008 to 0.012.
554
555       •   Data::Dumper has been upgraded from version 2.145 to 2.151.
556
557       •   DB has been upgraded from version 1.04 to 1.07.
558
559       •   DB_File has been upgraded from version 1.827 to 1.831.
560
561       •   DBM_Filter has been upgraded from version 0.05 to 0.06.
562
563       •   deprecate has been upgraded from version 0.02 to 0.03.
564
565       •   Devel::Peek has been upgraded from version 1.11 to 1.16.
566
567       •   Devel::PPPort has been upgraded from version 3.20 to 3.21.
568
569       •   diagnostics has been upgraded from version 1.31 to 1.34.
570
571       •   Digest::MD5 has been upgraded from version 2.52 to 2.53.
572
573       •   Digest::SHA has been upgraded from version 5.84 to 5.88.
574
575       •   DynaLoader has been upgraded from version 1.18 to 1.25.
576
577       •   Encode has been upgraded from version 2.49 to 2.60.
578
579       •   encoding has been upgraded from version 2.6_01 to 2.12.
580
581       •   English has been upgraded from version 1.06 to 1.09.
582
583           $OLD_PERL_VERSION was added as an alias of $].
584
585       •   Errno has been upgraded from version 1.18 to 1.20_03.
586
587       •   Exporter has been upgraded from version 5.68 to 5.70.
588
589       •   ExtUtils::CBuilder has been upgraded from version 0.280210 to
590           0.280216.
591
592       •   ExtUtils::Command has been upgraded from version 1.17 to 1.18.
593
594       •   ExtUtils::Embed has been upgraded from version 1.30 to 1.32.
595
596       •   ExtUtils::Install has been upgraded from version 1.59 to 1.67.
597
598       •   ExtUtils::MakeMaker has been upgraded from version 6.66 to 6.98.
599
600       •   ExtUtils::Miniperl has been upgraded from version  to 1.01.
601
602       •   ExtUtils::ParseXS has been upgraded from version 3.18 to 3.24.
603
604       •   ExtUtils::Typemaps has been upgraded from version 3.19 to 3.24.
605
606       •   ExtUtils::XSSymSet has been upgraded from version 1.2 to 1.3.
607
608       •   feature has been upgraded from version 1.32 to 1.36.
609
610       •   fields has been upgraded from version 2.16 to 2.17.
611
612       •   File::Basename has been upgraded from version 2.84 to 2.85.
613
614       •   File::Copy has been upgraded from version 2.26 to 2.29.
615
616       •   File::DosGlob has been upgraded from version 1.10 to 1.12.
617
618       •   File::Fetch has been upgraded from version 0.38 to 0.48.
619
620       •   File::Find has been upgraded from version 1.23 to 1.27.
621
622       •   File::Glob has been upgraded from version 1.20 to 1.23.
623
624       •   File::Spec has been upgraded from version 3.40 to 3.47.
625
626       •   File::Temp has been upgraded from version 0.23 to 0.2304.
627
628       •   FileCache has been upgraded from version 1.08 to 1.09.
629
630       •   Filter::Simple has been upgraded from version 0.89 to 0.91.
631
632       •   Filter::Util::Call has been upgraded from version 1.45 to 1.49.
633
634       •   Getopt::Long has been upgraded from version 2.39 to 2.42.
635
636       •   Getopt::Std has been upgraded from version 1.07 to 1.10.
637
638       •   Hash::Util::FieldHash has been upgraded from version 1.10 to 1.15.
639
640       •   HTTP::Tiny has been upgraded from version 0.025 to 0.043.
641
642       •   I18N::Langinfo has been upgraded from version 0.10 to 0.11.
643
644       •   I18N::LangTags has been upgraded from version 0.39 to 0.40.
645
646       •   if has been upgraded from version 0.0602 to 0.0603.
647
648       •   inc::latest has been upgraded from version 0.4003 to 0.4205.  NOTE:
649           inc::latest is deprecated and may be removed from a future version
650           of Perl.
651
652       •   integer has been upgraded from version 1.00 to 1.01.
653
654       •   IO has been upgraded from version 1.28 to 1.31.
655
656       •   IO::Compress::Gzip and friends have been upgraded from version
657           2.060 to 2.064.
658
659       •   IPC::Cmd has been upgraded from version 0.80 to 0.92.
660
661       •   IPC::Open3 has been upgraded from version 1.13 to 1.16.
662
663       •   IPC::SysV has been upgraded from version 2.03 to 2.04.
664
665       •   JSON::PP has been upgraded from version 2.27202 to 2.27203.
666
667       •   List::Util has been upgraded from version 1.27 to 1.38.
668
669       •   locale has been upgraded from version 1.02 to 1.03.
670
671       •   Locale::Codes has been upgraded from version 3.25 to 3.30.
672
673       •   Locale::Maketext has been upgraded from version 1.23 to 1.25.
674
675       •   Math::BigInt has been upgraded from version 1.9991 to 1.9993.
676
677       •   Math::BigInt::FastCalc has been upgraded from version 0.30 to 0.31.
678
679       •   Math::BigRat has been upgraded from version 0.2604 to 0.2606.
680
681       •   MIME::Base64 has been upgraded from version 3.13 to 3.14.
682
683       •   Module::Build has been upgraded from version 0.4003 to 0.4205.
684           NOTE: Module::Build is deprecated and may be removed from a future
685           version of Perl.
686
687       •   Module::CoreList has been upgraded from version 2.89 to 3.10.
688
689       •   Module::Load has been upgraded from version 0.24 to 0.32.
690
691       •   Module::Load::Conditional has been upgraded from version 0.54 to
692           0.62.
693
694       •   Module::Metadata has been upgraded from version 1.000011 to
695           1.000019.
696
697       •   mro has been upgraded from version 1.11 to 1.16.
698
699       •   Net::Ping has been upgraded from version 2.41 to 2.43.
700
701       •   Opcode has been upgraded from version 1.25 to 1.27.
702
703       •   Package::Constants has been upgraded from version 0.02 to 0.04.
704           NOTE: Package::Constants is deprecated and may be removed from a
705           future version of Perl.
706
707       •   Params::Check has been upgraded from version 0.36 to 0.38.
708
709       •   parent has been upgraded from version 0.225 to 0.228.
710
711       •   Parse::CPAN::Meta has been upgraded from version 1.4404 to 1.4414.
712
713       •   Perl::OSType has been upgraded from version 1.003 to 1.007.
714
715       •   perlfaq has been upgraded from version 5.0150042 to 5.0150044.
716
717       •   PerlIO has been upgraded from version 1.07 to 1.09.
718
719       •   PerlIO::encoding has been upgraded from version 0.16 to 0.18.
720
721       •   PerlIO::scalar has been upgraded from version 0.16 to 0.18.
722
723       •   PerlIO::via has been upgraded from version 0.12 to 0.14.
724
725       •   Pod::Escapes has been upgraded from version 1.04 to 1.06.
726
727       •   Pod::Functions has been upgraded from version 1.06 to 1.08.
728
729       •   Pod::Html has been upgraded from version 1.18 to 1.21.
730
731       •   Pod::Parser has been upgraded from version 1.60 to 1.62.
732
733       •   Pod::Perldoc has been upgraded from version 3.19 to 3.23.
734
735       •   Pod::Usage has been upgraded from version 1.61 to 1.63.
736
737       •   POSIX has been upgraded from version 1.32 to 1.38_03.
738
739       •   re has been upgraded from version 0.23 to 0.26.
740
741       •   Safe has been upgraded from version 2.35 to 2.37.
742
743       •   Scalar::Util has been upgraded from version 1.27 to 1.38.
744
745       •   SDBM_File has been upgraded from version 1.09 to 1.11.
746
747       •   Socket has been upgraded from version 2.009 to 2.013.
748
749       •   Storable has been upgraded from version 2.41 to 2.49.
750
751       •   strict has been upgraded from version 1.07 to 1.08.
752
753       •   subs has been upgraded from version 1.01 to 1.02.
754
755       •   Sys::Hostname has been upgraded from version 1.17 to 1.18.
756
757       •   Sys::Syslog has been upgraded from version 0.32 to 0.33.
758
759       •   Term::Cap has been upgraded from version 1.13 to 1.15.
760
761       •   Term::ReadLine has been upgraded from version 1.12 to 1.14.
762
763       •   Test::Harness has been upgraded from version 3.26 to 3.30.
764
765       •   Test::Simple has been upgraded from version 0.98 to 1.001002.
766
767       •   Text::ParseWords has been upgraded from version 3.28 to 3.29.
768
769       •   Text::Tabs has been upgraded from version 2012.0818 to 2013.0523.
770
771       •   Text::Wrap has been upgraded from version 2012.0818 to 2013.0523.
772
773       •   Thread has been upgraded from version 3.02 to 3.04.
774
775       •   Thread::Queue has been upgraded from version 3.02 to 3.05.
776
777       •   threads has been upgraded from version 1.86 to 1.93.
778
779       •   threads::shared has been upgraded from version 1.43 to 1.46.
780
781       •   Tie::Array has been upgraded from version 1.05 to 1.06.
782
783       •   Tie::File has been upgraded from version 0.99 to 1.00.
784
785       •   Tie::Hash has been upgraded from version 1.04 to 1.05.
786
787       •   Tie::Scalar has been upgraded from version 1.02 to 1.03.
788
789       •   Tie::StdHandle has been upgraded from version 4.3 to 4.4.
790
791       •   Time::HiRes has been upgraded from version 1.9725 to 1.9726.
792
793       •   Time::Piece has been upgraded from version 1.20_01 to 1.27.
794
795       •   Unicode::Collate has been upgraded from version 0.97 to 1.04.
796
797       •   Unicode::Normalize has been upgraded from version 1.16 to 1.17.
798
799       •   Unicode::UCD has been upgraded from version 0.51 to 0.57.
800
801       •   utf8 has been upgraded from version 1.10 to 1.13.
802
803       •   version has been upgraded from version 0.9902 to 0.9908.
804
805       •   vmsish has been upgraded from version 1.03 to 1.04.
806
807       •   warnings has been upgraded from version 1.18 to 1.23.
808
809       •   Win32 has been upgraded from version 0.47 to 0.49.
810
811       •   XS::Typemap has been upgraded from version 0.10 to 0.13.
812
813       •   XSLoader has been upgraded from version 0.16 to 0.17.
814

Documentation

816   New Documentation
817       perlrepository
818
819       This document was removed (actually, renamed perlgit and given a major
820       overhaul) in Perl v5.14, causing Perl documentation websites to show
821       the now out of date version in Perl v5.12 as the latest version.  It
822       has now been restored in stub form, directing readers to current
823       information.
824
825   Changes to Existing Documentation
826       perldata
827
828       •   New sections have been added to document the new index/value array
829           slice and key/value hash slice syntax.
830
831       perldebguts
832
833       •   The "DB::goto" and "DB::lsub" debugger subroutines are now
834           documented.  [perl #77680]
835
836       perlexperiment
837
838       •   "\s" matching "\cK" is marked experimental.
839
840       •   ithreads were accepted in v5.8.0 (but are discouraged as of
841           v5.20.0).
842
843       •   Long doubles are not considered experimental.
844
845       •   Code in regular expressions, regular expression backtracking verbs,
846           and lvalue subroutines are no longer listed as experimental.  (This
847           also affects perlre and perlsub.)
848
849       perlfunc
850
851       •   "chop" and "chomp" now note that they can reset the hash iterator.
852
853       •   "exec"'s handling of arguments is now more clearly documented.
854
855       •   "eval EXPR" now has caveats about expanding floating point numbers
856           in some locales.
857
858       •   "goto EXPR" is now documented to handle an expression that evalutes
859           to a code reference as if it was "goto &$coderef".  This behavior
860           is at least ten years old.
861
862       •   Since Perl v5.10, it has been possible for subroutines in @INC to
863           return a reference to a scalar holding initial source code to
864           prepend to the file.  This is now documented.
865
866       •   The documentation of "ref" has been updated to recommend the use of
867           "blessed", "isa" and "reftype" when dealing with references to
868           blessed objects.
869
870       perlguts
871
872       •   Numerous minor changes have been made to reflect changes made to
873           the perl internals in this release.
874
875       •   New sections on Read-Only Values and Copy on Write have been added.
876
877       perlhack
878
879       •   The Super Quick Patch Guide section has been updated.
880
881       perlhacktips
882
883       •   The documentation has been updated to include some more examples of
884           "gdb" usage.
885
886       perllexwarn
887
888       •   The perllexwarn documentation used to describe the hierarchy of
889           warning categories understood by the warnings pragma. That
890           description has now been moved to the warnings documentation
891           itself, leaving perllexwarn as a stub that points to it. This
892           change consolidates all documentation for lexical warnings in a
893           single place.
894
895       perllocale
896
897       •   The documentation now mentions fc() and "\F", and includes many
898           clarifications and corrections in general.
899
900       perlop
901
902       •   The language design of Perl has always called for monomorphic
903           operators.  This is now mentioned explicitly.
904
905       perlopentut
906
907       •   The "open" tutorial has been completely rewritten by Tom
908           Christiansen, and now focuses on covering only the basics, rather
909           than providing a comprehensive reference to all things openable.
910           This rewrite came as the result of a vigorous discussion on
911           perl5-porters kicked off by a set of improvements written by
912           Alexander Hartmaier to the existing perlopentut.  A "more than you
913           ever wanted to know about "open"" document may follow in subsequent
914           versions of perl.
915
916       perlre
917
918       •   The fact that the regexp engine makes no effort to call (?{}) and
919           (??{}) constructs any specified number of times (although it will
920           basically DWIM in case of a successful match) has been documented.
921
922       •   The "/r" modifier (for non-destructive substitution) is now
923           documented. [perl #119151]
924
925       •   The documentation for "/x" and "(?# comment)" has been expanded and
926           clarified.
927
928       perlreguts
929
930       •   The documentation has been updated in the light of recent changes
931           to regcomp.c.
932
933       perlsub
934
935       •   The need to predeclare recursive functions with prototypes in order
936           for the prototype to be honoured in the recursive call is now
937           documented. [perl #2726]
938
939       •   A list of subroutine names used by the perl implementation is now
940           included.  [perl #77680]
941
942       perltrap
943
944       •   There is now a JavaScript section.
945
946       perlunicode
947
948       •   The documentation has been updated to reflect "Bidi_Class" changes
949           in Unicode 6.3.
950
951       perlvar
952
953       •   A new section explaining the performance issues of $`, $& and $',
954           including workarounds and changes in different versions of Perl,
955           has been added.
956
957       •   Three English variable names which have long been documented but do
958           not actually exist have been removed from the documentation.  These
959           were $OLD_PERL_VERSION, $OFMT, and $ARRAY_BASE.
960
961           (Actually, "OLD_PERL_VERSION" does exist, starting with this
962           revision, but remained undocumented until perl 5.22.0.)
963
964       perlxs
965
966       •   Several problems in the "MY_CXT" example have been fixed.
967

Diagnostics

969       The following additions or changes have been made to diagnostic output,
970       including warnings and fatal error messages.  For the complete list of
971       diagnostic messages, see perldiag.
972
973   New Diagnostics
974       New Errors
975
976       •   delete argument is index/value array slice, use array slice
977
978           (F) You used index/value array slice syntax (%array[...]) as the
979           argument to "delete".  You probably meant @array[...] with an @
980           symbol instead.
981
982       •   delete argument is key/value hash slice, use hash slice
983
984           (F) You used key/value hash slice syntax (%hash{...}) as the
985           argument to "delete".  You probably meant @hash{...} with an @
986           symbol instead.
987
988       •   Magical list constants are not supported
989
990           (F) You assigned a magical array to a stash element, and then tried
991           to use the subroutine from the same slot.  You are asking Perl to
992           do something it cannot do, details subject to change between Perl
993           versions.
994
995       •   Added Setting $/ to a %s reference is forbidden
996
997       New Warnings
998
999       •   %s on reference is experimental:
1000
1001           The "auto-deref" feature is experimental.
1002
1003           Starting in v5.14.0, it was possible to use push, pop, keys, and
1004           other built-in functions not only on aggregate types, but on
1005           references to them.  The feature was not deployed to its original
1006           intended specification, and now may become redundant to postfix
1007           dereferencing.  It has always been categorized as an experimental
1008           feature, and in v5.20.0 is carries a warning as such.
1009
1010           Warnings will now be issued at compile time when these operations
1011           are detected.
1012
1013             no if $] >= 5.01908, warnings => "experimental::autoderef";
1014
1015           Consider, though, replacing the use of these features, as they may
1016           change behavior again before becoming stable.
1017
1018       •   A sequence of multiple spaces in a charnames alias definition is
1019           deprecated
1020
1021           Trailing white-space in a charnames alias definition is deprecated
1022
1023           These two deprecation warnings involving "\N{...}" were incorrectly
1024           implemented.  They did not warn by default (now they do) and could
1025           not be made fatal via "use warnings FATAL => 'deprecated'" (now
1026           they can).
1027
1028       •   Attribute prototype(%s) discards earlier prototype attribute in
1029           same sub
1030
1031           (W misc) A sub was declared as "sub foo : prototype(A) :
1032           prototype(B) {}", for example.  Since each sub can only have one
1033           prototype, the earlier declaration(s) are discarded while the last
1034           one is applied.
1035
1036       •   Invalid \0 character in %s for %s: %s\0%s
1037
1038           (W syscalls) Embedded \0 characters in pathnames or other system
1039           call arguments produce a warning as of 5.20.  The parts after the
1040           \0 were formerly ignored by system calls.
1041
1042       •   Matched non-Unicode code point 0x%X against Unicode property; may
1043           not be portable.
1044
1045           This replaces the message "Code point 0x%X is not Unicode, all \p{}
1046           matches fail; all \P{} matches succeed".
1047
1048       •   Missing ']' in prototype for %s : %s
1049
1050           (W illegalproto) A grouping was started with "[" but never closed
1051           with "]".
1052
1053       •   Possible precedence issue with control flow operator
1054
1055           (W syntax) There is a possible problem with the mixing of a control
1056           flow operator (e.g. "return") and a low-precedence operator like
1057           "or".  Consider:
1058
1059               sub { return $a or $b; }
1060
1061           This is parsed as:
1062
1063               sub { (return $a) or $b; }
1064
1065           Which is effectively just:
1066
1067               sub { return $a; }
1068
1069           Either use parentheses or the high-precedence variant of the
1070           operator.
1071
1072           Note this may be also triggered for constructs like:
1073
1074               sub { 1 if die; }
1075
1076       •   Postfix dereference is experimental
1077
1078           (S experimental::postderef) This warning is emitted if you use the
1079           experimental postfix dereference syntax.  Simply suppress the
1080           warning if you want to use the feature, but know that in doing so
1081           you are taking the risk of using an experimental feature which may
1082           change or be removed in a future Perl version:
1083
1084               no warnings "experimental::postderef";
1085               use feature "postderef", "postderef_qq";
1086               $ref->$*;
1087               $aref->@*;
1088               $aref->@[@indices];
1089               ... etc ...
1090
1091       •   Prototype '%s' overridden by attribute 'prototype(%s)' in %s
1092
1093           (W prototype) A prototype was declared in both the parentheses
1094           after the sub name and via the prototype attribute.  The prototype
1095           in parentheses is useless, since it will be replaced by the
1096           prototype from the attribute before it's ever used.
1097
1098       •   Scalar value @%s[%s] better written as $%s[%s]
1099
1100           (W syntax) In scalar context, you've used an array index/value
1101           slice (indicated by %) to select a single element of an array.
1102           Generally it's better to ask for a scalar value (indicated by $).
1103           The difference is that $foo[&bar] always behaves like a scalar,
1104           both in the value it returns and when evaluating its argument,
1105           while %foo[&bar] provides a list context to its subscript, which
1106           can do weird things if you're expecting only one subscript.  When
1107           called in list context, it also returns the index (what &bar
1108           returns) in addition to the value.
1109
1110       •   Scalar value @%s{%s} better written as $%s{%s}
1111
1112           (W syntax) In scalar context, you've used a hash key/value slice
1113           (indicated by %) to select a single element of a hash.  Generally
1114           it's better to ask for a scalar value (indicated by $).  The
1115           difference is that $foo{&bar} always behaves like a scalar, both in
1116           the value it returns and when evaluating its argument, while
1117           @foo{&bar} and provides a list context to its subscript, which can
1118           do weird things if you're expecting only one subscript.  When
1119           called in list context, it also returns the key in addition to the
1120           value.
1121
1122       •   Setting $/ to a reference to %s as a form of slurp is deprecated,
1123           treating as undef
1124
1125       •   Unexpected exit %u
1126
1127           (S) exit() was called or the script otherwise finished gracefully
1128           when "PERL_EXIT_WARN" was set in "PL_exit_flags".
1129
1130       •   Unexpected exit failure %d
1131
1132           (S) An uncaught die() was called when "PERL_EXIT_WARN" was set in
1133           "PL_exit_flags".
1134
1135       •   Use of literal control characters in variable names is deprecated
1136
1137           (D deprecated) Using literal control characters in the source to
1138           refer to the ^FOO variables, like $^X and ${^GLOBAL_PHASE} is now
1139           deprecated.  This only affects code like $\cT, where \cT is a
1140           control (like a "SOH") in the source code: ${"\cT"} and $^T remain
1141           valid.
1142
1143       •   Useless use of greediness modifier
1144
1145           This fixes [Perl #42957].
1146
1147   Changes to Existing Diagnostics
1148       •   Warnings and errors from the regexp engine are now UTF-8 clean.
1149
1150       •   The "Unknown switch condition" error message has some slight
1151           changes.  This error triggers when there is an unknown condition in
1152           a "(?(foo))" conditional.  The error message used to read:
1153
1154               Unknown switch condition (?(%s in regex;
1155
1156           But what %s could be was mostly up to luck.  For "(?(foobar))", you
1157           might have seen "fo" or "f".  For Unicode characters, you would
1158           generally get a corrupted string.  The message has been changed to
1159           read:
1160
1161               Unknown switch condition (?(...)) in regex;
1162
1163           Additionally, the '<-- HERE' marker in the error will now point to
1164           the correct spot in the regex.
1165
1166       •   The "%s "\x%X" does not map to Unicode" warning is now correctly
1167           listed as a severe warning rather than as a fatal error.
1168
1169       •   Under rare circumstances, one could get a "Can't coerce readonly
1170           REF to string" instead of the customary "Modification of a read-
1171           only value".  This alternate error message has been removed.
1172
1173       •   "Ambiguous use of * resolved as operator *": This and similar
1174           warnings about "%" and "&" used to occur in some circumstances
1175           where there was no operator of the type cited, so the warning was
1176           completely wrong.  This has been fixed [perl #117535, #76910].
1177
1178       •   Warnings about malformed subroutine prototypes are now more
1179           consistent in how the prototypes are rendered.  Some of these
1180           warnings would truncate prototypes containing nulls.  In other
1181           cases one warning would suppress another.  The warning about
1182           illegal characters in prototypes no longer says "after '_'" if the
1183           bad character came before the underscore.
1184
1185       •   Perl folding rules are not up-to-date for 0x%X; please use the
1186           perlbug utility to report; in regex; marked by <-- HERE in m/%s/
1187
1188           This message is now only in the regexp category, and not in the
1189           deprecated category.  It is still a default (i.e., severe) warning
1190           [perl #89648].
1191
1192       •   %%s[%s] in scalar context better written as $%s[%s]
1193
1194           This warning now occurs for any %array[$index] or %hash{key} known
1195           to be in scalar context at compile time.  Previously it was worded
1196           "Scalar value %%s[%s] better written as $%s[%s]".
1197
1198       •   Switch condition not recognized in regex; marked by <-- HERE in
1199           m/%s/:
1200
1201           The description for this diagnostic has been extended to cover all
1202           cases where the warning may occur.  Issues with the positioning of
1203           the arrow indicator have also been resolved.
1204
1205       •   The error messages for "my($a?$b$c)" and "my(do{})" now mention
1206           "conditional expression" and "do block", respectively, instead of
1207           reading 'Can't declare null operation in "my"'.
1208
1209       •   When "use re "debug"" executes a regex containing a backreference,
1210           the debugging output now shows what string is being matched.
1211
1212       •   The now fatal error message "Character following "\c" must be
1213           ASCII" has been reworded as "Character following "\c" must be
1214           printable ASCII" to emphasize that in "\cX", X must be a printable
1215           (non-control) ASCII character.
1216

Utility Changes

1218       a2p
1219
1220       •   A possible crash from an off-by-one error when trying to access
1221           before the beginning of a buffer has been fixed.  [perl #120244]
1222
1223       bisect.pl
1224
1225       The git bisection tool Porting/bisect.pl has had many enhancements.
1226
1227       It is provided as part of the source distribution but not installed
1228       because it is not self-contained as it relies on being run from within
1229       a git checkout. Note also that it makes no attempt to fix tests,
1230       correct runtime bugs or make something useful to install - its purpose
1231       is to make minimal changes to get any historical revision of interest
1232       to build and run as close as possible to "as-was", and thereby make
1233       "git bisect" easy to use.
1234
1235       •   Can optionally run the test case with a timeout.
1236
1237       •   Can now run in-place in a clean git checkout.
1238
1239       •   Can run the test case under "valgrind".
1240
1241       •   Can apply user supplied patches and fixes to the source checkout
1242           before building.
1243
1244       •   Now has fixups to enable building several more historical ranges of
1245           bleadperl, which can be useful for pinpointing the origins of bugs
1246           or behaviour changes.
1247
1248       find2perl
1249
1250       •   find2perl now handles "?" wildcards correctly.  [perl #113054]
1251
1252       perlbug
1253
1254perlbug now has a "-p" option for attaching patches with a bug
1255           report.
1256
1257       •   perlbug has been modified to supply the report template with CRLF
1258           line endings on Windows.  [GH #13612]
1259           <https://github.com/Perl/perl5/issues/13612>
1260
1261       •   perlbug now makes as few assumptions as possible about the encoding
1262           of the report.  This will likely change in the future to assume
1263           UTF-8 by default but allow a user override.
1264

Configuration and Compilation

1266       •   The Makefile.PL for SDBM_File now generates a better Makefile,
1267           which avoids a race condition during parallel makes, which could
1268           cause the build to fail.  This is the last known parallel make
1269           problem (on *nix platforms), and therefore we believe that a
1270           parallel make should now always be error free.
1271
1272installperl and installman's option handling has been refactored to
1273           use Getopt::Long. Both are used by the Makefile "install" targets,
1274           and are not installed, so these changes are only likely to affect
1275           custom installation scripts.
1276
1277           •   Single letter options now also have long names.
1278
1279           •   Invalid options are now rejected.
1280
1281           •   Command line arguments that are not options are now rejected.
1282
1283           •   Each now has a "--help" option to display the usage message.
1284
1285           The behaviour for all valid documented invocations is unchanged.
1286
1287       •   Where possible, the build now avoids recursive invocations of make
1288           when building pure-Perl extensions, without removing any
1289           parallelism from the build. Currently around 80 extensions can be
1290           processed directly by the make_ext.pl tool, meaning that 80
1291           invocations of make and 160 invocations of miniperl are no longer
1292           made.
1293
1294       •   The build system now works correctly when compiling under GCC or
1295           Clang with link-time optimization enabled (the "-flto" option).
1296           [perl #113022]
1297
1298       •   Distinct library basenames with "d_libname_unique".
1299
1300           When compiling perl with this option, the library files for XS
1301           modules are named something "unique" -- for example,
1302           Hash/Util/Util.so becomes Hash/Util/PL_Hash__Util.so.  This
1303           behavior is similar to what currently happens on VMS, and serves as
1304           groundwork for the Android port.
1305
1306       •   "sysroot" option to indicate the logical root directory under gcc
1307           and clang.
1308
1309           When building with this option set, both Configure and the
1310           compilers search for all headers and libraries under this new
1311           sysroot, instead of /.
1312
1313           This is a huge time saver if cross-compiling, but can also help on
1314           native builds if your toolchain's files have non-standard
1315           locations.
1316
1317       •   The cross-compilation model has been renovated.  There's several
1318           new options, and some backwards-incompatible changes:
1319
1320           We now build binaries for miniperl and generate_uudmap to be used
1321           on the host, rather than running every miniperl call on the target;
1322           this means that, short of 'make test', we no longer need access to
1323           the target system once Configure is done.  You can provide already-
1324           built binaries through the "hostperl" and "hostgenerate" options to
1325           Configure.
1326
1327           Additionally, if targeting an EBCDIC platform from an ASCII host,
1328           or viceversa, you'll need to run Configure with "-Uhostgenerate",
1329           to indicate that generate_uudmap should be run on the target.
1330
1331           Finally, there's also a way of having Configure end early, right
1332           after building the host binaries, by cross-compiling without
1333           specifying a "targethost".
1334
1335           The incompatible changes include no longer using xconfig.h, xlib,
1336           or Cross.pm, so canned config files and Makefiles will have to be
1337           updated.
1338
1339       •   Related to the above, there is now a way of specifying the location
1340           of sh (or equivalent) on the target system: "targetsh".
1341
1342           For example, Android has its sh in /system/bin/sh, so if cross-
1343           compiling from a more normal Unixy system with sh in /bin/sh,
1344           "targetsh" would end up as /system/bin/sh, and "sh" as /bin/sh.
1345
1346       •   By default, gcc 4.9 does some optimizations that break perl.  The
1347           -fwrapv option disables those optimizations (and probably others),
1348           so for gcc 4.3 and later (since the there might be similar problems
1349           lurking on older versions too, but -fwrapv was broken before 4.3,
1350           and the optimizations probably won't go away), Configure now adds
1351           -fwrapv unless the user requests -fno-wrapv, which disables
1352           -fwrapv, or -fsanitize=undefined, which turns the overflows -fwrapv
1353           ignores into runtime errors.  [GH #13690]
1354           <https://github.com/Perl/perl5/issues/13690>
1355

Testing

1357       •   The "test.valgrind" make target now allows tests to be run in
1358           parallel.  This target allows Perl's test suite to be run under
1359           Valgrind, which detects certain sorts of C programming errors,
1360           though at significant cost in running time. On suitable hardware,
1361           allowing parallel execution claws back a lot of that additional
1362           cost. [perl #121431]
1363
1364       •   Various tests in t/porting/ are no longer skipped when the perl
1365           .git directory is outside the perl tree and pointed to by $GIT_DIR.
1366           [perl #120505]
1367
1368       •   The test suite no longer fails when the user's interactive shell
1369           maintains a $PWD environment variable, but the /bin/sh used for
1370           running tests doesn't.
1371

Platform Support

1373   New Platforms
1374       Android
1375           Perl can now be built for Android, either natively or through
1376           cross-compilation, for all three currently available architectures
1377           (ARM, MIPS, and x86), on a wide range of versions.
1378
1379       Bitrig
1380           Compile support has been added for Bitrig, a fork of OpenBSD.
1381
1382       FreeMiNT
1383           Support has been added for FreeMiNT, a free open-source OS for the
1384           Atari ST system and its successors, based on the original MiNT that
1385           was officially adopted by Atari.
1386
1387       Synology
1388           Synology ships its NAS boxes with a lean Linux distribution (DSM)
1389           on relative cheap CPU's (like the Marvell Kirkwood mv6282 -
1390           ARMv5tel or Freescale QorIQ P1022 ppc - e500v2) not meant for
1391           workstations or development. These boxes should build now. The
1392           basic problems are the non-standard location for tools.
1393
1394   Discontinued Platforms
1395       "sfio"
1396           Code related to supporting the "sfio" I/O system has been removed.
1397
1398           Perl 5.004 added support to use the native API of "sfio", AT&T's
1399           Safe/Fast I/O library. This code still built with v5.8.0, albeit
1400           with many regression tests failing, but was inadvertently broken
1401           before the v5.8.1 release, meaning that it has not worked on any
1402           version of Perl released since then.  In over a decade we have
1403           received no bug reports about this, hence it is clear that no-one
1404           is using this functionality on any version of Perl that is still
1405           supported to any degree.
1406
1407       AT&T 3b1
1408           Configure support for the 3b1, also known as the AT&T Unix PC (and
1409           the similar AT&T 7300), has been removed.
1410
1411       DG/UX
1412           DG/UX was a Unix sold by Data General. The last release was in
1413           April 2001.  It only runs on Data General's own hardware.
1414
1415       EBCDIC
1416           In the absence of a regular source of smoke reports, code intended
1417           to support native EBCDIC platforms will be removed from perl before
1418           5.22.0.
1419
1420   Platform-Specific Notes
1421       Cygwin
1422recv() on a connected handle would populate the returned sender
1423               address with whatever happened to be in the working buffer.
1424               recv() now uses a workaround similar to the Win32 recv()
1425               wrapper and returns an empty string when recvfrom(2) doesn't
1426               modify the supplied address length. [perl #118843]
1427
1428           •   Fixed a build error in cygwin.c on Cygwin 1.7.28.
1429
1430               Tests now handle the errors that occur when "cygserver" isn't
1431               running.
1432
1433       GNU/Hurd
1434           The BSD compatibility library "libbsd" is no longer required for
1435           builds.
1436
1437       Linux
1438           The hints file now looks for "libgdbm_compat" only if "libgdbm"
1439           itself is also wanted. The former is never useful without the
1440           latter, and in some circumstances, including it could actually
1441           prevent building.
1442
1443       Mac OS
1444           The build system now honors an "ld" setting supplied by the user
1445           running Configure.
1446
1447       MidnightBSD
1448           "objformat" was removed from version 0.4-RELEASE of MidnightBSD and
1449           had been deprecated on earlier versions.  This caused the build
1450           environment to be erroneously configured for "a.out" rather than
1451           "elf".  This has been now been corrected.
1452
1453       Mixed-endian platforms
1454           The code supporting "pack" and "unpack" operations on mixed endian
1455           platforms has been removed. We believe that Perl has long been
1456           unable to build on mixed endian architectures (such as PDP-11s), so
1457           we don't think that this change will affect any platforms which
1458           were able to build v5.18.0.
1459
1460       VMS
1461           •   The "PERL_ENV_TABLES" feature to control the population of %ENV
1462               at perl start-up was broken in Perl 5.16.0 but has now been
1463               fixed.
1464
1465           •   Skip access checks on remotes in opendir().  [perl #121002]
1466
1467           •   A check for glob metacharacters in a path returned by the
1468               "glob()" operator has been replaced with a check for VMS
1469               wildcard characters.  This saves a significant number of
1470               unnecessary "lstat()" calls such that some simple glob
1471               operations become 60-80% faster.
1472
1473       Win32
1474           •   "rename" and "link" on Win32 now set $! to ENOSPC and EDQUOT
1475               when appropriate.  [perl #119857]
1476
1477           •   The BUILD_STATIC and ALL_STATIC makefile options for linking
1478               some or (nearly) all extensions statically (into perl520.dll,
1479               and into a separate perl-static.exe too) were broken for MinGW
1480               builds. This has now been fixed.
1481
1482               The ALL_STATIC option has also been improved to include the
1483               Encode and Win32 extensions (for both VC++ and MinGW builds).
1484
1485           •   Support for building with Visual C++ 2013 has been added.
1486               There are currently two possible test failures (see "Testing
1487               Perl on Windows" in perlwin32) which will hopefully be resolved
1488               soon.
1489
1490           •   Experimental support for building with Intel C++ Compiler has
1491               been added.  The nmake makefile (win32/Makefile) and the dmake
1492               makefile (win32/makefile.mk) can be used.  A "nmake test" will
1493               not pass at this time due to cpan/CGI/t/url.t.
1494
1495           •   Killing a process tree with "kill" in perlfunc and a negative
1496               signal, was broken starting in 5.18.0. In this bug, "kill"
1497               always returned 0 for a negative signal even for valid PIDs,
1498               and no processes were terminated. This has been fixed [perl
1499               #121230].
1500
1501           •   The time taken to build perl on Windows has been reduced quite
1502               significantly (time savings in the region of 30-40% are
1503               typically seen) by reducing the number of, usually failing, I/O
1504               calls for each "require()" (for miniperl.exe only).  [GH
1505               #13566] <https://github.com/Perl/perl5/issues/13566>
1506
1507           •   About 15 minutes of idle sleeping was removed from running
1508               "make test" due to a bug in which the timeout monitor used for
1509               tests could not be cancelled once the test completes, and the
1510               full timeout period elapsed before running the next test file.
1511               [GH #13647] <https://github.com/Perl/perl5/issues/13647>
1512
1513           •   On a perl built without pseudo-fork (pseudo-fork builds were
1514               not affected by this bug), killing a process tree with "kill()"
1515               and a negative signal resulted in "kill()" inverting the
1516               returned value.  For example, if "kill()" killed 1 process tree
1517               PID then it returned 0 instead of 1, and if "kill()" was passed
1518               2 invalid PIDs then it returned 2 instead of 0.  This has
1519               probably been the case since the process tree kill feature was
1520               implemented on Win32.  It has now been corrected to follow the
1521               documented behaviour.  [GH #13595]
1522               <https://github.com/Perl/perl5/issues/13595>
1523
1524           •   When building a 64-bit perl, an uninitialized memory read in
1525               miniperl.exe, used during the build process, could lead to a
1526               4GB wperl.exe being created.  This has now been fixed.  (Note
1527               that perl.exe itself was unaffected, but obviously wperl.exe
1528               would have been completely broken.)  [GH #13677]
1529               <https://github.com/Perl/perl5/issues/13677>
1530
1531           •   Perl can now be built with gcc version 4.8.1 from
1532               <http://www.mingw.org>.  This was previously broken due to an
1533               incorrect definition of DllMain() in one of perl's source
1534               files.  Earlier gcc versions were also affected when using
1535               version 4 of the w32api package.  Versions of gcc available
1536               from <http://mingw-w64.sourceforge.net/> were not affected.
1537               [GH #13733] <https://github.com/Perl/perl5/issues/13733>
1538
1539           •   The test harness now has no failures when perl is built on a
1540               FAT drive with the Windows OS on an NTFS drive.  [GH #6348]
1541               <https://github.com/Perl/perl5/issues/6348>
1542
1543           •   When cloning the context stack in fork() emulation,
1544               Perl_cx_dup() would crash accessing parameter information for
1545               context stack entries that included no parameters, as with
1546               "&foo;".  [GH #13763]
1547               <https://github.com/Perl/perl5/issues/13763>
1548
1549           •   Introduced by [GH #12161]
1550               <https://github.com/Perl/perl5/issues/12161>, a memory leak on
1551               every call to "system" and backticks (" `` "), on most Win32
1552               Perls starting from 5.18.0 has been fixed.  The memory leak
1553               only occurred if you enabled pseudo-fork in your build of Win32
1554               Perl, and were running that build on Server 2003 R2 or newer
1555               OS.  The leak does not appear on WinXP SP3.  [GH #13741]
1556               <https://github.com/Perl/perl5/issues/13741>
1557
1558       WinCE
1559           •   The building of XS modules has largely been restored.  Several
1560               still cannot (yet) be built but it is now possible to build
1561               Perl on WinCE with only a couple of further patches (to Socket
1562               and ExtUtils::MakeMaker), hopefully to be incorporated soon.
1563
1564           •   Perl can now be built in one shot with no user intervention on
1565               WinCE by running "nmake -f Makefile.ce all".
1566
1567               Support for building with EVC (Embedded Visual C++) 4 has been
1568               restored.  Perl can also be built using Smart Devices for
1569               Visual C++ 2005 or 2008.
1570

Internal Changes

1572       •   The internal representation has changed for the match variables $1,
1573           $2 etc., $`, $&, $', ${^PREMATCH}, ${^MATCH} and ${^POSTMATCH}.  It
1574           uses slightly less memory, avoids string comparisons and numeric
1575           conversions during lookup, and uses 23 fewer lines of C.  This
1576           change should not affect any external code.
1577
1578       •   Arrays now use NULL internally to represent unused slots, instead
1579           of &PL_sv_undef.  &PL_sv_undef is no longer treated as a special
1580           value, so av_store(av, 0, &PL_sv_undef) will cause element 0 of
1581           that array to hold a read-only undefined scalar.  "$array[0] =
1582           anything" will croak and "\$array[0]" will compare equal to
1583           "\undef".
1584
1585       •   The SV returned by HeSVKEY_force() now correctly reflects the
1586           UTF8ness of the underlying hash key when that key is not stored as
1587           a SV.  [perl #79074]
1588
1589       •   Certain rarely used functions and macros available to XS code are
1590           now deprecated.  These are: "utf8_to_uvuni_buf" (use
1591           "utf8_to_uvchr_buf" instead), "valid_utf8_to_uvuni" (use
1592           "utf8_to_uvchr_buf" instead), "NATIVE_TO_NEED" (this did not work
1593           properly anyway), and "ASCII_TO_NEED" (this did not work properly
1594           anyway).
1595
1596           Starting in this release, almost never does application code need
1597           to distinguish between the platform's character set and Latin1, on
1598           which the lowest 256 characters of Unicode are based.  New code
1599           should not use "utf8n_to_uvuni" (use "utf8_to_uvchr_buf" instead),
1600           nor "uvuni_to_utf8" (use "uvchr_to_utf8" instead),
1601
1602       •   The Makefile shortcut targets for many rarely (or never) used
1603           testing and profiling targets have been removed, or merged into the
1604           only other Makefile target that uses them.  Specifically, these
1605           targets are gone, along with documentation that referenced them or
1606           explained how to use them:
1607
1608               check.third check.utf16 check.utf8 coretest minitest.prep
1609               minitest.utf16 perl.config.dashg perl.config.dashpg
1610               perl.config.gcov perl.gcov perl.gprof perl.gprof.config
1611               perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix
1612               perl.third perl.third.config perl.valgrind.config purecovperl
1613               pureperl quantperl test.deparse test.taintwarn test.third
1614               test.torture test.utf16 test.utf8 test_notty.deparse
1615               test_notty.third test_notty.valgrind test_prep.third
1616               test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16
1617               ucheck.valgrind utest utest.third utest.utf16 utest.valgrind
1618
1619           It's still possible to run the relevant commands by "hand" - no
1620           underlying functionality has been removed.
1621
1622       •   It is now possible to keep Perl from initializing locale handling.
1623           For the most part, Perl doesn't pay attention to locale.  (See
1624           perllocale.)  Nonetheless, until now, on startup, it has always
1625           initialized locale handling to the system default, just in case the
1626           program being executed ends up using locales.  (This is one of the
1627           first things a locale-aware program should do, long before Perl
1628           knows if it will actually be needed or not.)  This works well
1629           except when Perl is embedded in another application which wants a
1630           locale that isn't the system default.  Now, if the environment
1631           variable "PERL_SKIP_LOCALE_INIT" is set at the time Perl is
1632           started, this initialization step is skipped.  Prior to this, on
1633           Windows platforms, the only workaround for this deficiency was to
1634           use a hacked-up copy of internal Perl code.  Applications that need
1635           to use older Perls can discover if the embedded Perl they are using
1636           needs the workaround by testing that the C preprocessor symbol
1637           "HAS_SKIP_LOCALE_INIT" is not defined.  [RT #38193]
1638
1639       •   "BmRARE" and "BmPREVIOUS" have been removed.  They were not used
1640           anywhere and are not part of the API.  For XS modules, they are now
1641           #defined as 0.
1642
1643       •   "sv_force_normal", which usually croaks on read-only values, used
1644           to allow read-only values to be modified at compile time.  This has
1645           been changed to croak on read-only values regardless.  This change
1646           uncovered several core bugs.
1647
1648       •   Perl's new copy-on-write mechanism  (which is now enabled by
1649           default), allows any "SvPOK" scalar to be automatically upgraded to
1650           a copy-on-write scalar when copied. A reference count on the string
1651           buffer is stored in the string buffer itself.
1652
1653           For example:
1654
1655               $ perl -MDevel::Peek -e'$a="abc"; $b = $a; Dump $a; Dump $b'
1656               SV = PV(0x260cd80) at 0x2620ad8
1657                 REFCNT = 1
1658                 FLAGS = (POK,IsCOW,pPOK)
1659                 PV = 0x2619bc0 "abc"\0
1660                 CUR = 3
1661                 LEN = 16
1662                 COW_REFCNT = 1
1663               SV = PV(0x260ce30) at 0x2620b20
1664                 REFCNT = 1
1665                 FLAGS = (POK,IsCOW,pPOK)
1666                 PV = 0x2619bc0 "abc"\0
1667                 CUR = 3
1668                 LEN = 16
1669                 COW_REFCNT = 1
1670
1671           Note that both scalars share the same PV buffer and have a
1672           COW_REFCNT greater than zero.
1673
1674           This means that XS code which wishes to modify the "SvPVX()" buffer
1675           of an SV should call "SvPV_force()" or similar first, to ensure a
1676           valid (and unshared) buffer, and to call "SvSETMAGIC()" afterwards.
1677           This in fact has always been the case (for example hash keys were
1678           already copy-on-write); this change just spreads the COW behaviour
1679           to a wider variety of SVs.
1680
1681           One important difference is that before 5.18.0, shared hash-key
1682           scalars used to have the "SvREADONLY" flag set; this is no longer
1683           the case.
1684
1685           This new behaviour can still be disabled by running Configure with
1686           -Accflags=-DPERL_NO_COW.  This option will probably be removed in
1687           Perl 5.22.
1688
1689       •   "PL_sawampersand" is now a constant.  The switch this variable
1690           provided (to enable/disable the pre-match copy depending on whether
1691           $& had been seen) has been removed and replaced with copy-on-write,
1692           eliminating a few bugs.
1693
1694           The previous behaviour can still be enabled by running Configure
1695           with -Accflags=-DPERL_SAWAMPERSAND.
1696
1697       •   The functions "my_swap", "my_htonl" and "my_ntohl" have been
1698           removed.  It is unclear why these functions were ever marked as A,
1699           part of the API. XS code can't call them directly, as it can't rely
1700           on them being compiled. Unsurprisingly, no code on CPAN references
1701           them.
1702
1703       •   The signature of the "Perl_re_intuit_start()" regex function has
1704           changed; the function pointer "intuit" in the regex engine plugin
1705           structure has also changed accordingly. A new parameter, "strbeg"
1706           has been added; this has the same meaning as the same-named
1707           parameter in "Perl_regexec_flags". Previously intuit would try to
1708           guess the start of the string from the passed SV (if any), and
1709           would sometimes get it wrong (e.g. with an overloaded SV).
1710
1711       •   The signature of the "Perl_regexec_flags()" regex function has
1712           changed; the function pointer "exec" in the regex engine plugin
1713           structure has also changed to match.  The "minend" parameter now
1714           has type "SSize_t" to better support 64-bit systems.
1715
1716       •   XS code may use various macros to change the case of a character or
1717           code point (for example "toLOWER_utf8()").  Only a couple of these
1718           were documented until now; and now they should be used in
1719           preference to calling the underlying functions.  See "Character
1720           case changing" in perlapi.
1721
1722       •   The code dealt rather inconsistently with uids and gids. Some
1723           places assumed that they could be safely stored in UVs, others in
1724           IVs, others in ints. Four new macros are introduced: SvUID(),
1725           sv_setuid(), SvGID(), and sv_setgid()
1726
1727       •   "sv_pos_b2u_flags" has been added to the API.  It is similar to
1728           "sv_pos_b2u", but supports long strings on 64-bit platforms.
1729
1730       •   "PL_exit_flags" can now be used by perl embedders or other XS code
1731           to have perl "warn" or "abort" on an attempted exit. [perl #52000]
1732
1733       •   Compiling with "-Accflags=-PERL_BOOL_AS_CHAR" now allows C99 and
1734           C++ compilers to emulate the aliasing of "bool" to "char" that perl
1735           does for C89 compilers.  [perl #120314]
1736
1737       •   The "sv" argument in "sv_2pv_flags" in perlapi, "sv_2iv_flags" in
1738           perlapi, "sv_2uv_flags" in perlapi, and "sv_2nv_flags" in perlapi
1739           and their older wrappers sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now
1740           non-NULL. Passing NULL now will crash.  When the non-NULL marker
1741           was introduced en masse in 5.9.3 the functions were marked non-
1742           NULL, but since the creation of the SV API in 5.0 alpha 2, if NULL
1743           was passed, the functions returned 0 or false-type values. The code
1744           that supports "sv" argument being non-NULL dates to 5.0 alpha 2
1745           directly, and indirectly to Perl 1.0 (pre 5.0 api). The lack of
1746           documentation that the functions accepted a NULL "sv" was corrected
1747           in 5.11.0 and between 5.11.0 and 5.19.5 the functions were marked
1748           NULLOK. As an optimization the NULLOK code has now been removed,
1749           and the functions became non-NULL marked again, because core
1750           getter-type macros never pass NULL to these functions and would
1751           crash before ever passing NULL.
1752
1753           The only way a NULL "sv" can be passed to sv_2*v* functions is if
1754           XS code directly calls sv_2*v*. This is unlikely as XS code uses
1755           Sv*V* macros to get the underlying value out of the SV. One
1756           possible situation which leads to a NULL "sv" being passed to
1757           sv_2*v* functions, is if XS code defines its own getter type Sv*V*
1758           macros, which check for NULL before dereferencing and checking the
1759           SV's flags through public API Sv*OK* macros or directly using
1760           private API "SvFLAGS", and if "sv" is NULL, then calling the sv_2*v
1761           functions with a NULL literal or passing the "sv" containing a NULL
1762           value.
1763
1764       •   newATTRSUB is now a macro
1765
1766           The public API newATTRSUB was previously a macro to the private
1767           function Perl_newATTRSUB. Function Perl_newATTRSUB has been
1768           removed. newATTRSUB is now macro to a different internal function.
1769
1770       •   Changes in warnings raised by "utf8n_to_uvchr()"
1771
1772           This bottom level function decodes the first character of a UTF-8
1773           string into a code point.  It is accessible to "XS" level code, but
1774           it's discouraged from using it directly.  There are higher level
1775           functions that call this that should be used instead, such as
1776           "utf8_to_uvchr_buf" in perlapi.  For completeness though, this
1777           documents some changes to it.  Now, tests for malformations are
1778           done before any tests for other potential issues.  One of those
1779           issues involves code points so large that they have never appeared
1780           in any official standard (the current standard has scaled back the
1781           highest acceptable code point from earlier versions).  It is
1782           possible (though not done in CPAN) to warn and/or forbid these code
1783           points, while accepting smaller code points that are still above
1784           the legal Unicode maximum.  The warning message for this now
1785           includes the code point if representable on the machine.
1786           Previously it always displayed raw bytes, which is what it still
1787           does for non-representable code points.
1788
1789       •   Regexp engine changes that affect the pluggable regex engine
1790           interface
1791
1792           Many flags that used to be exposed via regexp.h and used to
1793           populate the extflags member of struct regexp have been removed.
1794           These fields were technically private to Perl's own regexp engine
1795           and should not have been exposed there in the first place.
1796
1797           The affected flags are:
1798
1799               RXf_NOSCAN
1800               RXf_CANY_SEEN
1801               RXf_GPOS_SEEN
1802               RXf_GPOS_FLOAT
1803               RXf_ANCH_BOL
1804               RXf_ANCH_MBOL
1805               RXf_ANCH_SBOL
1806               RXf_ANCH_GPOS
1807
1808           As well as the follow flag masks:
1809
1810               RXf_ANCH_SINGLE
1811               RXf_ANCH
1812
1813           All have been renamed to PREGf_ equivalents and moved to regcomp.h.
1814
1815           The behavior previously achieved by setting one or more of the
1816           RXf_ANCH_ flags (via the RXf_ANCH mask) have now been replaced by a
1817           *single* flag bit in extflags:
1818
1819               RXf_IS_ANCHORED
1820
1821           pluggable regex engines which previously used to set these flags
1822           should now set this flag ALONE.
1823
1824       •   The Perl core now consistently uses "av_tindex()" ("the top index
1825           of an array") as a more clearly-named synonym for "av_len()".
1826
1827       •   The obscure interpreter variable "PL_timesbuf" is expected to be
1828           removed early in the 5.21.x development series, so that Perl 5.22.0
1829           will not provide it to XS authors.  While the variable still exists
1830           in 5.20.0, we hope that this advance warning of the deprecation
1831           will help anyone who is using that variable.
1832

Selected Bug Fixes

1834   Regular Expressions
1835       •   Fixed a small number of regexp constructions that could either fail
1836           to match or crash perl when the string being matched against was
1837           allocated above the 2GB line on 32-bit systems. [RT #118175]
1838
1839       •   Various memory leaks involving the parsing of the "(?[...])"
1840           regular expression construct have been fixed.
1841
1842       •   "(?[...])" now allows interpolation of precompiled patterns
1843           consisting of "(?[...])" with bracketed character classes inside
1844           ("$pat = qr/(?[ [a] ])/; /(?[ $pat ])/").  Formerly, the brackets
1845           would confuse the regular expression parser.
1846
1847       •   The "Quantifier unexpected on zero-length expression" warning
1848           message could appear twice starting in Perl v5.10 for a regular
1849           expression also containing alternations (e.g., "a|b") triggering
1850           the trie optimisation.
1851
1852       •   Perl v5.18 inadvertently introduced a bug whereby interpolating
1853           mixed up- and down-graded UTF-8 strings in a regex could result in
1854           malformed UTF-8 in the pattern: specifically if a downgraded
1855           character in the range "\x80..\xff" followed a UTF-8 string, e.g.
1856
1857               utf8::upgrade(  my $u = "\x{e5}");
1858               utf8::downgrade(my $d = "\x{e5}");
1859               /$u$d/
1860
1861           [RT #118297]
1862
1863       •   In regular expressions containing multiple code blocks, the values
1864           of $1, $2, etc., set by nested regular expression calls would leak
1865           from one block to the next.  Now these variables always refer to
1866           the outer regular expression at the start of an embedded block
1867           [perl #117917].
1868
1869       •   "/$qr/p" was broken in Perl 5.18.0; the "/p" flag was ignored.
1870           This has been fixed. [perl #118213]
1871
1872       •   Starting in Perl 5.18.0, a construct like "/[#](?{})/x" would have
1873           its "#" incorrectly interpreted as a comment.  The code block would
1874           be skipped, unparsed.  This has been corrected.
1875
1876       •   Starting in Perl 5.001, a regular expression like "/[#$a]/x" or
1877           "/[#]$a/x" would have its "#" incorrectly interpreted as a comment,
1878           so the variable would not interpolate.  This has been corrected.
1879           [perl #45667]
1880
1881       •   Perl 5.18.0 inadvertently made dereferenced regular expressions
1882           ("${ qr// }") false as booleans.  This has been fixed.
1883
1884       •   The use of "\G" in regular expressions, where it's not at the start
1885           of the pattern, is now slightly less buggy (although it is still
1886           somewhat problematic).
1887
1888       •   Where a regular expression included code blocks ("/(?{...})/"), and
1889           where the use of constant overloading triggered a re-compilation of
1890           the code block, the second compilation didn't see its outer lexical
1891           scope.  This was a regression in Perl 5.18.0.
1892
1893       •   The string position set by "pos" could shift if the string changed
1894           representation internally to or from utf8.  This could happen,
1895           e.g., with references to objects with string overloading.
1896
1897       •   Taking references to the return values of two "pos" calls with the
1898           same argument, and then assigning a reference to one and "undef" to
1899           the other, could result in assertion failures or memory leaks.
1900
1901       •   Elements of @- and @+ now update correctly when they refer to non-
1902           existent captures.  Previously, a referenced element ("$ref =
1903           \$-[1]") could refer to the wrong match after subsequent matches.
1904
1905       •   The code that parses regex backrefs (or ambiguous backref/octals)
1906           such as \123 did a simple atoi(), which could wrap round to
1907           negative values on long digit strings and cause segmentation
1908           faults.  This has now been fixed.  [perl #119505]
1909
1910       •   Assigning another typeglob to "*^R" no longer makes the regular
1911           expression engine crash.
1912
1913       •   The "\N" regular expression escape, when used without the curly
1914           braces (to mean "[^\n]"), was ignoring a following "*" if followed
1915           by whitespace under /x.  It had been this way since "\N" to mean
1916           "[^\n]" was introduced in 5.12.0.
1917
1918       •   "s///", "tr///" and "y///" now work when a wide character is used
1919           as the delimiter.  [perl #120463]
1920
1921       •   Some cases of unterminated (?...) sequences in regular expressions
1922           (e.g., "/(?</") have been fixed to produce the proper error message
1923           instead of "panic: memory wrap".  Other cases (e.g., "/(?(/") have
1924           yet to be fixed.
1925
1926       •   When a reference to a reference to an overloaded object was
1927           returned from a regular expression "(??{...})" code block, an
1928           incorrect implicit dereference could take place if the inner
1929           reference had been returned by a code block previously.
1930
1931       •   A tied variable returned from "(??{...})" sees the inner values of
1932           match variables (i.e., the $1 etc. from any matches inside the
1933           block) in its FETCH method.  This was not the case if a reference
1934           to an overloaded object was the last thing assigned to the tied
1935           variable.  Instead, the match variables referred to the outer
1936           pattern during the FETCH call.
1937
1938       •   Fix unexpected tainting via regexp using locale. Previously, under
1939           certain conditions, the use of character classes could cause
1940           tainting when it shouldn't. Some character classes are locale-
1941           dependent, but before this patch, sometimes tainting was happening
1942           even for character classes that don't depend on the locale. [perl
1943           #120675]
1944
1945       •   Under certain conditions, Perl would throw an error if in a
1946           lookbehind assertion in a regexp, the assertion referred to a named
1947           subpattern, complaining the lookbehind was variable when it wasn't.
1948           This has been fixed. [perl #120600], [perl #120618]. The current
1949           fix may be improved on in the future.
1950
1951       •   $^R wasn't available outside of the regular expression that
1952           initialized it.  [perl #121070]
1953
1954       •   A large set of fixes and refactoring for re_intuit_start() was
1955           merged, the highlights are:
1956
1957           •   Fixed a panic when compiling the regular expression
1958               "/\x{100}[xy]\x{100}{2}/".
1959
1960           •   Fixed a performance regression when performing a global pattern
1961               match against a UTF-8 string.  [perl #120692]
1962
1963           •   Fixed another performance issue where matching a regular
1964               expression like "/ab.{1,2}x/" against a long UTF-8 string would
1965               unnecessarily calculate byte offsets for a large portion of the
1966               string. [perl #120692]
1967
1968       •   Fixed an alignment error when compiling regular expressions when
1969           built with GCC on HP-UX 64-bit.
1970
1971       •   On 64-bit platforms "pos" can now be set to a value higher than
1972           2**31-1.  [perl #72766]
1973
1974   Perl 5 Debugger and -d
1975       •   The debugger's "man" command been fixed. It was broken in the
1976           v5.18.0 release. The "man" command is aliased to the names "doc"
1977           and "perldoc" - all now work again.
1978
1979       •   @_ is now correctly visible in the debugger, fixing a regression
1980           introduced in v5.18.0's debugger. [RT #118169]
1981
1982       •   Under copy-on-write builds (the default as of 5.20.0)
1983           "${'_<-e'}[0]" no longer gets mangled.  This is the first line of
1984           input saved for the debugger's use for one-liners [perl #118627].
1985
1986       •   On non-threaded builds, setting "${"_<filename"}" to a reference or
1987           typeglob no longer causes "__FILE__" and some error messages to
1988           produce a corrupt string, and no longer prevents "#line" directives
1989           in string evals from providing the source lines to the debugger.
1990           Threaded builds were unaffected.
1991
1992       •   Starting with Perl 5.12, line numbers were off by one if the -d
1993           switch was used on the #! line.  Now they are correct.
1994
1995       •   "*DB::DB = sub {} if 0" no longer stops Perl's debugging mode from
1996           finding "DB::DB" subs declared thereafter.
1997
1998       •   "%{'_<...'}" hashes now set breakpoints on the corresponding
1999           "@{'_<...'}" rather than whichever array @DB::dbline is aliased to.
2000           [perl #119799]
2001
2002       •   Call set-magic when setting $DB::sub.  [perl #121255]
2003
2004       •   The debugger's "n" command now respects lvalue subroutines and
2005           steps over them [perl #118839].
2006
2007   Lexical Subroutines
2008       •   Lexical constants ("my sub a() { 42 }") no longer crash when
2009           inlined.
2010
2011       •   Parameter prototypes attached to lexical subroutines are now
2012           respected when compiling sub calls without parentheses.
2013           Previously, the prototypes were honoured only for calls with
2014           parentheses. [RT #116735]
2015
2016       •   Syntax errors in lexical subroutines in combination with calls to
2017           the same subroutines no longer cause crashes at compile time.
2018
2019       •   Deep recursion warnings no longer crash lexical subroutines. [RT
2020           #118521]
2021
2022       •   The dtrace sub-entry probe now works with lexical subs, instead of
2023           crashing [perl #118305].
2024
2025       •   Undefining an inlinable lexical subroutine ("my sub foo() { 42 }
2026           undef &foo") would result in a crash if warnings were turned on.
2027
2028       •   An undefined lexical sub used as an inherited method no longer
2029           crashes.
2030
2031       •   The presence of a lexical sub named "CORE" no longer stops the
2032           CORE:: prefix from working.
2033
2034   Everything Else
2035       •   The OP allocation code now returns correctly aligned memory in all
2036           cases for "struct pmop". Previously it could return memory only
2037           aligned to a 4-byte boundary, which is not correct for an ithreads
2038           build with 64 bit IVs on some 32 bit platforms. Notably, this
2039           caused the build to fail completely on sparc GNU/Linux. [RT
2040           #118055]
2041
2042       •   Evaluating large hashes in scalar context is now much faster, as
2043           the number of used chains in the hash is now cached for larger
2044           hashes. Smaller hashes continue not to store it and calculate it
2045           when needed, as this saves one IV.  That would be 1 IV overhead for
2046           every object built from a hash. [RT #114576]
2047
2048       •   Perl v5.16 inadvertently introduced a bug whereby calls to XSUBs
2049           that were not visible at compile time were treated as lvalues and
2050           could be assigned to, even when the subroutine was not an lvalue
2051           sub.  This has been fixed.  [RT #117947]
2052
2053       •   In Perl v5.18.0 dualvars that had an empty string for the string
2054           part but a non-zero number for the number part starting being
2055           treated as true.  In previous versions they were treated as false,
2056           the string representation taking precedence.  The old behaviour has
2057           been restored. [RT #118159]
2058
2059       •   Since Perl v5.12, inlining of constants that override built-in
2060           keywords of the same name had countermanded "use subs", causing
2061           subsequent mentions of the constant to use the built-in keyword
2062           instead.  This has been fixed.
2063
2064       •   The warning produced by "-l $handle" now applies to IO refs and
2065           globs, not just to glob refs.  That warning is also now UTF8-clean.
2066           [RT #117595]
2067
2068       •   "delete local $ENV{nonexistent_env_var}" no longer leaks memory.
2069
2070       •   "sort" and "require" followed by a keyword prefixed with "CORE::"
2071           now treat it as a keyword, and not as a subroutine or module name.
2072           [RT #24482]
2073
2074       •   Through certain conundrums, it is possible to cause the current
2075           package to be freed.  Certain operators ("bless", "reset", "open",
2076           "eval") could not cope and would crash.  They have been made more
2077           resilient. [RT #117941]
2078
2079       •   Aliasing filehandles through glob-to-glob assignment would not
2080           update internal method caches properly if a package of the same
2081           name as the filehandle existed, resulting in filehandle method
2082           calls going to the package instead.  This has been fixed.
2083
2084       •   "./Configure -de -Dusevendorprefix" didn't default. [RT #64126]
2085
2086       •   The "Statement unlikely to be reached" warning was listed in
2087           perldiag as an "exec"-category warning, but was enabled and
2088           disabled by the "syntax" category.  On the other hand, the "exec"
2089           category controlled its fatal-ness.  It is now entirely handled by
2090           the "exec" category.
2091
2092       •   The "Replacement list is longer that search list" warning for
2093           "tr///" and "y///" no longer occurs in the presence of the "/c"
2094           flag. [RT #118047]
2095
2096       •   Stringification of NVs are not cached so that the lexical locale
2097           controls stringification of the decimal point. [perl #108378] [perl
2098           #115800]
2099
2100       •   There have been several fixes related to Perl's handling of
2101           locales.  perl #38193 was described above in "Internal Changes".
2102           Also fixed is #118197, where the radix (decimal point) character
2103           had to be an ASCII character (which doesn't work for some non-
2104           Western languages); and #115808, in which "POSIX::setlocale()" on
2105           failure returned an "undef" which didn't warn about not being
2106           defined even if those warnings were enabled.
2107
2108       •   Compiling a "split" operator whose third argument is a named
2109           constant evaluating to 0 no longer causes the constant's value to
2110           change.
2111
2112       •   A named constant used as the second argument to "index" no longer
2113           gets coerced to a string if it is a reference, regular expression,
2114           dualvar, etc.
2115
2116       •   A named constant evaluating to the undefined value used as the
2117           second argument to "index" no longer produces "uninitialized"
2118           warnings at compile time.  It will still produce them at run time.
2119
2120       •   When a scalar was returned from a subroutine in @INC, the
2121           referenced scalar was magically converted into an IO thingy,
2122           possibly resulting in "Bizarre copy" errors if that scalar
2123           continued to be used elsewhere.  Now Perl uses an internal copy of
2124           the scalar instead.
2125
2126       •   Certain uses of the "sort" operator are optimised to modify an
2127           array in place, such as "@a = sort @a".  During the sorting, the
2128           array is made read-only.  If a sort block should happen to die,
2129           then the array remained read-only even outside the "sort".  This
2130           has been fixed.
2131
2132       •   $a and $b inside a sort block are aliased to the actual arguments
2133           to "sort", so they can be modified through those two variables.
2134           This did not always work, e.g., for lvalue subs and $#ary, and
2135           probably many other operators.  It works now.
2136
2137       •   The arguments to "sort" are now all in list context.  If the "sort"
2138           itself were called in void or scalar context, then some, but not
2139           all, of the arguments used to be in void or scalar context.
2140
2141       •   Subroutine prototypes with Unicode characters above U+00FF were
2142           getting mangled during closure cloning.  This would happen with
2143           subroutines closing over lexical variables declared outside, and
2144           with lexical subs.
2145
2146       •   "UNIVERSAL::can" now treats its first argument the same way that
2147           method calls do: Typeglobs and glob references with non-empty IO
2148           slots are treated as handles, and strings are treated as
2149           filehandles, rather than packages, if a handle with that name
2150           exists [perl #113932].
2151
2152       •   Method calls on typeglobs (e.g., "*ARGV->getline") used to
2153           stringify the typeglob and then look it up again.  Combined with
2154           changes in Perl 5.18.0, this allowed "*foo->bar" to call methods on
2155           the "foo" package (like "foo->bar").  In some cases it could cause
2156           the method to be called on the wrong handle.  Now a typeglob
2157           argument is treated as a handle (just like "(\*foo)->bar"), or, if
2158           its IO slot is empty, an error is raised.
2159
2160       •   Assigning a vstring to a tied variable or to a subroutine argument
2161           aliased to a nonexistent hash or array element now works, without
2162           flattening the vstring into a regular string.
2163
2164       •   "pos", "tie", "tied" and "untie" did not work properly on
2165           subroutine arguments aliased to nonexistent hash and array elements
2166           [perl #77814, #27010].
2167
2168       •   The "=>" fat arrow operator can now quote built-in keywords even if
2169           it occurs on the next line, making it consistent with how it treats
2170           other barewords.
2171
2172       •   Autovivifying a subroutine stub via "\&$glob" started causing
2173           crashes in Perl 5.18.0 if the $glob was merely a copy of a real
2174           glob, i.e., a scalar that had had a glob assigned to it.  This has
2175           been fixed. [perl #119051]
2176
2177       •   Perl used to leak an implementation detail when it came to
2178           referencing the return values of certain operators.  "for ($a+$b) {
2179           warn \$_; warn \$_ }" used to display two different memory
2180           addresses, because the "\" operator was copying the variable.
2181           Under threaded builds, it would also happen for constants ("for(1)
2182           { ... }").  This has been fixed. [perl #21979, #78194, #89188,
2183           #109746, #114838, #115388]
2184
2185       •   The range operator ".." was returning the same modifiable scalars
2186           with each call, unless it was the only thing in a "foreach" loop
2187           header.  This meant that changes to values within the list returned
2188           would be visible the next time the operator was executed. [perl
2189           #3105]
2190
2191       •   Constant folding and subroutine inlining no longer cause operations
2192           that would normally return new modifiable scalars to return read-
2193           only values instead.
2194
2195       •   Closures of the form "sub () { $some_variable }" are no longer
2196           inlined, causing changes to the variable to be ignored by callers
2197           of the subroutine.  [perl #79908]
2198
2199       •   Return values of certain operators such as "ref" would sometimes be
2200           shared between recursive calls to the same subroutine, causing the
2201           inner call to modify the value returned by "ref" in the outer call.
2202           This has been fixed.
2203
2204       •   "__PACKAGE__" and constants returning a package name or hash key
2205           are now consistently read-only.  In various previous Perl releases,
2206           they have become mutable under certain circumstances.
2207
2208       •   Enabling "used once" warnings no longer causes crashes on stash
2209           circularities created at compile time ("*Foo::Bar::Foo:: =
2210           *Foo::").
2211
2212       •   Undef constants used in hash keys ("use constant u => undef;
2213           $h{+u}") no longer produce "uninitialized" warnings at compile
2214           time.
2215
2216       •   Modifying a substitution target inside the substitution replacement
2217           no longer causes crashes.
2218
2219       •   The first statement inside a string eval used to use the wrong
2220           pragma setting sometimes during constant folding.  "eval 'uc chr
2221           0xe0'" would randomly choose between Unicode, byte, and locale
2222           semantics.  This has been fixed.
2223
2224       •   The handling of return values of @INC filters (subroutines returned
2225           by subroutines in @INC) has been fixed in various ways.  Previously
2226           tied variables were mishandled, and setting $_ to a reference or
2227           typeglob could result in crashes.
2228
2229       •   The "SvPVbyte" XS function has been fixed to work with tied scalars
2230           returning something other than a string.  It used to return utf8 in
2231           those cases where "SvPV" would.
2232
2233       •   Perl 5.18.0 inadvertently made "--" and "++" crash on dereferenced
2234           regular expressions, and stopped "++" from flattening vstrings.
2235
2236       •   "bless" no longer dies with "Can't bless non-reference value" if
2237           its first argument is a tied reference.
2238
2239       •   "reset" with an argument no longer skips copy-on-write scalars,
2240           regular expressions, typeglob copies, and vstrings.  Also, when
2241           encountering those or read-only values, it no longer skips any
2242           array or hash with the same name.
2243
2244       •   "reset" with an argument now skips scalars aliased to typeglobs
2245           ("for $z (*foo) { reset "z" }").  Previously it would corrupt
2246           memory or crash.
2247
2248       •   "ucfirst" and "lcfirst" were not respecting the bytes pragma.  This
2249           was a regression from Perl 5.12. [perl #117355]
2250
2251       •   Changes to "UNIVERSAL::DESTROY" now update DESTROY caches in all
2252           classes, instead of causing classes that have already had objects
2253           destroyed to continue using the old sub.  This was a regression in
2254           Perl 5.18. [perl #114864]
2255
2256       •   All known false-positive occurrences of the deprecation warning
2257           "Useless use of '\'; doesn't escape metacharacter '%c'", added in
2258           Perl 5.18.0, have been removed. [perl #119101]
2259
2260       •   The value of $^E is now saved across signal handlers on Windows.
2261           [perl #85104]
2262
2263       •   A lexical filehandle (as in "open my $fh...") is usually given a
2264           name based on the current package and the name of the variable,
2265           e.g. "main::$fh".  Under recursion, the filehandle was losing the
2266           "$fh" part of the name.  This has been fixed.
2267
2268       •   Uninitialized values returned by XSUBs are no longer exempt from
2269           uninitialized warnings.  [perl #118693]
2270
2271       •   "elsif ("")" no longer erroneously produces a warning about void
2272           context.  [perl #118753]
2273
2274       •   Passing "undef" to a subroutine now causes @_ to contain the same
2275           read-only undefined scalar that "undef" returns.  Furthermore,
2276           "exists $_[0]" will now return true if "undef" was the first
2277           argument.  [perl #7508, #109726]
2278
2279       •   Passing a non-existent array element to a subroutine does not
2280           usually autovivify it unless the subroutine modifies its argument.
2281           This did not work correctly with negative indices and with non-
2282           existent elements within the array.  The element would be vivified
2283           immediately.  The delayed vivification has been extended to work
2284           with those.  [perl #118691]
2285
2286       •   Assigning references or globs to the scalar returned by $#foo after
2287           the @foo array has been freed no longer causes assertion failures
2288           on debugging builds and memory leaks on regular builds.
2289
2290       •   On 64-bit platforms, large ranges like 1..1000000000000 no longer
2291           crash, but eat up all your memory instead.  [perl #119161]
2292
2293       •   "__DATA__" now puts the "DATA" handle in the right package, even if
2294           the current package has been renamed through glob assignment.
2295
2296       •   When "die", "last", "next", "redo", "goto" and "exit" unwind the
2297           scope, it is possible for "DESTROY" recursively to call a
2298           subroutine or format that is currently being exited.  It that case,
2299           sometimes the lexical variables inside the sub would start out
2300           having values from the outer call, instead of being undefined as
2301           they should.  This has been fixed.  [perl #119311]
2302
2303       •   ${^MPEN} is no longer treated as a synonym for ${^MATCH}.
2304
2305       •   Perl now tries a little harder to return the correct line number in
2306           "(caller)[2]".  [perl #115768]
2307
2308       •   Line numbers inside multiline quote-like operators are now reported
2309           correctly.  [perl #3643]
2310
2311       •   "#line" directives inside code embedded in quote-like operators are
2312           now respected.
2313
2314       •   Line numbers are now correct inside the second here-doc when two
2315           here-doc markers occur on the same line.
2316
2317       •   An optimization in Perl 5.18 made incorrect assumptions causing a
2318           bad interaction with the Devel::CallParser CPAN module.  If the
2319           module was loaded then lexical variables declared in separate
2320           statements following a "my(...)" list might fail to be cleared on
2321           scope exit.
2322
2323       •   &xsub and "goto &xsub" calls now allow the called subroutine to
2324           autovivify elements of @_.
2325
2326       •   &xsub and "goto &xsub" no longer crash if *_ has been undefined and
2327           has no ARRAY entry (i.e. @_ does not exist).
2328
2329       •   &xsub and "goto &xsub" now work with tied @_.
2330
2331       •   Overlong identifiers no longer cause a buffer overflow (and a
2332           crash).  They started doing so in Perl 5.18.
2333
2334       •   The warning "Scalar value @hash{foo} better written as $hash{foo}"
2335           now produces far fewer false positives.  In particular,
2336           @hash{+function_returning_a_list} and @hash{ qw "foo bar baz" } no
2337           longer warn.  The same applies to array slices.  [perl #28380,
2338           #114024]
2339
2340       •   "$! = EINVAL; waitpid(0, WNOHANG);" no longer goes into an internal
2341           infinite loop.  [perl #85228]
2342
2343       •   A possible segmentation fault in filehandle duplication has been
2344           fixed.
2345
2346       •   A subroutine in @INC can return a reference to a scalar containing
2347           the initial contents of the file.  However, that scalar was freed
2348           prematurely if not referenced elsewhere, giving random results.
2349
2350       •   "last" no longer returns values that the same statement has
2351           accumulated so far, fixing amongst other things the long-standing
2352           bug that "push @a, last" would try to return the @a, copying it
2353           like a scalar in the process and resulting in the error, "Bizarre
2354           copy of ARRAY in last."  [perl #3112]
2355
2356       •   In some cases, closing file handles opened to pipe to or from a
2357           process, which had been duplicated into a standard handle, would
2358           call perl's internal waitpid wrapper with a pid of zero.  With the
2359           fix for [perl #85228] this zero pid was passed to "waitpid",
2360           possibly blocking the process.  This wait for process zero no
2361           longer occurs.  [perl #119893]
2362
2363       •   "select" used to ignore magic on the fourth (timeout) argument,
2364           leading to effects such as "select" blocking indefinitely rather
2365           than the expected sleep time.  This has now been fixed.  [perl
2366           #120102]
2367
2368       •   The class name in "for my class $foo" is now parsed correctly.  In
2369           the case of the second character of the class name being followed
2370           by a digit (e.g. 'a1b') this used to give the error "Missing $ on
2371           loop variable".  [perl #120112]
2372
2373       •   Perl 5.18.0 accidentally disallowed "-bareword" under "use strict"
2374           and "use integer".  This has been fixed.  [perl #120288]
2375
2376       •   "-a" at the start of a line (or a hyphen with any single letter
2377           that is not a filetest operator) no longer produces an erroneous
2378           'Use of "-a" without parentheses is ambiguous' warning.  [perl
2379           #120288]
2380
2381       •   Lvalue context is now properly propagated into bare blocks and "if"
2382           and "else" blocks in lvalue subroutines.  Previously, arrays and
2383           hashes would sometimes incorrectly be flattened when returned in
2384           lvalue list context, or "Bizarre copy" errors could occur.  [perl
2385           #119797]
2386
2387       •   Lvalue context is now propagated to the branches of "||" and "&&"
2388           (and their alphabetic equivalents, "or" and "and").  This means
2389           "foreach (pos $x || pos $y) {...}" now allows "pos" to be modified
2390           through $_.
2391
2392       •   "stat" and "readline" remember the last handle used; the former for
2393           the special "_" filehandle, the latter for "${^LAST_FH}".  "eval
2394           "*foo if 0"" where *foo was the last handle passed to "stat" or
2395           "readline" could cause that handle to be forgotten if the handle
2396           were not opened yet.  This has been fixed.
2397
2398       •   Various cases of "delete $::{a}", "delete $::{ENV}" etc. causing a
2399           crash have been fixed.  [perl #54044]
2400
2401       •   Setting $! to EACCESS before calling "require" could affect
2402           "require"'s behaviour.  This has been fixed.
2403
2404       •   The "Can't use \1 to mean $1 in expression" warning message now
2405           only occurs on the right-hand (replacement) part of a substitution.
2406           Formerly it could happen in code embedded in the left-hand side, or
2407           in any other quote-like operator.
2408
2409       •   Blessing into a reference ("bless $thisref, $thatref") has long
2410           been disallowed, but magical scalars for the second like $/ and
2411           those tied were exempt.  They no longer are.  [perl #119809]
2412
2413       •   Blessing into a reference was accidentally allowed in 5.18 if the
2414           class argument were a blessed reference with stale method caches
2415           (i.e., whose class had had subs defined since the last method
2416           call).  They are disallowed once more, as in 5.16.
2417
2418       •   "$x->{key}" where $x was declared as "my Class $x" no longer
2419           crashes if a Class::FIELDS subroutine stub has been declared.
2420
2421       •   @$obj{'key'} and "${$obj}{key}" used to be exempt from compile-time
2422           field checking ("No such class field"; see fields) but no longer
2423           are.
2424
2425       •   A nonexistent array element with a large index passed to a
2426           subroutine that ties the array and then tries to access the element
2427           no longer results in a crash.
2428
2429       •   Declaring a subroutine stub named NEGATIVE_INDICES no longer makes
2430           negative array indices crash when the current package is a tied
2431           array class.
2432
2433       •   Declaring a "require", "glob", or "do" subroutine stub in the
2434           CORE::GLOBAL:: package no longer makes compilation of calls to the
2435           corresponding functions crash.
2436
2437       •   Aliasing CORE::GLOBAL:: functions to constants stopped working in
2438           Perl 5.10 but has now been fixed.
2439
2440       •   When "`...`" or "qx/.../" calls a "readpipe" override, double-
2441           quotish interpolation now happens, as is the case when there is no
2442           override.  Previously, the presence of an override would make these
2443           quote-like operators act like "q{}", suppressing interpolation.
2444           [perl #115330]
2445
2446       •   "<<<`...`" here-docs (with backticks as the delimiters) now call
2447           "readpipe" overrides.  [perl #119827]
2448
2449       •   "&CORE::exit()" and "&CORE::die()" now respect vmsish hints.
2450
2451       •   Undefining a glob that triggers a DESTROY method that undefines the
2452           same glob is now safe.  It used to produce "Attempt to free
2453           unreferenced glob pointer" warnings and leak memory.
2454
2455       •   If subroutine redefinition ("eval 'sub foo{}'" or "newXS" for XS
2456           code) triggers a DESTROY method on the sub that is being redefined,
2457           and that method assigns a subroutine to the same slot ("*foo = sub
2458           {}"), $_[0] is no longer left pointing to a freed scalar.  Now
2459           DESTROY is delayed until the new subroutine has been installed.
2460
2461       •   On Windows, perl no longer calls CloseHandle() on a socket handle.
2462           This makes debugging easier on Windows by removing certain
2463           irrelevant bad handle exceptions.  It also fixes a race condition
2464           that made socket functions randomly fail in a Perl process with
2465           multiple OS threads, and possible test failures in
2466           dist/IO/t/cachepropagate-tcp.t.  [perl #120091/118059]
2467
2468       •   Formats involving UTF-8 encoded strings, or strange vars like ties,
2469           overloads, or stringified refs (and in recent perls, pure NOK vars)
2470           would generally do the wrong thing in formats when the var is
2471           treated as a string and repeatedly chopped, as in "^<<<~~" and
2472           similar. This has now been resolved.  [perl
2473           #33832/45325/113868/119847/119849/119851]
2474
2475       •   "semctl(..., SETVAL, ...)" would set the semaphore to the top
2476           32-bits of the supplied integer instead of the bottom 32-bits on
2477           64-bit big-endian systems. [perl #120635]
2478
2479       •   "readdir()" now only sets $! on error.  $! is no longer set to
2480           "EBADF" when then terminating "undef" is read from the directory
2481           unless the system call sets $!. [perl #118651]
2482
2483       •   &CORE::glob no longer causes an intermittent crash due to perl's
2484           stack getting corrupted. [perl #119993]
2485
2486       •   "open" with layers that load modules (e.g., "<:encoding(utf8)") no
2487           longer runs the risk of crashing due to stack corruption.
2488
2489       •   Perl 5.18 broke autoloading via "->SUPER::foo" method calls by
2490           looking up AUTOLOAD from the current package rather than the
2491           current package's superclass.  This has been fixed. [perl #120694]
2492
2493       •   A longstanding bug causing "do {} until CONSTANT", where the
2494           constant holds a true value, to read unallocated memory has been
2495           resolved.  This would usually happen after a syntax error.  In past
2496           versions of Perl it has crashed intermittently. [perl #72406]
2497
2498       •   Fix HP-UX $! failure. HP-UX strerror() returns an empty string for
2499           an unknown error code.  This caused an assertion to fail under
2500           DEBUGGING builds.  Now instead, the returned string for "$!"
2501           contains text indicating the code is for an unknown error.
2502
2503       •   Individually-tied elements of @INC (as in "tie $INC[0]...") are now
2504           handled correctly.  Formerly, whether a sub returned by such a tied
2505           element would be treated as a sub depended on whether a FETCH had
2506           occurred previously.
2507
2508       •   "getc" on a byte-sized handle after the same "getc" operator had
2509           been used on a utf8 handle used to treat the bytes as utf8,
2510           resulting in erratic behavior (e.g., malformed UTF-8 warnings).
2511
2512       •   An initial "{" at the beginning of a format argument line was
2513           always interpreted as the beginning of a block prior to v5.18.  In
2514           Perl v5.18, it started being treated as an ambiguous token.  The
2515           parser would guess whether it was supposed to be an anonymous hash
2516           constructor or a block based on the contents.  Now the previous
2517           behaviour has been restored.  [perl #119973]
2518
2519       •   In Perl v5.18 "undef *_; goto &sub" and "local *_; goto &sub"
2520           started crashing.  This has been fixed. [perl #119949]
2521
2522       •   Backticks (" `` " or " qx// ") combined with multiple threads on
2523           Win32 could result in output sent to stdout on one thread being
2524           captured by backticks of an external command in another thread.
2525
2526           This could occur for pseudo-forked processes too, as Win32's
2527           pseudo-fork is implemented in terms of threads.  [perl #77672]
2528
2529       •   "open $fh, ">+", undef" no longer leaks memory when TMPDIR is set
2530           but points to a directory a temporary file cannot be created in.
2531           [perl #120951]
2532
2533       •   " for ( $h{k} || '' ) " no longer auto-vivifies $h{k}.  [perl
2534           #120374]
2535
2536       •   On Windows machines, Perl now emulates the POSIX use of the
2537           environment for locale initialization.  Previously, the environment
2538           was ignored.  See "ENVIRONMENT" in perllocale.
2539
2540       •   Fixed a crash when destroying a self-referencing GLOB.  [perl
2541           #121242]
2542

Known Problems

2544       •   IO::Socket is known to fail tests on AIX 5.3.  There is a patch
2545           <https://github.com/Perl/perl5/issues/13484> in the request
2546           tracker, #120835, which may be applied to future releases.
2547
2548       •   The following modules are known to have test failures with this
2549           version of Perl.  Patches have been submitted, so there will
2550           hopefully be new releases soon:
2551
2552           •   Data::Structure::Util version 0.15
2553
2554           •   HTML::StripScripts version 1.05
2555
2556           •   List::Gather version 0.08.
2557

Obituary

2559       Diana Rosa, 27, of Rio de Janeiro, went to her long rest on May 10,
2560       2014, along with the plush camel she kept hanging on her computer
2561       screen all the time. She was a passionate Perl hacker who loved the
2562       language and its community, and who never missed a Rio.pm event. She
2563       was a true artist, an enthusiast about writing code, singing arias and
2564       graffiting walls. We'll never forget you.
2565
2566       Greg McCarroll died on August 28, 2013.
2567
2568       Greg was well known for many good reasons. He was one of the organisers
2569       of the first YAPC::Europe, which concluded with an unscheduled auction
2570       where he frantically tried to raise extra money to avoid the conference
2571       making a loss. It was Greg who mistakenly arrived for a london.pm
2572       meeting a week late; some years later he was the one who sold the
2573       choice of official meeting date at a YAPC::Europe auction, and
2574       eventually as glorious leader of london.pm he got to inherit the
2575       irreverent confusion that he had created.
2576
2577       Always helpful, friendly and cheerfully optimistic, you will be missed,
2578       but never forgotten.
2579

Acknowledgements

2581       Perl 5.20.0 represents approximately 12 months of development since
2582       Perl 5.18.0 and contains approximately 470,000 lines of changes across
2583       2,900 files from 124 authors.
2584
2585       Excluding auto-generated files, documentation and release tools, there
2586       were approximately 280,000 lines of changes to 1,800 .pm, .t, .c and .h
2587       files.
2588
2589       Perl continues to flourish into its third decade thanks to a vibrant
2590       community of users and developers. The following people are known to
2591       have contributed the improvements that became Perl 5.20.0:
2592
2593       Aaron Crane, Abhijit Menon-Sen, Abigail, Abir Viqar, Alan Haggai Alavi,
2594       Alan Hourihane, Alexander Voronov, Alexandr Ciornii, Andy Dougherty,
2595       Anno Siegel, Aristotle Pagaltzis, Arthur Axel 'fREW' Schmidt, Brad
2596       Gilbert, Brendan Byrd, Brian Childs, Brian Fraser, Brian Gottreu, Chris
2597       'BinGOs' Williams, Christian Millour, Colin Kuskie, Craig A. Berry,
2598       Dabrien 'Dabe' Murphy, Dagfinn Ilmari Mannsaaker, Daniel Dragan, Darin
2599       McBride, David Golden, David Leadbeater, David Mitchell, David Nicol,
2600       David Steinbrunner, Dennis Kaarsemaker, Dominic Hargreaves, Ed Avis,
2601       Eric Brine, Evan Zacks, Father Chrysostomos, Florian Ragwitz, Francois
2602       Perrad, Gavin Shelley, Gideon Israel Dsouza, Gisle Aas, Graham Knop,
2603       H.Merijn Brand, Hauke D, Heiko Eissfeldt, Hiroo Hayashi, Hojung Youn,
2604       James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jess Robinson,
2605       Jesse Luehrs, Johan Vromans, John Gardiner Myers, John Goodyear, John
2606       P. Linderman, John Peacock, kafka, Kang-min Liu, Karen Etheridge, Karl
2607       Williamson, Keedi Kim, Kent Fredric, kevin dawson, Kevin Falcone, Kevin
2608       Ryde, Leon Timmermans, Lukas Mai, Marc Simpson, Marcel Gruenauer, Marco
2609       Peereboom, Marcus Holland-Moritz, Mark Jason Dominus, Martin McGrath,
2610       Matthew Horsfall, Max Maischein, Mike Doherty, Moritz Lenz, Nathan
2611       Glenn, Nathan Trapuzzano, Neil Bowers, Neil Williams, Nicholas Clark,
2612       Niels Thykier, Niko Tyni, Olivier Mengue, Owain G.  Ainsworth, Paul
2613       Green, Paul Johnson, Peter John Acklam, Peter Martini, Peter Rabbitson,
2614       Petr PisaX, Philip Boulain, Philip Guenther, Piotr Roszatycki, Rafael
2615       Garcia-Suarez, Reini Urban, Reuben Thomas, Ricardo Signes, Ruslan
2616       Zakirov, Sergey Alekseev, Shirakata Kentaro, Shlomi Fish, Slaven Rezic,
2617       Smylers, Steffen Mueller, Steve Hay, Sullivan Beck, Thomas Sibley,
2618       Tobias Leich, Toby Inkster, Tokuhiro Matsuno, Tom Christiansen, Tom
2619       Hukins, Tony Cook, Victor Efimov, Viktor Turskyi, Vladimir Timofeev,
2620       YAMASHINA Hio, Yves Orton, Zefram, Zsban Ambrus, AEvar Arnfjoerd`
2621       Bjarmason.
2622
2623       The list above is almost certainly incomplete as it is automatically
2624       generated from version control history. In particular, it does not
2625       include the names of the (very much appreciated) contributors who
2626       reported issues to the Perl bug tracker.
2627
2628       Many of the changes included in this version originated in the CPAN
2629       modules included in Perl's core. We're grateful to the entire CPAN
2630       community for helping Perl to flourish.
2631
2632       For a more complete list of all of Perl's historical contributors,
2633       please see the AUTHORS file in the Perl source distribution.
2634

Reporting Bugs

2636       If you find what you think is a bug, you might check the articles
2637       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
2638       database at http://rt.perl.org/perlbug/ .  There may also be
2639       information at http://www.perl.org/ , the Perl Home Page.
2640
2641       If you believe you have an unreported bug, please run the perlbug
2642       program included with your release.  Be sure to trim your bug down to a
2643       tiny but sufficient test case.  Your bug report, along with the output
2644       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
2645       the Perl porting team.
2646
2647       If the bug you are reporting has security implications, which make it
2648       inappropriate to send to a publicly archived mailing list, then please
2649       send it to perl5-security-report@perl.org.  This points to a closed
2650       subscription unarchived mailing list, which includes all the core
2651       committers, who will be able to help assess the impact of issues,
2652       figure out a resolution, and help co-ordinate the release of patches to
2653       mitigate or fix the problem across all platforms on which Perl is
2654       supported.  Please only use this address for security issues in the
2655       Perl core, not for modules independently distributed on CPAN.
2656

SEE ALSO

2658       The Changes file for an explanation of how to view exhaustive details
2659       on what changed.
2660
2661       The INSTALL file for how to build Perl.
2662
2663       The README file for general stuff.
2664
2665       The Artistic and Copying files for copyright information.
2666
2667
2668
2669perl v5.34.0                      2021-10-18                  PERL5200DELTA(1)
Impressum