=encoding utf8

=head1 NAME

perldelta - what is new for perl v5.31.9

=head1 DESCRIPTION

This document describes differences between the 5.31.8 release and the 5.31.9
release.

If you are upgrading from an earlier release such as 5.31.7, first read
L<perl5318delta>, which describes differences between 5.31.7 and 5.31.8.

=head1 Core Enhancements

=head2 Unicode 13.0 (beta) is supported

Using the beta causes us to participate in the soak cycle for
Unicode.  Final approval for the existing changes has been made by the
Unicode consortium, and there are few possibilities that this could
break existing programs, as there are few changes to already existing
characters.

Information about the changes is at
L<https://unicode.org/versions/beta-13.0.0.html>.

=head2 New Unicode properties C<Identifier_Status> and C<Identifier_Type> supported

Unicode is in the process of revising its regular expression
requirements: L<https://www.unicode.org/draft/reports/tr18/tr18.html>.
As part of that they are wanting more properties to be exposed, ones
that aren't part of the strict UCD (Unicode character database).  These
two are used for examining inputs for security purposes.  Details on
their usage is at L<https://www.unicode.org/reports/tr39/proposed.html>.

=head2 It is now possible to write C<qr/\p{Name=...}/>, or C<\p{Na=...}>

The Unicode Name property is now accessible in regular expression
patterns using the above syntaxes, as an alternative to C<\N{...}>.
A comparison of the two methods is given in
L<perlunicode/Comparison of \N{...} and \p{name=...}>.

=head2 The C<POSIX::mblen()>, C<mbtowc>, and C<wctomb> functions now
work on shift state locales and are thread-safe on C99 and above
compilers when executed on a platform that has locale thread-safety; the
length parameters are now optional.

These functions are always executed under the current C language locale.
(See L<perllocale>.)  Most locales are stateless, but a few, notably the
very rarely encountered ISO 2022, maintain a state between calls to
these functions.  Previously the state was cleared on every call, but
now the state is not reset unless the appropriate parameter is C<undef>.

On threaded perls, the C99 functions L<mbrlen(3)>, L<mbrtowc(3)>, and
L<wcrtomb(3)>, when available, are substituted for the plain functions.
This makes these functions thread-safe when executing on a locale
thread-safe platform.

The string length parameters in C<mblen> and C<mbtowc> are now optional;
useful only if you wish to restrict the length parsed in the source
string to less than the actual length.

=head1 Incompatible Changes

=head2 Certain pattern matching features are now prohibited in compiling
Unicode property value wildcard subpatterns

These few features are either inappropriate or interfere with the
algorithm used to accomplish this task.  The complete list is in
L<perlunicode/Wildcards in Property Values>.

=head2 Stop pretending C<POSIX::mbstowcs> and C<POSIX::wcstombs> are
supported

These functions could never have worked due to a defective interface
specification.  There is clearly no demand for them, given that no one
has ever complained in the many years the functions were claimed to be
available, hence so-called "support" for them is now dropped.

=head2 A bug fix for C<(?[...])> may have caused some patterns to no
longer compile

See L</Selected Bug Fixes>.  The heuristics previously used may have let
some constructs compile (perhaps not with the programmer's intended
effect) that should have been errors.  None are known, but it is
possible that some erroneous constructs no longer compile.

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<Archive::Tar> has been upgraded from version 2.32 to 2.36.

=item *

L<B> has been upgraded from version 1.78 to 1.80.

=item *

L<charnames> has been upgraded from version 1.45 to 1.46.

=item *

L<Devel::PPPort> has been upgraded from version 3.56 to 3.57.

=item *

L<diagnostics> has been upgraded from version 1.36 to 1.37.

=item *

L<Encode> has been upgraded from version 3.02 to 3.03.

=item *

L<ExtUtils::CBuilder> has been upgraded from version 0.280233 to 0.280234.

=item *

L<feature> has been upgraded from version 1.57 to 1.58.

A new C<indirect> feature has been added, which is enabled by default
but allows turning off L<indirect object syntax|perlobj/Indirect
Object Syntax>.

=item *

L<IO> has been upgraded from version 1.42 to 1.43.

L<IO::Socket> no longer caches a zero protocol value, since this
indicates that the implementation will select a protocol.  This means
that on platforms that don't implement C<SO_PROTOCOL> for a given
socket type the protocol method may return C<undef>.

=item *

L<Module::CoreList> has been upgraded from version 5.20200120 to 5.20200220.

=item *

