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
1254       ·   perlbug 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.  [perl #121277
1259           <https://rt.perl.org/Public/Bug/Display.html?id=121277>]
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
1272       ·   installperl 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.  [perl #121505
1354           <https://rt.perl.org/Public/Bug/Display.html?id=121505>]
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
1422           ·   recv() 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).  [perl
1505               #121119
1506               <https://rt.perl.org/Public/Bug/Display.html?id=121119>]
1507
1508           ·   About 15 minutes of idle sleeping was removed from running
1509               "make test" due to a bug in which the timeout monitor used for
1510               tests could not be cancelled once the test completes, and the
1511               full timeout period elapsed before running the next test file.
1512               [perl #121395
1513               <https://rt.perl.org/Public/Bug/Display.html?id=121395>]
1514
1515           ·   On a perl built without pseudo-fork (pseudo-fork builds were
1516               not affected by this bug), killing a process tree with "kill()"
1517               and a negative signal resulted in "kill()" inverting the
1518               returned value.  For example, if "kill()" killed 1 process tree
1519               PID then it returned 0 instead of 1, and if "kill()" was passed
1520               2 invalid PIDs then it returned 2 instead of 0.  This has
1521               probably been the case since the process tree kill feature was
1522               implemented on Win32.  It has now been corrected to follow the
1523               documented behaviour.  [perl #121230
1524               <https://rt.perl.org/Public/Bug/Display.html?id=121230>]
1525
1526           ·   When building a 64-bit perl, an uninitialized memory read in
1527               miniperl.exe, used during the build process, could lead to a
1528               4GB wperl.exe being created.  This has now been fixed.  (Note
1529               that perl.exe itself was unaffected, but obviously wperl.exe
1530               would have been completely broken.)  [perl #121471
1531               <https://rt.perl.org/Public/Bug/Display.html?id=121471>]
1532
1533           ·   Perl can now be built with gcc version 4.8.1 from
1534               <http://www.mingw.org>.  This was previously broken due to an
1535               incorrect definition of DllMain() in one of perl's source
1536               files.  Earlier gcc versions were also affected when using
1537               version 4 of the w32api package.  Versions of gcc available
1538               from <http://mingw-w64.sourceforge.net/> were not affected.
1539               [perl #121643
1540               <https://rt.perl.org/Public/Bug/Display.html?id=121643>]
1541
1542           ·   The test harness now has no failures when perl is built on a
1543               FAT drive with the Windows OS on an NTFS drive.  [perl #21442
1544               <https://rt.perl.org/Public/Bug/Display.html?id=21442>]
1545
1546           ·   When cloning the context stack in fork() emulation,
1547               Perl_cx_dup() would crash accessing parameter information for
1548               context stack entries that included no parameters, as with
1549               "&foo;".  [perl #121721
1550               <https://rt.perl.org/Public/Bug/Display.html?id=121721>]
1551
1552           ·   Introduced by perl #113536
1553               <https://rt.perl.org/Public/Bug/Display.html?id=113536>, a
1554               memory leak on every call to "system" and backticks (" `` "),
1555               on most Win32 Perls starting from 5.18.0 has been fixed.  The
1556               memory leak only occurred if you enabled psuedo-fork in your
1557               build of Win32 Perl, and were running that build on Server 2003
1558               R2 or newer OS.  The leak does not appear on WinXP SP3.  [perl
1559               #121676
1560               <https://rt.perl.org/Public/Bug/Display.html?id=121676>]
1561
1562       WinCE
1563           ·   The building of XS modules has largely been restored.  Several
1564               still cannot (yet) be built but it is now possible to build
1565               Perl on WinCE with only a couple of further patches (to Socket
1566               and ExtUtils::MakeMaker), hopefully to be incorporated soon.
1567
1568           ·   Perl can now be built in one shot with no user intervention on
1569               WinCE by running "nmake -f Makefile.ce all".
1570
1571               Support for building with EVC (Embedded Visual C++) 4 has been
1572               restored.  Perl can also be built using Smart Devices for
1573               Visual C++ 2005 or 2008.
1574

Internal Changes

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

Selected Bug Fixes

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

Known Problems

2548       ·   IO::Socket is known to fail tests on AIX 5.3.  There is a patch
2549           <https://rt.perl.org/Ticket/Display.html?id=120835> in the request
2550           tracker, #120835, which may be applied to future releases.
2551
2552       ·   The following modules are known to have test failures with this
2553           version of Perl.  Patches have been submitted, so there will
2554           hopefully be new releases soon:
2555
2556           ·   Data::Structure::Util version 0.15
2557
2558           ·   HTML::StripScripts version 1.05
2559
2560           ·   List::Gather version 0.08.
2561

Obituary

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

Acknowledgements

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

Reporting Bugs

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

SEE ALSO

2662       The Changes file for an explanation of how to view exhaustive details
2663       on what changed.
2664
2665       The INSTALL file for how to build Perl.
2666
2667       The README file for general stuff.
2668
2669       The Artistic and Copying files for copyright information.
2670
2671
2672
2673perl v5.26.3                      2018-03-01                  PERL5200DELTA(1)
Impressum