=head1 NAME
-[ this is a template for a new perldelta file. Any text flagged as XXX needs
-to be processed before release. ]
-
perldelta - what is new for perl v5.21.1
=head1 DESCRIPTION
=head1 Notice
-XXX Any important notices here
+This release removes a number of previously deprecated constructs, many
+that have been around for a long time. Please see L</"Incompatible Changes">
+for more information.
=head1 Core Enhancements
-XXX New core language features go here. Summarize user-visible core language
-enhancements. Particularly prominent performance optimisations could go
-here, but most should go in the L</Performance Enhancements> section.
+=head2 Unicode 7.0 is now supported
-[ List each enhancement as a =head2 entry ]
+For details on what is in this release, see
+L<http://www.unicode.org/versions/Unicode7.0.0/>.
=head2 Experimental C Backtrace API
a subset of locale categories to be locale-aware, with the remaining
ones unaffected. See L<perllocale/The "use locale" pragma> for details.
-=head1 Security
-
-XXX Any security-related notices go here. In particular, any security
-vulnerabilities closed should be noted here rather than in the
-L</Selected Bug Fixes> section.
-
-[ List each security issue as a =head2 entry ]
-
=head1 Incompatible Changes
-XXX For a release on a stable branch, this section aspires to be:
-
- There are no changes intentionally incompatible with 5.XXX.XXX
- If any exist, they are bugs, and we request that you submit a
- report. See L</Reporting Bugs> below.
-
=head2 C<\N{}> with a sequence of multiple spaces is now a fatal error.
This has been deprecated since v5.18.
'bytes' pragma causes the UTF-8 flag to not be set, just as in previous
Perl releases. This resolves [perl #112208].
-=head1 Deprecations
+=head2 Support for C<?PATTERN?> without explicit operator has been removed
-XXX Any deprecated features, syntax, modules etc. should be listed here.
+Starting regular expressions matching only once directly with the
+question mark delimiter is now a syntax error, so that the question mark
+can be available for use in new operators. Write C<m?PATTERN?> instead,
+explicitly using the C<m> operator: the question mark delimiter still
+invokes match-once behaviour.
-=head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now
-deprecated
+=head2 C<defined(@array)> and C<defined(%hash)> are now fatal errors
-This non-graphic character is essentially indistinguishable from a
-regular space, and so should not be allowed. See
-L<charnames/CUSTOM ALIASES>.
-
-=head2 Module removals
-
-XXX Remove this section if inapplicable.
+These have been deprecated since v5.6.1 and have raised deprecation
+warnings since v5.16.
-The following modules will be removed from the core distribution in a
-future release, and will at that time need to be installed from CPAN.
-Distributions on CPAN which require these modules will need to list them as
-prerequisites.
+=head2 Using a hash or an array as a reference are now fatal errors.
-The core versions of these modules will now issue C<"deprecated">-category
-warnings to alert you to this fact. To silence these deprecation warnings,
-install the modules in question from CPAN.
+For example, C<%foo-E<gt>{"bar"}> now causes a fatal compilation
+error. These have been deprecated since before v5.8, and have raised
+deprecation warnings since then.
-Note that these are (with rare exceptions) fine modules that you are encouraged
-to continue to use. Their disinclusion from core primarily hinges on their
-necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
-not usually on concerns over their design.
-
-=over
+=head1 Deprecations
-=item XXX
+=head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now
+deprecated
-XXX Note that deprecated modules should be listed here even if they are listed
-as an updated module in the L</Modules and Pragmata> section.
+This non-graphic character is essentially indistinguishable from a
+regular space, and so should not be allowed. See
+L<charnames/CUSTOM ALIASES>.
-=back
+=head2 A literal C<"{"> should now be escaped in a pattern
-[ List each other deprecation as a =head2 entry ]
+If you want a literal left curly bracket (also called a left brace) in a
+regular expression pattern, you should now escape it by either
+preceding it with a backslash (C<"\{">) or enclosing it within square
+brackets C<"[{]">, or by using C<\Q>; otherwise a deprecation warning
+will be raised. This was first announced as forthcoming in the v5.16
+release; it will allow future extensions to the language to happen.
=head1 Performance Enhancements
-XXX Changes which enhance performance without changing behaviour go here.
-There may well be none in a stable release.
-
-[ List each enhancement as a =item entry ]
-
=over 4
=item *
=head1 Documentation
-XXX Changes to files in F<pod/> go here. Consider grouping entries by
-file and be sure to link to the appropriate page, e.g. L<perlfunc>.
-
-=head2 New Documentation
-
-XXX Changes which create B<new> files in F<pod/> go here.
-
-=head3 L<XXX>
-
-XXX Description of the purpose of the new file here
-
=head2 Changes to Existing Documentation
-XXX Changes which significantly change existing files in F<pod/> go here.
-However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
-section.
-
=head3 L<perlfunc>
=over 4
L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
+=item *
+
+Note that C<exec LIST> and C<system LIST> may fall back to the shell on
+Win32. Only C<exec PROGRAM LIST> and C<system PROGRAM LIST> indirect object
+syntax will reliably avoid using the shell.
+
+This has also been noted in L<perlport>.
+
+L<[perl #122046]|https://rt.perl.org/Ticket/Display.html?id=122046>
+
=back
=head3 L<perlapi>
=item *
+Note that C<SvSetSV> doesn't do set magic.
+
+=item *
+
C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
C<malloc>.
including warnings and fatal error messages. For the complete list of
diagnostic messages, see L<perldiag>.
-XXX New or changed warnings emitted by the core's C<C> code go here. Also
-include any changes in L<perldiag> that reconcile it to the C<C> code.
-
=head2 New Diagnostics
-XXX Newly added diagnostic messages go under here, separated into New Errors
-and New Warnings
-
=head3 New Errors
=over 4
=item *
-XXX L<message|perldiag/"message">
+L<In '(?...)', the '(' and '?' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(?...)', the '(' and '?' must be adjacent in regex; marked by <-- HERE in m/%s/">
+
+(F) The two-character sequence C<"(?"> in
+this context in a regular expression pattern should be an
+indivisible token, with nothing intervening between the C<"(">
+and the C<"?">, but you separated them.
+
+=item *
+
+L<In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <-- HERE in m/%s/">
+
+(F) The two-character sequence C<"(*"> in
+this context in a regular expression pattern should be an
+indivisible token, with nothing intervening between the C<"(">
+and the C<"*">, but you separated them.
+
+=item *
+
+L<charnames alias definitions may not contain a sequence of multiple spaces|perldiag/"charnames alias definitions may not contain a sequence of multiple spaces">
+
+(F) You defined a character name which had multiple space
+ characters in a row. Change them to single spaces. Usually these
+ names are defined in the C<:alias> import argument to C<use charnames>, but
+ they could be defined by a translator installed into C<$^H{charnames}>.
+ See L<charnames/CUSTOM ALIASES>.
+
+=item *
+
+L<charnames alias definitions may not contain trailing white-space|perldiag/"charnames alias definitions may not contain trailing white-space">
+
+(F) You defined a character name which ended in a space
+character. Remove the trailing space(s). Usually these names are
+defined in the C<:alias> import argument to C<use charnames>, but they
+could be defined by a translator installed into C<$^H{charnames}>.
+See L<charnames/CUSTOM ALIASES>.
+
+=item *
+
+L<Can't use a hash as a reference|perldiag/"Can't use a hash as a reference">
+
+(F) You tried to use a hash as a reference, as in
+C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>. Versions of perl <= 5.6.1
+used to allow this syntax, but shouldn't have.
+
+=item *
+
+L<Can't use an array as a reference|perldiag/"Can't use an array as a reference">
+
+(F) You tried to use an array as a reference, as in
+C<< @foo->[23] >> or C<< @$ref->[99] >>. Versions of perl <= 5.6.1 used to
+allow this syntax, but shouldn't have.
+
+=item *
+
+L<Can't use 'defined(@array)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(@array)' (Maybe you should just omit the defined()?)">
+
+(F) defined() is not useful on arrays because it
+checks for an undefined I<scalar> value. If you want to see if the
+array is empty, just use C<if (@array) { # not empty }> for example.
+
+=item *
+
+L<Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)|perldiag/"Can't use 'defined(%hash)' (Maybe you should just omit the defined()?)">
+
+(F) C<defined()> is not usually right on hashes.
+
+Although C<defined %hash> is false on a plain not-yet-used hash, it
+becomes true in several non-obvious circumstances, including iterators,
+weak references, stash names, even remaining true after C<undef %hash>.
+These things make C<defined %hash> fairly useless in practice, so it now
+generates a fatal error.
+
+If a check for non-empty is what you wanted then just put it in boolean
+context (see L<perldata/Scalar values>):
+
+ if (%hash) {
+ # not empty
+ }
+
+If you had C<defined %Foo::Bar::QUUX> to check whether such a package
+variable exists then that's never really been reliable, and isn't
+a good way to enquire about the features of a package, or whether
+it's loaded, etc.
+
+=item *
+
+L<Illegal suidscript|perldiag/"Illegal suidscript">
+
+(F) The script run under suidperl was somehow illegal.
=back
=item *
+L<Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%s/">
+
+(D deprecated, regexp) You used a literal C<"{"> character in a regular
+expression pattern. You should change to use C<"\{"> instead, because a future
+version of Perl (tentatively v5.26) will consider this to be a syntax error. If
+the pattern delimiters are also braces, any matching right brace
+(C<"}">) should also be escaped to avoid confusing the parser, for
+example,
+
+ qr{abc\{def\}ghi}
+
+=item *
+
+L<NO-BREAK SPACE in a charnames alias definition is deprecated|perldiag/"NO-BREAK SPACE in a charnames alias definition is deprecated">
+
+(D deprecated) You defined a character name which contained a no-break
+space character. Change it to a regular space. Usually these names are
+defined in the C<:alias> import argument to C<use charnames>, but they
+could be defined by a translator installed into C<$^H{charnames}>. See
+L<charnames/CUSTOM ALIASES>.
+
+=item *
+
+L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">
+
+(S experimental::win32_perlio) The C<:win32> PerlIO layer is
+experimental. If you want to take the risk of using this layer,
+simply disable this warning:
+
+ no warnings "experimental::win32_perlio";
+
+=item *
+
+L<Negative repeat count does nothing|perldiag/"Negative repeat count does nothing">
+
+(W numeric) You tried to execute the
+L<C<x>|perlop/Multiplicative Operators> repetition operator fewer than 0
+times, which doesn't make sense.
+
+=item *
+
+L<localtime(%f) failed|perldiag/"localtime(%f) failed">
+
+(W overflow) You called C<localtime> with a number that it could not handle:
+too large, too small, or NaN. The returned value is C<undef>.
+
+=item *
+
+L<gmtime(%f) failed|perldiag/"gmtime(%f) failed">
+
+(W overflow) You called C<gmtime> with a number that it could not handle:
+too large, too small, or NaN. The returned value is C<undef>.
+
+=item *
+
L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">:
(S experimental::win32_perlio) The C<:win32> PerlIO layer is
no warnings "experimental::win32_perlio";
+=item *
+
+L<Negative repeat count does nothing|perldiag/Negative repeat count does nothing>
+
+(W numeric) This warns when the repeat count of the
+L<C<x>|perlop/Multiplicative Operators> repetition operator is
+negative.
+
+This warning may be changed or removed if it turn out that it was
+unwise to have added it.
+
=back
=head2 Changes to Existing Diagnostics
-XXX Changes (i.e. rewording) of diagnostic messages go here
-
=over 4
=item *
+L<Variable length lookbehind not implemented in regex mE<sol>%sE<sol>|perldiag/"Variable length lookbehind not implemented in regex m/%s/">
+
+Information about Unicode behaviour has been added.
+
+=item *
+
<> should be quotes
This warning has been changed to
=head1 Utility Changes
-XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
-Most of these are built within the directory F<utils>.
-
-[ List utility changes as a =head2 entry for each utility and =item
-entries for each change
-Use L<XXX> with program names to get proper documentation linking. ]
-
=head2 F<x2p/>
=over 4
=head1 Configuration and Compilation
-XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
-go here. Any other changes to the Perl build process should be listed here.
-However, any platform-specific changes should be listed in the
-L</Platform Support> section, instead.
-
-[ List changes as a =item entry ].
-
=over 4
=item *
L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
-=back
-
-=head1 Testing
-
-XXX Any significant changes to the testing of a freshly built perl should be
-listed here. Changes which create B<new> files in F<t/> go here as do any
-large changes to the testing harness (e.g. when parallel testing was added).
-Changes to existing files in F<t/> aren't worth summarizing, although the bugs
-that they represent may be covered elsewhere.
-
-[ List each test improvement as a =item entry ]
+=item *
-=over 4
+The MAD (Misc Attribute Decoration) build option has been removed
-=item *
+This was an unmaintained attempt at preserving
+the Perl parse tree more faithfully so that automatic conversion of
+Perl 5 to Perl 6 would have been easier.
-XXX
+This build-time configuration option had been unmaintained for years,
+and had probably seriously diverged on both Perl 5 and Perl 6 sides.
=back
=head1 Platform Support
-XXX Any changes to platform support should be listed in the sections below.
-
-[ Within the sections, list each platform as a =item entry with specific
-changes as paragraphs below it. ]
-
-=head2 New Platforms
-
-XXX List any platforms that this version of perl compiles on, that previous
-versions did not. These will either be enabled by new files in the F<hints/>
-directories, or new subdirectories and F<README> files at the top level of the
-source tree.
-
-=over 4
-
-=item XXX-some-platform
-
-XXX
-
-=back
-
=head2 Discontinued Platforms
-XXX List any platforms that this version of perl no longer compiles on.
-
=over 4
=item NeXTSTEP/OPENSTEP
=head2 Platform-Specific Notes
-XXX List any changes for specific platforms. This could include configuration
-and compilation changes or changes in portability/compatibility. However,
-changes within modules for platforms should generally be listed in the
-L</Modules and Pragmata> section.
-
=over 4
-=item XXX-some-platform
+=item OpenBSD
-XXX
+On OpenBSD, Perl will now default to using the system C<malloc> due to the
+security features it provides. Perl's own malloc wrapper has been in use
+since v5.14 due to performance reasons, but the OpenBSD project believes
+the tradeoff is worth it and would prefer that users who need the speed
+specifically ask for it.
+
+L<[perl #122000]|https://rt.perl.org/Ticket/Display.html?id=122000>.
=back
=head1 Internal Changes
-XXX Changes which affect the interface available to C<XS> code go here. Other
-significant internal changes for future core maintainers should be noted as
-well.
-
=over 4
=item *
developing v5.21. Send email to L<mailto:perl5-porters@perl.org> for
guidance.
-=back
+=item *
-=head1 Selected Bug Fixes
+A new macro L<C<isUTF8_CHAR>|perlapi/isUTF8_CHAR> has been written which
+efficiently determines if the string given by its parameters begins
+with a well-formed UTF-8 encoded character.
-XXX Important bug fixes in the core language are summarized here. Bug fixes in
-files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
+=back
-[ List each fix as a =item entry ]
+=head1 Selected Bug Fixes
=over 4
Many issues have been detected by L<Coverity|http://www.coverity.com/> and
fixed.
-=back
-
-=head1 Known Problems
-
-XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
-tests that had to be C<TODO>ed for the release would be noted here. Unfixed
-platform specific bugs also go here.
-
-[ List each fix as a =item entry ]
-
-=over 4
-
=item *
-XXX
-
-=back
-
-=head1 Errata From Previous Releases
+system() and friends should now work properly on more Android builds.
-=over 4
+Due to an oversight, the value specified through -Dtargetsh to Configure
+would end up being ignored by some of the build process. This caused perls
+cross-compiled for Android to end up with defective versions of system(),
+exec() and backticks: the commands would end up looking for C</bin/sh>
+instead of C</system/bin/sh>, and so would fail for the vast majority
+of devices, leaving C<$!> as C<ENOENT>.
=item *
-XXX Add anything here that we forgot to add, or were mistaken about, in
-the perldelta of a previous release.
+C<qr(...\(...\)...)>,
+C<qr[...\[...\]...]>,
+and
+C<qr{...\{...\}...}>
+now work. Previously it was impossible to escape these three
+left-characters with a backslash within a regular expression pattern
+where otherwise they would be considered metacharacters, and the pattern
+opening delimiter was the character, and the closing delimiter was its
+mirror character.
=back
-=head1 Obituary
-
-XXX If any significant core contributor has died, we've added a short obituary
-here.
-
=head1 Acknowledgements
XXX Generate this with: