=encoding utf8
=head1 NAME
perl5300delta - what is new for perl v5.30.0
=head1 DESCRIPTION
This document describes differences between the 5.28.0 release and the 5.30.0
release.
If you are upgrading from an earlier release such as 5.26.0, first read
L, which describes differences between 5.26.0 and 5.28.0.
=head1 Notice
sv_utf8_(downgrade|decode) are no longer marked as experimental.
L<[perl #133788]|https://rt.perl.org/Ticket/Display.html?id=133788>.
=head1 Core Enhancements
=head2 Limited variable length lookbehind in regular expression pattern matching is now experimentally supported
Using a lookbehind assertion (like C<(?<=foo?)> or C<(? previously
would generate an error and refuse to compile. Now it compiles (if the
maximum lookbehind is at most 255 characters), but raises a warning in
the new C warnings category. This is to caution you
that the precise behavior is subject to change based on feedback from
use in the field.
See L and L.
=head2 The upper limit C<"n"> specifiable in a regular expression quantifier of the form C<"{m,n}"> has been doubled to 65534
The meaning of an unbounded upper quantifier C<"{m,}"> remains unchanged.
It matches 2**31 - 1 times on most platforms, and more on ones where a C
language short variable is more than 4 bytes long.
=head2 Unicode 12.1 is supported
Because of a change in Unicode release cycles, Perl jumps from Unicode
10.0 in Perl 5.28 to Unicode 12.1 in Perl 5.30.
For details on the Unicode changes, see
L for 11.0;
L for 12.0;
and
L for 12.1.
(Unicode 12.1 differs from 12.0 only in the addition of a single
character, that for the new Japanese era name.)
The Word_Break property, as in past Perl releases, remains tailored to
behave more in line with expectations of Perl users. This means that
sequential runs of horizontal white space characters are not broken
apart, but kept as a single run. Unicode 11 changed from past versions
to be more in line with Perl, but it left several white space characters
as causing breaks: TAB, NO BREAK SPACE, and FIGURE SPACE (U+2007). We
have decided to continue to use the previous Perl tailoring with regards
to these.
=head2 Wildcards in Unicode property value specifications are now partially supported
You can now do something like this in a regular expression pattern
qr! \p{nv= /(?x) \A [0-5] \z / }!
which matches all Unicode code points whose numeric value is
between 0 and 5 inclusive. So, it could match the Thai or Bengali
digits whose numeric values are 0, 1, 2, 3, 4, or 5.
This marks another step in implementing the regular expression features
the Unicode Consortium suggests.
Most properties are supported, with the remainder planned for 5.32.
Details are in L.
=head2 qr'\N{name}' is now supported
Previously it was an error to evaluate a named character C<\N{...}>
within a single quoted regular expression pattern (whose evaluation is
deferred from the normal place). This restriction is now removed.
=head2 Turkic UTF-8 locales are now seamlessly supported
Turkic languages have different casing rules than other languages for
the characters C<"i"> and C<"I">. The uppercase of C<"i"> is LATIN
CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of C<"I"> is LATIN
SMALL LETTER DOTLESS I (U+0131). Unicode furnishes alternate casing
rules for use with Turkic languages. Previously, Perl ignored these,
but now, it uses them when it detects that it is operating under a
Turkic UTF-8 locale.
=head2 It is now possible to compile perl to always use thread-safe locale operations.
Previously, these calls were only used when the perl was compiled to be
multi-threaded. To always enable them, add
-Accflags='-DUSE_THREAD_SAFE_LOCALE'
to your F flags.
=head2 Eliminate opASSIGN macro usage from core
This macro is still defined but no longer used in core
=head2 C<-Drv> now means something on C<-DDEBUGGING> builds
Now, adding the verbose flag (C<-Dv>) to the C<-Dr> flag turns on all
possible regular expression debugging.
=head1 Incompatible Changes
=head2 Assigning non-zero to C<$[> is fatal
Setting L<< C<$[>|perlvar/$[ >> to a non-zero value has been deprecated since
Perl 5.12 and now throws a fatal error.
See L<<< perldeprecation/Assigning non-zero to C<< $[ >> is fatal >>>.
=head2 Delimiters must now be graphemes
See L
=head2 Some formerly deprecated uses of an unescaped left brace C<"{"> in
regular expression patterns are now illegal
But to avoid breaking code unnecessarily, most instances that issued a
deprecation warning, remain legal and now have a non-deprecation warning
raised. See L.
=head2 Previously deprecated sysread()/syswrite() on :utf8 handles is now fatal
Calling sysread(), syswrite(), send() or recv() on a C<:utf8> handle,
whether applied explicitly or implicitly, is now fatal. This was
deprecated in perl 5.24.
There were two problems with calling these functions on C<:utf8>
handles:
=over
=item *
All four functions only paid attention to the C<:utf8> flag. Other
layers were completely ignored, so a handle with
C<:encoding(UTF-16LE)> layer would be treated as UTF-8. Other layers,
such as compression are completely ignored with or without the
C<:utf8> flag.
=item *
sysread() and recv() would read from the handle, skipping any
validation by the layers, and do no validation of their own. This
could lead to invalidly encoded perl scalars.
=back
L<[perl #125760]|https://rt.perl.org/Ticket/Display.html?id=125760>.
=head2 my() in false conditional prohibited
Declarations such as C are no longer permitted.
L<[perl #133543]|https://rt.perl.org/Ticket/Display.html?id=133543>.
=head2 Fatalize $* and $#
These special variables, long deprecated, now throw exceptions when used.
L<[perl #133583]|https://rt.perl.org/Ticket/Display.html?id=133583>.
=head2 Fatalize unqualified use of dump()
The C function, long discouraged, may no longer be used unless it is
fully qualified, I, C.
L<[perl #133584]|https://rt.perl.org/Ticket/Display.html?id=133584>.
=head2 Remove File::Glob::glob()
The C function, long deprecated, has been removed and now
throws an exception which advises use of C instead.
L<[perl #133586]|https://rt.perl.org/Ticket/Display.html?id=133586>.
=head2 C no longer can return malformed UTF-8
It croaks if it would otherwise return a UTF-8 string that contains
malformed UTF-8. This protects against potential security threats. This
is considered a bug fix as well.
L<[perl #131642]|https://rt.perl.org/Ticket/Display.html?id=131642>.
=head2 Any set of digits in the Common script are legal in a script run of another script
There are several sets of digits in the Common script. C<[0-9]> is the
most familiar. But there are also C<[\x{FF10}-\x{FF19}]> (FULLWIDTH
DIGIT ZERO - FULLWIDTH DIGIT NINE), and several sets for use in
mathematical notation, such as the MATHEMATICAL DOUBLE-STRUCK DIGITs.
Any of these sets should be able to appear in script runs of, say,
Greek. But the design of 5.30 overlooked all but the ASCII digits
C<[0-9]>, so the design was flawed. This has been fixed, so is both a
bug fix and an incompatibility.
L<[perl #133547]|https://rt.perl.org/Ticket/Display.html?id=133547>.
All digits in a run still have to come from the same set of ten digits.
=head2 JSON::PP enables allow_nonref by default
As JSON::XS 4.0 changed its policy and enabled allow_nonref
by default, JSON::PP also enabled allow_nonref by default.
=head1 Deprecations
=head2 In XS code, use of various macros dealing with UTF-8.
This deprecation was scheduled to become fatal in 5.30, but has been
delayed to 5.32 due to problems that showed up with some CPAN modules.
For details of what's affected, see L.
=head1 Performance Enhancements
=over 4
=item *
Translating from UTF-8 into the code point it represents now is done via a
deterministic finite automaton, speeding it up. As a typical example,
C now requires 12% fewer instructions than before. The
performance of checking that a sequence of bytes is valid UTF-8 is similarly
improved, again by using a DFA.
=item *
Eliminate recursion from finalize_op().
L<[perl #108276]|https://rt.perl.org/Ticket/Display.html?id=108276>.
=item *
A handful of small optimizations related to character folding
and character classes in regular expressions.
=item *
Optimization of C to C conversions.
L<[perl #133677]|https://rt.perl.org/Ticket/Display.html?id=133677>.
=item *
Speed up of the integer stringification algorithm by processing
two digits at a time instead of one.
L<[perl #133691]|https://rt.perl.org/Ticket/Display.html?id=133691>.
=item *
Improvements based on LGTM analysis and recommendation.
(L).
L<[perl #133686]|https://rt.perl.org/Ticket/Display.html?id=133686>.
L<[perl #133699]|https://rt.perl.org/Ticket/Display.html?id=133699>.
=item *
Code optimizations in F, F, F.
=item *
Regular expression pattern matching of things like C]/> is
significantly sped up, where I is any ASCII character. Other classes
can get this speed up, but which ones is complicated and depends on the
underlying bit patterns of those characters, so differs between ASCII
and EBCDIC platforms, but all case pairs, like C are included,
as is C<[^01]>.
=back
=head1 Modules and Pragmata
=head2 Updated Modules and Pragmata
=over 4
=item *
L has been upgraded from version 2.30 to 2.32.
=item *
L has been upgraded from version 1.74 to 1.76.
=item *
L has been upgraded from version 1.003 to 1.004.
=item *
L has been upgraded from version 1.48 to 1.49.
=item *
L has been upgraded from version 0.49 to 0.51.
=item *
L has been upgraded from version 1.06 to 1.07.
=item *
L has been upgraded from version 1.38 to 1.50
=item *
L has been upgraded from version 2.074 to 2.084.
=item *
L has been upgraded from version 2.076 to 2.084.
=item *
L has been upgraded from version 0.02 to 0.03.
=item *
L. has been upgraded from version 0.29 to 0.32. This was due
to a new configuration variable that has influence on binary compatibility:
C.
=item *
L has been upgraded from version 2.20 to 2.22.
=item *
L has been upgraded from version 2.170 to 2.174
L now avoids leaking when Cing.
=item *
L has been upgraded from version 1.840 to 1.843.
=item *
L has been upgraded from version 0.03 to 0.04.
=item *
L has been upgraded from version 1.27 to 1.28.
=item *
L has been upgraded from version 3.40 to 3.52.
=item *
L has been upgraded from version 6.01 to 6.02.
=item *
L has been upgraded from version 2.97 to 3.01.
=item *
L has been upgraded from version 1.29 to 1.30.
=item *
L has been upgraded from version 0.019 to 0.020.
=item *
L has been upgraded from version 0.280230 to 0.280231.
=item *
L has been upgraded from version 1.70 to 1.72.
=item *
L has been upgraded from version 1.08 to 1.09.
=item *
L has been upgraded from version 3.39 to 3.40.
C parameters are no longer incorrectly included in the
automatically generated function prototype.
L<[perl #133654]|https://rt.perl.org/Ticket/Display.html?id=133654>.
=item *
L has been upgraded from version 1.52 to 1.54.
=item *
L has been upgraded from version 2.33 to 2.34.
=item *
L has been upgraded from version 1.34 to 1.36.
C<$File::Find::dont_use_nlink> now defaults to 1 on all
platforms.
L<[perl #133673]|https://rt.perl.org/Ticket/Display.html?id=133673>.
Variables C<< $Is_Win32 >> and C<< $Is_VMS >> are being initialized.
=item *
L has been upgraded from version 1.31 to 1.32.
=item *
L has been upgraded from version 2.15 to 2.16.
=item *
L has been upgraded from version 3.74 to 3.78.
Silence L warning on Android builds if C is not defined.
=item *
L has been upgraded from version 0.2304 to 0.2309.
=item *
L has been upgraded from version 1.58 to 1.59.
=item *
L has been upgraded from version 1.17 to 1.18.
=item *
L has been upgraded from version 0.070 to 0.076.
=item *
L has been upgraded from version 0.17 to 0.18.
=item *
L has been upgraded from version 1.39 to 1.40.
=item *
IO-Compress has been upgraded from version 2.074 to 2.084.
Adds support for C<< IO::Uncompress::Zstd >> and
C<< IO::Uncompress::UnLzip >>.
The C<< BinModeIn >> and C<< BinModeOut >> options are now no-ops.
ALL files will be read/written in binmode.
=item *
L has been upgraded from version 1.00 to 1.02.
=item *
L has been upgraded from version 2.97001 to 4.02.
L as JSON::XS 4.0 enables C by default.
=item *
L has been upgraded from version 0.64 to 0.65.
=item *
L has been upgraded from version 3.56 to 3.57.
=item *
L has been upgraded from version 1.999811 to 1.999816.
C<< bnok() >> now supports the full Kronenburg extension.
L<[cpan #95628]|https://rt.cpan.org/Ticket/Display.html?id=95628>.
=item *
L has been upgraded from version 0.5006 to 0.5008.
=item *
L has been upgraded from version 0.2613 to 0.2614.
=item *
L has been upgraded from version 5.20180622 to 5.20190520.
Changes to B::Op_private and Config
=item *
L has been upgraded from version 0.32 to 0.34.
=item *
L has been upgraded from version 1.000033 to 1.000036.
Properly clean up temporary directories after testing.
=item *
L has been upgraded from version 1.14 to 1.15.
=item *
L has been upgraded from version 2.62 to 2.71.
=item *
L has been upgraded from version 1.15 to 1.16.
=item *
PathTools has been upgraded from version 3.74 to 3.78.
=item *
L has been upgraded from version 0.236 to 0.237.
=item *
L has been upgraded from version 1.54 to 1.55.
Debugging threaded code no longer deadlocks in C nor
C.
=item *
L has been upgraded from version 5.021011 to 5.20190126.
=item *
L has been upgraded from version 0.26 to 0.27.
Warnings enabled by setting the C flag in
C<$PerlIO::encoding::fallback> are now only produced if warnings are
enabled with C