Warnings will now be issued at compile time when these operations are detected. no if $] >= 5.01908, warnings => "experimental::autoderef";

Consider, though, replacing the use of these features, as they may change behavior again before becoming stable.

=item *

L<A sequence of multiple spaces in a charnames alias definition is deprecated|perldiag/"A sequence of multiple spaces in a charnames alias definition is deprecated">

L<Trailing white-space in a charnames alias definition is deprecated|perldiag/"Trailing white-space in a charnames alias definition is deprecated">

These two deprecation warnings involving C<\N{...}> were incorrectly implemented. They did not warn by default (now they do) and could not be made fatal via C<< use warnings FATAL => 'deprecated' >> (now they can).

=item *

L<Attribute prototype(%s) discards earlier prototype attribute in same sub|perldiag/"Attribute prototype(%s) discards earlier prototype attribute in same sub">

(W misc) A sub was declared as C<sub foo : prototype(A) : prototype(B) {}>, for example. Since each sub can only have one prototype, the earlier declaration(s) are discarded while the last one is applied.

=item *

L<Invalid \0 character in %s for %s: %s\0%s|perldiag/"Invalid \0 character in %s for %s: %s\0%s">

(W syscalls) Embedded \0 characters in pathnames or other system call arguments produce a warning as of 5.20. The parts after the \0 were formerly ignored by system calls.

=item *

L<Matched non-Unicode code point 0x%X against Unicode property; may not be portable|perldiag/"Matched non-Unicode code point 0x%X against Unicode property; may not be portable">.

This replaces the message "Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed".

=item *

L<Missing ']' in prototype for %s : %s|perldiag/"Missing ']' in prototype for %s : %s">

(W illegalproto) A grouping was started with C<[> but never closed with C<]>.

=item *

L<Possible precedence issue with control flow operator|perldiag/"Possible precedence issue with control flow operator">

(W syntax) There is a possible problem with the mixing of a control flow operator (e.g. C<return>) and a low-precedence operator like C<or>. Consider: sub { return $a or $b; }

This is parsed as: sub { (return $a) or $b; }

Which is effectively just: sub { return $a; }

Either use parentheses or the high-precedence variant of the operator.

Note this may be also triggered for constructs like: sub { 1 if die; }

=item *

L<Postfix dereference is experimental|perldiag/"Postfix dereference is experimental">

(S experimental::postderef) This warning is emitted if you use the experimental postfix dereference syntax. Simply suppress the warning if you want to use the feature, but know that in doing so you are taking the risk of using an experimental feature which may change or be removed in a future Perl version: no warnings "experimental::postderef"; use feature "postderef", "postderef_qq"; $ref->$*; $aref->@*; $aref->@[@indices]; ... etc ...

=item *

L<Prototype '%s' overridden by attribute 'prototype(%s)' in %s|perldiag/"Prototype '%s' overridden by attribute 'prototype(%s)' in %s">

(W prototype) A prototype was declared in both the parentheses after the sub name and via the prototype attribute. The prototype in parentheses is useless, since it will be replaced by the prototype from the attribute before it's ever used.

=item *

L<Scalar value @%s[%s] better written as $%s[%s]|perldiag/"Scalar value @%s[%s] better written as $%s[%s]">

(W syntax) In scalar context, you've used an array index/value slice (indicated by %) to select a single element of an array. Generally it's better to ask for a scalar value (indicated by $). The difference is that C<$foo[&bar]> always behaves like a scalar, both in the value it returns and when evaluating its argument, while C<%foo[&bar]> provides a list context to its subscript, which can do weird things if you're expecting only one subscript. When called in list context, it also returns the index (what C<&bar> returns) in addition to the value.

=item *

L<Scalar value @%s{%s} better written as $%s{%s}|perldiag/"Scalar value @%s{%s} better written as $%s{%s}">