L<parent> has been upgraded from version 0.237 to 0.238.

=item *

L<perlfaq> has been upgraded from version 5.20191102 to 5.20200125.

=item *

L<Pod::Html> has been upgraded from version 1.24 to 1.25.

=item *

L<POSIX> has been upgraded from version 1.91 to 1.92.

=item *

L<Storable> has been upgraded from version 3.18 to 3.19.

Use of note() from Test::More is now optional in tests.  This works
around a circular dependency with Test::More when installing on very
old perls from CPAN.

=item *

L<threads> has been upgraded from version 2.23 to 2.24.

=item *

L<Tie::File> has been upgraded from version 1.03 to 1.06.

=item *

L<XS::APItest> has been upgraded from version 1.06 to 1.07.

=back

=head1 Documentation

=head2 Changes to Existing Documentation

Additionally, the following selected changes have been made:

=over 4

=item *

Links to the now defunct L<https://search.cpan.org> site now point at
the equivalent L<https://metacpan.org> URL.  [GH #17393]

=item *

The man page for L<ExtUtils::XSSymSet> is now only installed on VMS,
which is the only platform the module is installed on.  [GH #17424]

=back

=head1 Diagnostics

The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages.  For the complete list of
diagnostic messages, see L<perldiag>.

=head2 New Diagnostics

=head3 New Errors

=over 4

=item *

L<Expecting interpolated extended charclass in regex; marked by <-- HERE in mE<sol>%sE<sol>
|perldiag/"Expecting interpolated extended charclass in regex; marked by <-- HERE in mE<sol>%sE<sol>">

This is a replacement for several error messages listed under
L</Changes to Existing Diagnostics>.

=back

=head3 New Warnings

=over 4

=item *

L<Code point 0x%X is not Unicode, and not portable|perldiag/"Code point 0x%X is not Unicode, and not portable">

This is actually not a new message, but it is now output when the
warnings category C<portable> is enabled.

When raised during regular expression pattern compilation, the warning
has extra text added at the end marking where precisely in the pattern
it occured.

=item *

L<Non-hex character '%c' terminates \x early.  Resolved as "%s"|perldiag/"Non-hex character '%c' terminates \x early.  Resolved as "%s"">

This replaces a warning that was much less specific, and which gave
false information.  This new warning parallels the similar
already-existing one raised for C<\o{}>.

=back

=head2 Changes to Existing Diagnostics

=over 4

=item *

L<Character following "\c" must be printable ASCII|perldiag/"Character following "\c" must be printable ASCII">

now has extra text added at the end, when raised during regular
expression pattern compilation, marking where precisely in the pattern
it occured.

=item *

L<Use "%s" instead of "%s"|perldiag/"Use "%s" instead of "%s"">

now has extra text added at the end, when raised during regular
expression pattern compilation, marking where precisely in the pattern
it occured.

=item *

L<Sequence "\c{" invalid|perldiag/"Sequence "\c{" invalid">

now has extra text added at the end, when raised during regular
expression pattern compilation, marking where precisely in the pattern
it occured.

=item *

L<"\c%c" is more clearly written simply as "%s"|perldiag/""\c%c" is more clearly written simply as "%s"">

now has extra text added at the end, when raised during regular
expression pattern compilation, marking where precisely in the pattern
it occured.

=item *

L<Non-octal character '%c' terminates \o early.  Resolved as "%s"|perldiag/"Non-octal character '%c' terminates \o early.  Resolved as "%s"">

now includes the phrase "terminates \o early", and has extra text added
at the end, when raised during regular expression pattern compilation,
marking where precisely in the pattern it occured.  In some instances
the text of the resolution has been clarified.

=item *

L<'%s' resolved to '\o{%s}%d'|perldiag/'%s' resolved to '\o{%s}%d'>

As of Perl 5.32, this message is no longer generated.  Instead,
L<perldiag/Non-octal character '%c' terminates \o early.  Resolved as "%s">
is.

=item *


L<Use of code point 0x%s is not allowed; the permissible max is 0x%X|perldiag/"Use of code point 0x%s is not allowed; the permissible max is 0x%X">

Some instances of this message previously output the hex digits C<A>,
C<B>, C<C>, C<D>, C<E>, and C<F> in lower case.  Now they are all
consistently upper case.

=item *

The following three diagnostics have been removed, and replaced by
L<C<Expecting interpolated extended charclass in regex; marked by <-- HERE in mE<sol>%sE<sol>>
|perldiag/"Expecting interpolated extended charclass in regex; marked by <-- HERE in mE<sol>%sE<sol>">.
C<Expecting close paren for nested extended charclass in regex; marked
by <-- HERE in mE<sol>%sE<sol>>,
C<Expecting close paren for wrapper for nested extended charclass in
regex; marked by <-- HERE in mE<sol>%sE<sol>>,
and
C<Expecting '(?flags:(?[...' in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>>.

=back

=head1 Testing

Tests were added and changed to reflect the other additions and
changes in this release.  Furthermore, these significant changes were
made:

=over 4

=item *

F<t/run/switches.t> no longer uses (and re-uses) the F<tmpinplace/>
directory under F<t/>.  This may prevent spurious failures. [GH #17424]

=item *

Various bugs in C<POSIX::mbtowc> were fixed.   Potential races with
other threads are now avoided, and previously the returned wide
character could well be garbage.

=item *

Various bugs in C<POSIX::wctomb> were fixed. Potential races with other
threads are now avoided, and previously it would segfault if the string
parameter was shared or hadn't been pre-allocated with a string of
sufficient length to hold the result.

=back

=head1 Platform Support

=head2 Platform-Specific Notes

=over 4

=item VMS

With the release of the patch kit C99 V2.0, VSI has provided support for a
number of previously-missing C99 features.  On systems with that patch kit
installed, Perl's configuration process will now detect the presence of the
header C<stdint.h> and the following functions: C<fpclassify>, C<isblank>, C<isless>,
C<llrint>, C<llrintl>, C<llround>, C<llroundl>, C<nearbyint>, C<round>, C<scalbn>,
and C<scalbnl>.

=back

=head1 Selected Bug Fixes

=over 4

=item *

Previously L<perlfunc/require> would only treat the special built-in
SV C<&PL_sv_undef> as a value in C<%INC> as if a previous C<require>
has failed, treating other undefined SVs as if the previous C<require>
has succeeded.  This could cause unexpected success from C<require>
eg. on C<local %INC = %INC;>.  This has been fixed [GH #17428]

=item *

C<(?{...})> eval groups in regular expressions no longer unintentionally
trigger "EVAL without pos change exceeded limit in regex" [GH #17490].

=item *

C<(?[...])> extended bracketed character classes do not wrongly raise an
error on some cases where a previously-compiled such class is
interpolated into another.  The heuristics previously used have been
replaced by a reliable method, and hence the diagnostics generated have
changed.  See L</Diagnostics>.

=item *
The debug display (say by specifying C<-Dr> or S<C<use re>> (with
appropriate options) of compiled Unicode propery wildcard subpatterns no
longer has extraneous output.

=back

=head1 Acknowledgements

Perl 5.31.9 represents approximately 4 weeks of development since Perl
5.31.8 and contains approximately 82,000 lines of changes across 390 files
from 25 authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 61,000 lines of changes to 160 .pm, .t, .c and .h files.

Perl continues to flourish into its fourth decade thanks to a vibrant
community of users and developers. The following people are known to have
contributed the improvements that became Perl 5.31.9:

Alberto Simões, Andrew Fresh, Chris 'BinGOs' Williams, Craig A. Berry,
Dagfinn Ilmari Mannsåker, Dan Book, David Mitchell, E. Choroba, H.Merijn
Brand, Hugo van der Sanden, James E Keenan, Karen Etheridge, Karl
Williamson, Leon Timmermans, Marc Green, Matthew Horsfall, Paul Johnson,
Petr Písař, Richard Leach, Steve Hay, Todd Rinaldo, Tomasz Konojacki, Tony
Cook, Unicode Consortium, Yves Orton.

The list above is almost certainly incomplete as it is automatically
generated from version control history. In particular, it does not include
the names of the (very much appreciated) contributors who reported issues to
the Perl bug tracker.

Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please
see the F<AUTHORS> file in the Perl source distribution.

=head1 Reporting Bugs

If you find what you think is a bug, you might check the perl bug database
at L<https://github.com/Perl/perl5/issues>.  There may also be information at
L<http://www.perl.org/>, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>.  Be sure to trim your bug down to a
tiny but sufficient test case.

If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.

=head1 Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:

    perlthanks

This will send an email to the Perl 5 Porters list with your show of thanks.

=head1 SEE ALSO

The F<Changes> file for an explanation of how to view exhaustive details on
what changed.

The F<INSTALL> file for how to build Perl.

The F<README> file for general stuff.

The F<Artistic> and F<Copying> files for copyright information.

=cut