(W syntax) In scalar context, you've used a hash key/value slice (indicated by %) to select a single element of a hash. Generally it's better to ask for a scalar value (indicated by $). The difference is that C<$foo{&bar}> always behaves like a scalar, both in the value it returns and when evaluating its argument, while C<@foo{&bar}> and provides a list context to its subscript, which can do weird things if you're expecting only one subscript. When called in list context, it also returns the key in addition to the value.

=item *

L<Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef|perldiag/"Setting $E<sol> to a reference to %s as a form of slurp is deprecated, treating as undef">

=item *

L<Unexpected exit %u|perldiag/"Unexpected exit %u">

(S) exit() was called or the script otherwise finished gracefully when C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.

=item *

L<Unexpected exit failure %d|perldiag/"Unexpected exit failure %d">

(S) An uncaught die() was called when C<PERL_EXIT_WARN> was set in C<PL_exit_flags>.

=item *

L<Use of literal control characters in variable names is deprecated|perldiag/"Use of literal control characters in variable names is deprecated">

(D deprecated) Using literal control characters in the source to refer to the ^FOO variables, like $^X and ${^GLOBAL_PHASE} is now deprecated. This only affects code like $\cT, where \cT is a control (like a C<SOH>) in the source code: ${"\cT"} and $^T remain valid.

=item *

L<Useless use of greediness modifier|perldiag/"Useless use of greediness modifier '%c' in regex; marked by <-- HERE in m/%s/">

=back

=head2 Changes to Existing Diagnostics

=over 4

=item *

Warnings and errors from the regexp engine are now UTF-8 clean.

=item *

The "Unknown switch condition" error message has some slight changes. This error triggers when there is an unknown condition in a C<(?(foo))> conditional. The error message used to read: Unknown switch condition (?(%s in regex;

But what %s could be was mostly up to luck. For C<(?(foobar))>, you might have seen "fo" or "f". For Unicode characters, you would generally get a corrupted string. The message has been changed to read: Unknown switch condition (?(...)) in regex;

Additionally, the C<'E<lt>-- HERE'> marker in the error will now point to the correct spot in the regex.

=item *

The "%s "\x%X" does not map to Unicode" warning is now correctly listed as a severe warning rather than as a fatal error.

=item *

Under rare circumstances, one could get a "Can't coerce readonly REF to string" instead of the customary "Modification of a read-only value". This alternate error message has been removed.

=item *

"Ambiguous use of * resolved as operator *": This and similar warnings about "%" and "&" used to occur in some circumstances where there was no operator of the type cited, so the warning was completely wrong. This has been fixed [ perl #117535 #76910 ].

=item *

Warnings about malformed subroutine prototypes are now more consistent in how the prototypes are rendered. Some of these warnings would truncate prototypes containing nulls. In other cases one warning would suppress another. The warning about illegal characters in prototypes no longer says "after '_'" if the bad character came before the underscore.

=item *

L<Perl folding rules are not up-to-date for 0x%X; please use the perlbug utility to report; in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Perl folding rules are not up-to-date for 0x%X; please use the perlbug utility to report; in regex; marked by <-- HERE in m/%s/">

This message is now only in the regexp category, and not in the deprecated category. It is still a default (i.e., severe) warning [ perl #89648 ].

=item *

L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">

This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to be in scalar context at compile time. Previously it was worded "Scalar value %%s[%s] better written as $%s[%s]".

=item *

L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:

The description for this diagnostic has been extended to cover all cases where the warning may occur. Issues with the positioning of the arrow indicator have also been resolved.

=item *

The error messages for C<my($a?$b$c)> and C<my(do{})> now mention "conditional expression" and "do block", respectively, instead of reading 'Can't declare null operation in "my"'.

=item *

When C<use re "debug"> executes a regex containing a backreference, the debugging output now shows what string is being matched.

=item *

The now fatal error message C<Character following "\c" must be ASCII> has been reworded as C<Character following "\c" must be printable ASCII> to emphasize that in C<\cI<X>>, I<X> must be a I<printable (non-control)> ASCII character.

=back

=head1 Utility Changes

=head3 L<a2p>

=over 4

=item *

A possible crash from an off-by-one error when trying to access before the beginning of a buffer has been fixed. [ perl #120244

=back

=head3 F<bisect.pl>

The git bisection tool F<Porting/bisect.pl> has had many enhancements.

It is provided as part of the source distribution but not installed because it is not self-contained as it relies on being run from within a git checkout. Note also that it makes no attempt to fix tests, correct runtime bugs or make something useful to install - its purpose is to make minimal changes to get any historical revision of interest to build and run as close as possible to "as-was", and thereby make C<git bisect> easy to use.

=over 4

=item *

Can optionally run the test case with a timeout.

=item *

Can now run in-place in a clean git checkout.

=item *

Can run the test case under C<valgrind>.

=item *

Can apply user supplied patches and fixes to the source checkout before building.

=item *

Now has fixups to enable building several more historical ranges of bleadperl, which can be useful for pinpointing the origins of bugs or behaviour changes.

=back

=head3 L<find2perl>

=over 4

=item *

L now handles C> wildcards correctly. [ perl #113054

=back

=head3 L<perlbug>

=over 4

=item *

F<perlbug> now has a C<-p> option for attaching patches with a bug report.

=item *

L<perlbug> has been modified to supply the report template with CRLF line endings on Windows.

L #121277 |https://rt.perl.org/Public/Bug/Display.html?id=121277> =item *

L<perlbug> now makes as few assumptions as possible about the encoding of the report. This will likely change in the future to assume UTF-8 by default but allow a user override.

=back

=head1 Configuration and Compilation

=over 4

=item *

The F<Makefile.PL> for L<SDBM_File> now generates a better F<Makefile>, which avoids a race condition during parallel makes, which could cause the build to fail. This is the last known parallel make problem (on *nix platforms), and therefore we believe that a parallel make should now always be error free.

=item *

F<installperl> and F<installman>'s option handling has been refactored to use L<Getopt::Long>. Both are used by the F<Makefile> C<install> targets, and are not installed, so these changes are only likely to affect custom installation scripts.

=over 4

=item *

Single letter options now also have long names.

=item *

Invalid options are now rejected.

=item *

Command line arguments that are not options are now rejected.

=item *

Each now has a C<--help> option to display the usage message.

=back

The behaviour for all valid documented invocations is unchanged.

=item *

Where possible, the build now avoids recursive invocations of F<make> when building pure-Perl extensions, without removing any parallelism from the build. Currently around 80 extensions can be processed directly by the F<make_ext.pl> tool, meaning that 80 invocations of F<make> and 160 invocations of F<miniperl> are no longer made.

=item *

The build system now works correctly when compiling under GCC or Clang with link-time optimization enabled (the C option). [ perl #113022

=item *

Distinct library basenames with C<d_libname_unique>.

When compiling perl with this option, the library files for XS modules are named something "unique" -- for example, Hash/Util/Util.so becomes Hash/Util/PL_Hash__Util.so. This behavior is similar to what currently happens on VMS, and serves as groundwork for the Android port.

=item *

C<sysroot> option to indicate the logical root directory under gcc and clang.

When building with this option set, both Configure and the compilers search for all headers and libraries under this new sysroot, instead of /.

This is a huge time saver if cross-compiling, but can also help on native builds if your toolchain's files have non-standard locations.

=item *

The cross-compilation model has been renovated. There's several new options, and some backwards-incompatible changes:

We now build binaries for miniperl and generate_uudmap to be used on the host, rather than running every miniperl call on the target; this means that, short of 'make test', we no longer need access to the target system once Configure is done. You can provide already-built binaries through the C<hostperl> and C<hostgenerate> options to Configure.

Additionally, if targeting an EBCDIC platform from an ASCII host, or viceversa, you'll need to run Configure with C<-Uhostgenerate>, to indicate that generate_uudmap should be run on the target.

Finally, there's also a way of having Configure end early, right after building the host binaries, by cross-compiling without specifying a C<targethost>.

The incompatible changes include no longer using xconfig.h, xlib, or Cross.pm, so canned config files and Makefiles will have to be updated.

=item *

Related to the above, there is now a way of specifying the location of sh (or equivalent) on the target system: C<targetsh>.

For example, Android has its sh in /system/bin/sh, so if cross-compiling from a more normal Unixy system with sh in /bin/sh, "targetsh" would end up as /system/bin/sh, and "sh" as /bin/sh.

=item *

By default, B<gcc> 4.9 does some optimizations that break perl. The B<-fwrapv> option disables those optimizations (and probably others), so for B<gcc> 4.3 and later (since the there might be similar problems lurking on older versions too, but B<-fwrapv> was broken before 4.3, and the optimizations probably won't go away), F<Configure> now adds B<-fwrapv> unless the user requests B<-fno-wrapv>, which disables B<-fwrapv>, or B<-fsanitize=undefined>, which turns the overflows B<-fwrapv> ignores into runtime errors.

L #121505 |https://rt.perl.org/Public/Bug/Display.html?id=121505> =back

=head1 Testing

=over 4

=item *

The C make target now allows tests to be run in parallel. This target allows Perl's test suite to be run under Valgrind, which detects certain sorts of C programming errors, though at significant cost in running time. On suitable hardware, allowing parallel execution claws back a lot of that additional cost. [ perl #121431

=item *

Various tests in F are no longer skipped when the perl F directory is outside the perl tree and pointed to by C. [ perl #120505

=item *

The test suite no longer fails when the user's interactive shell maintains a C<$PWD> environment variable, but the F</bin/sh> used for running tests doesn't.

=back

=head1 Platform Support

=head2 New Platforms

=over 4

=item Android

Perl can now be built for Android, either natively or through cross-compilation, for all three currently available architectures (ARM, MIPS, and x86), on a wide range of versions.

=item Bitrig

Compile support has been added for Bitrig, a fork of OpenBSD.

=item FreeMiNT

Support has been added for FreeMiNT, a free open-source OS for the Atari ST system and its successors, based on the original MiNT that was officially adopted by Atari.

=item Synology

Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ P1022 ppc - e500v2) not meant for workstations or development. These boxes should build now. The basic problems are the non-standard location for tools.

=back

=head2 Discontinued Platforms

=over 4

=item C<sfio>

Code related to supporting the C<sfio> I/O system has been removed.

Perl 5.004 added support to use the native API of C<sfio>, AT&T's Safe/Fast I/O library. This code still built with v5.8.0, albeit with many regression tests failing, but was inadvertently broken before the v5.8.1 release, meaning that it has not worked on any version of Perl released since then. In over a decade we have received no bug reports about this, hence it is clear that no-one is using this functionality on any version of Perl that is still supported to any degree.

=item AT&T 3b1

Configure support for the 3b1, also known as the AT&T Unix PC (and the similar AT&T 7300), has been removed.

=item DG/UX

DG/UX was a Unix sold by Data General. The last release was in April 2001. It only runs on Data General's own hardware.

=item EBCDIC

In the absence of a regular source of smoke reports, code intended to support native EBCDIC platforms will be removed from perl before 5.22.0.

=back

=head2 Platform-Specific Notes

=over 4

=item Cygwin

=over 4

=item *

recv() on a connected handle would populate the returned sender address with whatever happened to be in the working buffer. recv() now uses a workaround similar to the Win32 recv() wrapper and returns an empty string when recvfrom(2) doesn't modify the supplied address length. [ perl #118843

=item *

Fixed a build error in cygwin.c on Cygwin 1.7.28.

Tests now handle the errors that occur when C<cygserver> isn't running.

=back

=item GNU/Hurd

The BSD compatibility library C<libbsd> is no longer required for builds.

=item Linux

The hints file now looks for C<libgdbm_compat> only if C<libgdbm> itself is also wanted. The former is never useful without the latter, and in some circumstances, including it could actually prevent building.

=item Mac OS

The build system now honors an C<ld> setting supplied by the user running F<Configure>.

=item MidnightBSD

C<objformat> was removed from version 0.4-RELEASE of MidnightBSD and had been deprecated on earlier versions. This caused the build environment to be erroneously configured for C<a.out> rather than C<elf>. This has been now been corrected.

=item Mixed-endian platforms

The code supporting C<pack> and C<unpack> operations on mixed endian platforms has been removed. We believe that Perl has long been unable to build on mixed endian architectures (such as PDP-11s), so we don't think that this change will affect any platforms which were able to build v5.18.0.

=item VMS

=over 4

=item *

The C<PERL_ENV_TABLES> feature to control the population of %ENV at perl start-up was broken in Perl 5.16.0 but has now been fixed.

=item *

Skip access checks on remotes in opendir(). [ perl #121002

=item *

A check for glob metacharacters in a path returned by the L<C<glob()>|perlfunc/glob> operator has been replaced with a check for VMS wildcard characters. This saves a significant number of unnecessary L<C<lstat()>|perlfunc/lstat> calls such that some simple glob operations become 60-80% faster.

=back

=item Win32

=over 4

=item *

C and C on Win32 now set $! to ENOSPC and EDQUOT when appropriate. [ perl #119857

=item *

The BUILD_STATIC and ALL_STATIC makefile options for linking some or (nearly) all extensions statically (into perl520.dll, and into a separate perl-static.exe too) were broken for MinGW builds. This has now been fixed.

The ALL_STATIC option has also been improved to include the Encode and Win32 extensions (for both VC++ and MinGW builds).

=item *

Support for building with Visual C++ 2013 has been added. There are currently two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which will hopefully be resolved soon.

=item *

Experimental support for building with Intel C++ Compiler has been added. The nmake makefile (win32/Makefile) and the dmake makefile (win32/makefile.mk) can be used. A "nmake test" will not pass at this time due to F<cpan/CGI/t/url.t>.

=item *

Killing a process tree with L and a negative signal, was broken starting in 5.18.0. In this bug, C always returned 0 for a negative signal even for valid PIDs, and no processes were terminated. This has been fixed [ perl #121230 ].

=item *

The time taken to build perl on Windows has been reduced quite significantly (time savings in the region of 30-40% are typically seen) by reducing the number of, usually failing, I/O calls for each L<C<require()>|perlfunc/require> (for B<miniperl.exe> only).

L #121119 |https://rt.perl.org/Public/Bug/Display.html?id=121119> =item *

About 15 minutes of idle sleeping was removed from running C<make test> due to a bug in which the timeout monitor used for tests could not be cancelled once the test completes, and the full timeout period elapsed before running the next test file.

L #121395 |https://rt.perl.org/Public/Bug/Display.html?id=121395> =item *

On a perl built without pseudo-fork (pseudo-fork builds were not affected by this bug), killing a process tree with L<C<kill()>|perlfunc/kill> and a negative signal resulted in C<kill()> inverting the returned value. For example, if C<kill()> killed 1 process tree PID then it returned 0 instead of 1, and if C<kill()> was passed 2 invalid PIDs then it returned 2 instead of 0. This has probably been the case since the process tree kill feature was implemented on Win32. It has now been corrected to follow the documented behaviour.

L #121230 |https://rt.perl.org/Public/Bug/Display.html?id=121230> =item *

When building a 64-bit perl, an uninitialized memory read in B<miniperl.exe>, used during the build process, could lead to a 4GB B<wperl.exe> being created. This has now been fixed. (Note that B<perl.exe> itself was unaffected, but obviously B<wperl.exe> would have been completely broken.)