PERL5300DELTA(1)
π NAME π
okay bestie, this is PERL5300DELTA(1) from the Perl Programmers Reference Guide, and the name is perl5300delta β what is new for perl v5.30.0 πβ¨
πΈ DESCRIPTION πΈ
This document describes differences between the 5.28.0 release and the 5.30.0 release. periodt π
If you are upgrading from an earlier release such as 5.26.0, first read perl5280delta, which describes differences between 5.26.0 and 5.28.0. iykyk π
π Notice π
sv_utf8_(downgrade|decode) are no longer marked as experimental. [GH #16822] https://github.com/Perl/perl5/issues/16822. slay β¨
π Core Enhancements π
π¦ Limited variable length lookbehind in regular expression pattern matching is now experimentally supported
Using a lookbehind assertion (like (?<=foo?) or (?<!ba{1,9}r)) 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 experimental::vlb warnings category. This is to caution you that the precise behavior is subject to change based on feedback from use in the field. no cap π
See (?<=pattern) in perlre and (?<!pattern) in perlre. π
π¦ The upper limit n specifiable in a regular expression quantifier of the form {m,n} has been doubled to 65534
The meaning of an unbounded upper quantifier {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. it's giving math π
π¦ 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. glow up β¨
For details on the Unicode changes, see https://www.unicode.org/versions/Unicode11.0.0/ for 11.0; https://www.unicode.org/versions/Unicode12.0.0/ for 12.0; and https://www.unicode.org/versions/Unicode12.1.0/ 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. obsessed with consistency π
π¦ 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. ate π₯
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 "Wildcards in Property Values" in perlunicode. π
π¦ qr'\N{name}' is now supported
Previously it was an error to evaluate a named character \N{...} within a single quoted regular expression pattern (whose evaluation is deferred from the normal place). This restriction is now removed. we love to see it π
π¦ Turkic UTF-8 locales are now seamlessly supported
Turkic languages have different casing rules than other languages for the characters i and I. The uppercase of i is LATIN CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of 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. iconic behavior π
π¦ 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 Configure flags. main character energy β¨
π¦ Eliminate opASSIGN macro usage from core
This macro is still defined but no longer used in core π
π¦ -Drv now means something on -DDEBUGGING builds
Now, adding the verbose flag (-Dv) to the -Dr flag turns on all possible regular expression debugging. vibe check passed π
π Incompatible Changes π
π¨ Assigning non-zero to $[ is fatal
Setting $[ to a non-zero value has been deprecated since Perl 5.12 and now throws a fatal error. See "Assigning non-zero to $[ is fatal" in perldeprecation. literally fatal π
π¨ Delimiters must now be graphemes
See "Use of unassigned code point or non-standalone grapheme for a delimiter." in perldeprecation π
π¨ Some formerly deprecated uses of an unescaped left brace { 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 "Unescaped left braces in regular expressions" in perldeprecation. not me getting warnings π
π¨ Previously deprecated sysread()/syswrite() on :utf8 handles is now fatal
Calling sysread(), syswrite(), send() or recv() on a :utf8 handle, whether applied explicitly or implicitly, is now fatal. This was deprecated in perl 5.24. periodt π
There were two problems with calling these functions on :utf8 handles:
- All four functions only paid attention to the
:utf8flag. Other layers were completely ignored, so a handle with:encoding(UTF-16LE)layer would be treated as UTF-8. Other layers, such as compression are completely ignored with or without the:utf8flag. sysread()andrecv()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.
[GH #14839] https://github.com/Perl/perl5/issues/14839. π
π¨ my() in false conditional prohibited
Declarations such as my $x if 0 are no longer permitted. rip π
[GH #16702] https://github.com/Perl/perl5/issues/16702.
π¨ Fatalize $* and $#
These special variables, long deprecated, now throw exceptions when used. they said bye π
[GH #16718] https://github.com/Perl/perl5/issues/16718.
π¨ Fatalize unqualified use of dump()
The dump() function, long discouraged, may no longer be used unless it is fully qualified, i.e., CORE::dump(). qualify or deny π
[GH #16719] https://github.com/Perl/perl5/issues/16719.
π¨ Remove File::Glob::glob()
The File::Glob::glob() function, long deprecated, has been removed and now throws an exception which advises use of File::Glob::bsd_glob() instead. bsd_glob girlies rise π
[GH #16721] https://github.com/Perl/perl5/issues/16721.
π¨ pack() 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. [GH #16035] https://github.com/Perl/perl5/issues/16035. security slay π₯
π¨ 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. [0-9] is the most familiar. But there are also [\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 [0-9], so the design was flawed. This has been fixed, so is both a bug fix and an incompatibility. [GH #16704] https://github.com/Perl/perl5/issues/16704. glow up and bug fix π
All digits in a run still have to come from the same set of ten digits. π
π¨ 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. matching energy π
π«Ά Deprecations π«Ά
π 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 perldeprecation. delayed but not denied π
π₯ Performance Enhancements π₯
- 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,
ord("\x7fff")now requires12%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. speed demon β‘ - Eliminate recursion from
finalize_op().[GH #11866]https://github.com/Perl/perl5/issues/11866. - A handful of small optimizations related to character folding and character classes in regular expressions. small but mighty β¨
- Optimization of
IVtoUVconversions.[GH #16761]https://github.com/Perl/perl5/issues/16761. - Speed up of the integer stringification algorithm by processing two digits at a time instead of one.
[GH #16769]https://github.com/Perl/perl5/issues/16769. - Improvements based on LGTM analysis and recommendation. (
https://lgtm.com/projects/g/Perl/perl5/alerts/?mode=tree).[GH #16765]https://github.com/Perl/perl5/issues/16765.[GH #16773]https://github.com/Perl/perl5/issues/16773. - Code optimizations in
regcomp.c,regcomp.h,regexec.c. π - Regular expression pattern matching of things like
qr/[^a]/is significantly sped up, whereais 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, likeqr/[Gg]/are included, as is[^01]. regex girlies we won π₯
π Modules and Pragmata π
β¨ Updated Modules and Pragmata β¨
okay bestie, this is the glow-up list π every module that leveled up, no skips, fr fr.
Archive::Tarβ upgraded from version2.30to2.32. πBβ upgraded from version1.74to1.76. πB::Conciseβ upgraded from version1.003to1.004. πB::Deparseβ upgraded from version1.48to1.49. πbignumβ upgraded from version0.49to0.51. πbytesβ upgraded from version1.06to1.07. πCarpβ upgraded from version1.38to1.50. πCompress::Raw::Bzip2β upgraded from version2.074to2.084. πCompress::Raw::Zlibβ upgraded from version2.076to2.084. πConfig::Extensionsβ upgraded from version0.02to0.03. πConfig::Perl::V.β upgraded from version0.29to0.32. This was due to a new configuration variable that has influence on binary compatibility:"USE_THREAD_SAFE_LOCALE". πCPANβ upgraded from version2.20to2.22. πData::Dumperβ upgraded from version2.170to2.174Data::Dumpernow avoids leaking when"croak"ing. π
DB_Fileβ upgraded from version1.840to1.843. πdeprecateβ upgraded from version0.03to0.04. πDevel::Peekβ upgraded from version1.27to1.28. πDevel::PPPortβ upgraded from version3.40to3.52. πDigest::SHAβ upgraded from version6.01to6.02. πEncodeβ upgraded from version2.97to3.01. πErrnoβ upgraded from version1.29to1.30. πexperimentalβ upgraded from version0.019to0.020. πExtUtils::CBuilderβ upgraded from version0.280230to0.280231. πExtUtils::Manifestβ upgraded from version1.70to1.72. πExtUtils::Miniperlβ upgraded from version1.08to1.09. πExtUtils::ParseXSβ upgraded from version3.39to3.40.OUTLISTparameters are no longer incorrectly included in the automatically generated function prototype.[GH #16746]https://github.com/Perl/perl5/issues/16746. π¦
featureβ upgraded from version1.52to1.54. πFile::Copyβ upgraded from version2.33to2.34. πFile::Findβ upgraded from version1.34to1.36.$File::Find::dont_use_nlinknow defaults to1on all platforms.[GH #16759]https://github.com/Perl/perl5/issues/16759. πΈ- Variables
$Is_Win32and$Is_VMSare being initialized. πΈ
File::Globβ upgraded from version1.31to1.32. πFile::Pathβ upgraded from version2.15to2.16. πFile::Specβ upgraded from version3.74to3.78.- Silence Cwd warning on Android builds if
"targetsh"is not defined. πΈ
- Silence Cwd warning on Android builds if
File::Tempβ upgraded from version0.2304to0.2309. πFilter::Util::Callβ upgraded from version1.58to1.59. πGDBM_Fileβ upgraded from version1.17to1.18. πHTTP::Tinyβ upgraded from version0.070to0.076. πI18N::Langinfoβ upgraded from version0.17to0.18. πIOβ upgraded from version1.39to1.40. πIO-Compressβ upgraded from version2.074to2.084.- Adds support for
IO::Uncompress::ZstdandIO::Uncompress::UnLzip. π¦ - The
BinModeInandBinModeOutoptions are now no-ops. ALL files will be read/written in binmode. π
- Adds support for
IPC::Cmdβ upgraded from version1.00to1.02. πJSON::PPβ upgraded from version2.97001to4.02.- JSON::PP as JSON::XS 4.0 enables
"allow_nonref"by default. π
- JSON::PP as JSON::XS 4.0 enables
libβ upgraded from version0.64to0.65. πLocale::Codesβ upgraded from version3.56to3.57. πMath::BigIntβ upgraded from version1.999811to1.999816.bnok()now supports the full Kronenburg extension.[cpan #95628]https://rt.cpan.org/Ticket/Display.html?id=95628. π
Math::BigInt::FastCalcβ upgraded from version0.5006to0.5008. πMath::BigRatβ upgraded from version0.2613to0.2614. πModule::CoreListβ upgraded from version5.20180622to5.20190520.- Changes to B::Op_private and Config πΈ
Module::Loadβ upgraded from version0.32to0.34. πModule::Metadataβ upgraded from version1.000033to1.000036.- Properly clean up temporary directories after testing. πΈ
NDBM_Fileβ upgraded from version1.14to1.15. πNet::Pingβ upgraded from version2.62to2.71. πODBM_Fileβ upgraded from version1.15to1.16. πPathToolsβ upgraded from version3.74to3.78. πparentβ upgraded from version0.236to0.237. πperl5db.plβ upgraded from version1.54to1.55.- Debugging threaded code no longer deadlocks in
DB::subnorDB::lsub. π
- Debugging threaded code no longer deadlocks in
perlfaqβ upgraded from version5.021011to5.20190126. πPerlIO::encodingβ upgraded from version0.26to0.27.- Warnings enabled by setting the
WARN_ON_ERRflag in$PerlIO::encoding::fallbackare now only produced if warnings are enabled withuse warnings "utf8";or setting$^W. πΈ
- Warnings enabled by setting the
PerlIO::scalarβ upgraded from version0.29to0.30. πpodlatorsβ upgraded from version4.10to4.11. πPOSIXβ upgraded from version1.84to1.88. πreβ upgraded from version0.36to0.37. πSDBM_Fileβ upgraded from version1.14to1.15. πsigtrapβ upgraded from version1.08to1.09. πStorableβ upgraded from version3.08to3.15.- Storable no longer probes for recursion limits at build time.
[GH #16780]https://github.com/Perl/perl5/issues/16780and others. πΈ - Metasploit exploit code was included to test for CVE-2015-1592 detection, this caused anti-virus detections on at least one AV suite. The exploit code has been removed and replaced with a simple functional test.
[GH #16778]https://github.com/Perl/perl5/issues/16778π
- Storable no longer probes for recursion limits at build time.
Test::Simpleβ upgraded from version1.302133to1.302162. πThread::Queueβ upgraded from version3.12to3.13. πthreads::sharedβ upgraded from version1.58to1.60.- Added support for extra tracing of locking, this requires a
-DDEBUGGINGand extra compilation flags. π₯
- Added support for extra tracing of locking, this requires a
Time::HiResβ upgraded from version1.9759to1.9760. πTime::Localβ upgraded from version1.25to1.28. πTime::Pieceβ upgraded from version1.3204to1.33. πUnicode::Collateβ upgraded from version1.25to1.27. πUnicode::UCDβ upgraded from version0.70to0.72. πUser::grentβ upgraded from version1.02to1.03. πutf8β upgraded from version1.21to1.22. πvarsβ upgraded from version1.04to1.05.vars.pmno longer disables non-vars strict when checking if strict vars is enabled.[GH #15851]https://github.com/Perl/perl5/issues/15851. πΈ
versionβ upgraded from version0.9923to0.9924. πwarningsβ upgraded from version1.42to1.44. πXS::APItestβ upgraded from version0.98to1.00. πXS::Typemapβ upgraded from version0.16to0.17. π
ποΈ Removed Modules and Pragmata ποΈ
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. π
The core versions of these modules will now issue "deprecated"-category warnings to alert you to this fact. To silence these deprecation warnings, install the modules in question from CPAN. π«Ά
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. π
arybasehas been removed. It used to provide the implementation of the$[variable (also known as the"array_base"feature), letting array and string indices start at a non-zero value. As the feature has been removed (see"Assigning non-zero to $[ is fatal"), this internal module is gone as well. πB::Debugis no longer distributed with the core distribution. It continues to be available on CPAN asB::Debug <https://metacpan.org/pod/B::Debug>. π¦Locale::Codeshas been removed at the request of its author. It continues to be available on CPAN asLocale::Codes <https://metacpan.org/pod/Locale::Codes>[GH #16660]https://github.com/Perl/perl5/issues/16660. π¦
π Documentation π
ποΈ Changes to Existing Documentation ποΈ
We have attempted to update the documentation to reflect the changes listed in this document. If you find any we have missed, send email to perlbug@perl.org <mailto:perlbug@perl.org>. π
perlapi
AvFILL()was wrongly listed as deprecated. This has been corrected.[GH #16586]https://github.com/Perl/perl5/issues/16586πΈ
perlop
- We no longer have null (empty line) here doc terminators, so perlop should not refer to them. πΈ
- The behaviour of
"tr"when the delimiter is an apostrophe has been clarified. In particular, hyphens aren't special, and"\x{}"isn't interpolated.[GH #15853]https://github.com/Perl/perl5/issues/15853πΈ
perlreapi, perlvar
- Improve docs for lastparen, lastcloseparen. πΈ
perlfunc
- The entry for
-Xin perlfunc has been clarified to indicate that symbolic links are followed for most tests. πΈ - Clarification of behaviour of
reset EXPR. πΈ - Try to clarify that
ref(qr/xx/)returns"Regexp"rather than"REGEXP"and why.[GH #16801]https://github.com/Perl/perl5/issues/16801. πΈ
perlreref
- Clarification of the syntax of
/(?(cond)yes)/. πΈ
perllocale
- There are actually two slightly different types of UTF-8 locales: one for Turkic languages and one for everything else. Starting in Perl v5.30, Perl seamlessly handles both types. π
perlrecharclass
- Added a note for the
::xdigit::character class. πΈ
perlvar
- More specific documentation of paragraph mode.
[GH #16787]https://github.com/Perl/perl5/issues/16787. πΈ
π¬ DIAGNOSTICS π¬
okay so bestie, this is where we talk about all the diagnostic output glow-ups β warnings, fatal error messages, the whole vibe check π for the complete, absolutely-every-single-one list of diagnostic messages, go peek at perldiag π
β¨ Changes to Existing Diagnostics β¨
- remember how we flagged this up in "Incompatible Changes" earlier? that deprecation warning that used to say
"Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/%s/"β it's been changed into a warning that is not a deprecation warning anymore, and it now reads"Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/%s/". the drama? gone. the brace? still passed through π - if you write
"\o{}"with literally nothing between the braces, you now get the fatal error message"Empty \o{}"π before, it was"Number with no digits". so now the wording matches what you'd get for other similar constructs like"\p{}"β consistent queen behavior π - inside the scope of the experimental feature
use re 'strict', if you write"\x{}"with nothing between the braces, you now get the fatal error"Empty \x{}"π again, previously it was"Number with no digits", and again the point is that the wording now matches similar constructs like"\p{}". important tea: an empty"\x"is legal outside ofre 'strict'β though it is not wise β and it silently generates a NUL character π Type of arg %d to %s must be %s (not %s)
so when you try to push, pop, etc. on a hash or a glob, you now get this message instead of the old one complaining that those ops no longer work on scalars. [GH #15774] <https://github.com/Perl/perl5/issues/15774> π«Ά
Prototype not terminated
the file and line number are now reported for this error, so you actually know where to look. iconic. [GH #16697] <https://github.com/Perl/perl5/issues/16697> π
- under
-Dr(oruse re 'Debug') the compiled regex engine program gets displayed π it used to use two different spellings for infinity β"INFINITY"and"INFTY"β and now it uses the latter exclusively, because that spelling has been around the longest. loyalty to the OG spelling π
π οΈ Utility Changes π οΈ
πΈ xsubpp πΈ
- the generated prototype (the one you get with
PROTOTYPES: ENABLE) would includeOUTLISTparameters β but bestie, those aren't arguments to the perl function π this has been rectified. [GH #16746] <https://github.com/Perl/perl5/issues/16746> β¨
βοΈ Configuration and Compilation βοΈ
- normally the thread-safe locale functions are only used on threaded builds. but now you can force their use on unthreaded builds, on systems where they're available, by including the
-Accflags='-DUSE_THREAD_SAFE_LOCALE'option toConfigureπ₯ - improved detection of
memrchr,strlcat, andstrlcpyπ - improved
Configuredetection ofmemmem(). [GH #16807] <https://github.com/Perl/perl5/issues/16807> π - multiple improvements and fixes for the
-DPERL_GLOBAL_STRUCTbuild option π οΈ - fixed the
-DPERL_GLOBAL_STRUCT_PRIVATEbuild option π
π§ͺ Testing π§ͺ
t/lib/croak/op[GH #15774] <https://github.com/Perl/perl5/issues/15774>
separate error for push, etc. on hash/glob. π
t/op/svleak.t[GH #16749] <https://github.com/Perl/perl5/issues/16749>
added a test for goto &sub leaking in overload π«
- split
t/re/fold_grind.tinto multiple test files βοΈ - fixed some intermittent tests that were failing because of race conditions which surface during parallel testing. [GH #16795] <https://github.com/Perl/perl5/issues/16795> πββοΈπ¨
- thoroughly tested paragraph mode, using a brand new test file,
t/io/paragraph_mode.t. [GH #16787] <https://github.com/Perl/perl5/issues/16787> π - some tests in
t/io/eintr.tcaused the process to hang on pre-16 Darwin π΅ so those tests are now skipped for those versions of Darwin. we do not do hanging here π
π₯οΈ Platform Support π₯οΈ
π Platform-Specific Notes π
HP-UX 11.11
an obscure problem in pack() when compiling with HP C-ANSI-C has been fixed by disabling optimizations in pp_pack.c π
Mac OS X
Perl's build and testing process on Mac OS X for -Duseshrplib builds is now compatible with Mac OS X System Integrity Protection (SIP) π‘οΈ
SIP prevents binaries in /bin (and a few other places) from being passed the DYLD_LIBRARY_PATH environment variable. for our purposes, this prevents DYLD_LIBRARY_PATH from being passed to the shell, which prevents that variable from being passed to the testing or build process β so running perl couldn't find libperl.dylib π
to work around that, the initial build of the perl executable expects to find libperl.dylib in the build directory, and the library path is then adjusted during installation to point to the installed library β¨
[GH #15057] <https://github.com/Perl/perl5/issues/15057> π¦
Minix3
some support for Minix3 has been re-added π
Cygwin
Cygwin doesn't make cuserid visible π
Win32 Mingw
C99 math functions are now available π
Windows
- the
USE_CPLUSPLUSbuild option, which has long been available inwin32/Makefile(for nmake) andwin32/makefile.mk(for dmake), is now also available inwin32/GNUmakefile(for gmake) π - the nmake makefile no longer defaults to Visual C++ 6.0 (a very old version which is unlikely to be widely used today π΅). as a result, it is now a requirement to specify
CCTYPE, since there's no obvious choice of which modern version to default to instead. failure to specifyCCTYPEwill result in an error being output and the build will stop π
(the dmake and gmake makefiles will automatically detect which compiler is being used, so they do not require CCTYPE to be set. this feature has not yet been added to the nmake makefile, bestie π)
sleep()with warnings enabled for aUSE_IMP_SYSbuild no longer warns about the sleep timeout being too large. [GH #16631] <https://github.com/Perl/perl5/issues/16631> π΄- support for compiling perl on Windows using Microsoft Visual Studio 2019 (containing Visual C++ 14.2) has been added π₯
socket()now sets$!if the protocol, address family and socket type combination is not found. [GH #16849] <https://github.com/Perl/perl5/issues/16849> π§¦- the Windows Server 2003 SP1 Platform SDK build, with its early x64 compiler and tools, was accidentally broken in Perl 5.27.9 π this has now been fixed β
𧬠Internal Changes π§¬
- the sizing pass has been eliminated from the regular expression compiler π instead, an extra pass may be needed in some cases to count the number of parenthetical capture groups π’
- a new function
"my_strtod"in perlapi β or its synonym,Strtod()β is now available with the same signature as the libcstrtod(). it providesstrotod()equivalent behavior on all platforms, using the best available precision, depending on platform capabilities andConfigureoptions, while handling locale-related issues, such as whether the radix character should be a dot or a comma π - added
newSVsv_nomg()to copy a SV without processing get magic on the source. [GH #16461] <https://github.com/Perl/perl5/issues/16461> β¨ - it is now forbidden to malloc more than
PTRDIFF_MAXbytes. a whole lot of code (including C optimizers) assumes that all data structures will not be larger than this, so this catches such attempts before overflow happens π‘οΈ - two new regnodes have been introduced:
EXACT_ONLY8andEXACTFU_ONLY8. they're equivalent toEXACTandEXACTFU, except that they contain a code point which requires UTF-8 to represent/match. hence, if the target string isn't UTF-8, we know it can't possibly match β without needing to even try π iconic optimization behavior π print_bytes_for_locale()is now defined ifDEBUGGING. prior, it didn't get defined unlessLC_COLLATEwas defined on the platform π«Ά
πβ¨ Selected Bug Fixes β¨π
okay bestie, this is the part where we flex π β all the lil bugs that got caught and yeeted. buckle up, there's a LOT. no cap.
- Compilation under
-DPERL_MEM_LOGand-DNO_LOCALEhas been fixed. π - Perl 5.28 brought us an
index()optimization for when you're comparing to -1 (or indirectly, like>= 0). cute, right? except when that optimization fired off inside awhenclause, it spat out a warning β"Argument %s isn't numeric in smart match"β which was giving very much unhinged. now fixed. [GH #16626] <https://github.com/Perl/perl5/issues/16626> πΈ - The new in-place editing code no longer leaks directory handles. leak era: over. [GH #16602] <https://github.com/Perl/perl5/issues/16602>. π¦
- Warnings that pop up from constant folding operations on overloaded values are no longer out here producing spurious
"Use of uninitialized value"warnings. so dramatic for no reason. [GH #16349] <https://github.com/Perl/perl5/issues/16349>. π - Fix for
"mutator not seen in (lex = ...) .= ...". [GH #16655] <https://github.com/Perl/perl5/issues/16655>. β¨ pack "u", "invalid uuencoding"now properly NUL terminates the zero-length SV it produces. [GH #16343] <https://github.com/Perl/perl5/issues/16343>. π- Improved the debugging output for calloc() calls with
-Dm. [GH #16653] <https://github.com/Perl/perl5/issues/16653>. π§ - Regexp script runs were failing to permit ASCII digits in some cases. [GH #16704] <https://github.com/Perl/perl5/issues/16704>. π
- On Unix-like systems that support a platform-specific technique for figuring out
$^X, Perl was failing to fall back to the generic technique whenever the platform-specific one failed (picture a Linux system where/procisn't mounted, bestie). this was a regression in Perl 5.28.0. [GH #16715] <https://github.com/Perl/perl5/issues/16715>. π SDBM_Fileis now way more robust when it bumps into corrupt database files. heads up though β these improvements do not make SDBM files suitable as an interchange format. [GH #16164] <https://github.com/Perl/perl5/issues/16164>. βbinmode($fh);orbinmode($fh, ':raw');now properly removes the:utf8flag from the default:crlfI/O layer on Win32. [GH #16730] <https://github.com/Perl/perl5/issues/16730>. π- The experimental reference aliasing feature was out here misinterpreting array and hash slice assignment as being localised, like:
\(@a[3,5,7]) = \(....);
was being interpreted as:
local \(@a[3,5,7]) = \(....);
which is not the vibe. [GH #16701] <https://github.com/Perl/perl5/issues/16701>. π
sort SUBNAMEinside aneval EXPR, whenEXPRwas UTF-8 upgraded, could panic if theSUBNAMEwas non-ASCII. [GH #16979] <https://github.com/Perl/perl5/issues/16979>. π- Now correctly handling realloc() modifying
errnoon success, so that modification isn't visible to the perl user β because realloc() gets called implicitly by the interpreter, and that's just not your business to see. This modification is permitted by the C standard, but it's only ever been observed on FreeBSD 13.0-CURRENT. [GH #16907] <https://github.com/Perl/perl5/issues/16907>. π - Perl now exposes POSIX
getcwdas Internals::getcwd() if it's available. It's intended for use byCwd.pmduring bootstrapping and may be removed or changed without notice (iykyk, don't get attached). This fixes some bootstrapping issues when you're building perl in a directory where some ancestor directory isn't readable. [GH #16903] <https://github.com/Perl/perl5/issues/16903>. π - pack() can no longer return malformed UTF-8. it croaks if it would otherwise return a UTF-8 string containing malformed UTF-8. this is protecting you from potential security threats, so like, thank it. [GH #16035] <https://github.com/Perl/perl5/issues/16035>. π
- See
"Any set of digits in the Common script are legal in a script run of another script". πΈ - Regular expression matching no longer leaves stale UTF-8 length magic behind when updating
$^R. that could makelength($^R)return an incorrect value, which is a whole lie. π¦ - Reduced recursion on ops [GH #11866] <https://github.com/Perl/perl5/issues/11866>.
This can prevent stack overflow when processing extremely deep op trees. π
- Avoided a leak in multiconcat with overloading. [GH #16823] <https://github.com/Perl/perl5/issues/16823>. β¨
- The handling of user-defined
\p{}properties (see"User-Defined Character Properties"in perlunicode) has been rewritten to be in C instead of Perl. this speeds things up, but in the process several inconsistencies and bug fixes got made. let's break it down:- A few error messages have minor wording changes. This is essentially because the new way is integrated into the regex error handling mechanism that marks the position in the input at which the error occurred β which wasn't possible before. The messages now also contain additional back-trace-like information in case the error occurs deep in nested calls. π
- A user-defined property is implemented as a perl subroutine with certain highly constrained naming conventions. It was documented previously that the sub would be in the current package if the package was unspecified. This turned out not to be true in all cases, but now it is. π
- All recursive calls are treated as infinite recursion. Previously they would cause the interpreter to panic. Now, they cause the regex pattern to fail to compile. much chiller, honestly. π
- Similarly, any other error likely would lead to a panic; now it's just the pattern failing to compile. β¨
- The old mechanism did not detect illegal ranges in the definition of the property. Now, the range max must not be smaller than the range min. Otherwise, the pattern fails to compile. π¦
- The intention was to have each sub called only once during the lifetime of the program, so that a property's definition is immutable. This was relaxed so that it could be called once for all
/icompilations, and potentially a second time for non-/i(the sub is passed a parameter indicating which). However, in practice there were instances when this was broken, and multiple calls were possible. Those have been fixed. Now (besides the/i, non-/icases) the only way a sub can be called multiple times is if some component of it has not been defined yet. For example, suppose we have sub IsA() whose definition is known at compile time, and it in turn calls isB() whose definition is not yet known. isA() will be called each time a pattern it appears in is compiled. If isA() also calls isC() and that definition is known, isC() will be called just once. π§ - There were some races and very long hangs should one thread be compiling the same property as another simultaneously. These have now been fixed. π₯
- Fixed a failure to match properly. π«Ά
An EXACTFish regnode has a finite length it can hold for the string being matched. If that length is exceeded, a second node is used for the next segment of the string, for as many regnodes as are needed. Care has to be taken where to break the string, in order to deal with multi-character folds in Unicode correctly. If we want to break a string at a place which could potentially be in the middle of a multi-character fold, we back off one (or more) characters, leaving a shorter EXACTFish regnode. This backing off mechanism contained an off-by-one error. [GH #16806] <https://github.com/Perl/perl5/issues/16806>. π
- A bare
eofcall with no previous file handle now returns true. [GH #16786] <https://github.com/Perl/perl5/issues/16786> π - Failing to compile a format now aborts compilation. Like other errors in sub-parses, this could leave the parser in a strange state, possibly crashing perl if compilation continued. so yeah, aborting is the move. [GH #16169] <https://github.com/Perl/perl5/issues/16169> π
- If an in-place edit is still in progress during global destruction and the process exit code (as stored in
$?) is zero, perl will now treat the in-place edit as successful, replacing the input file with any output produced.
This allows code like:
perl -i -ne 'print "Foo"; last'
to replace the input file, while code like:
perl -i -ne 'print "Foo"; die'
will not. Partly resolves [GH #16748] <https://github.com/Perl/perl5/issues/16748>. π
- A regression in 5.28 caused the following code to fail
close(STDIN); open(CHILD, "|wc -l")'
because the child's stdin would be closed on exec. This has now been fixed. β
- Fixed an issue where compiling a regexp containing both compile-time and run-time code blocks could lead to trying to compile something which is invalid syntax. π
- Fixed build failures with
-DNO_LOCALE_NUMERICand-DNO_LOCALE_COLLATE. [GH #16771] <https://github.com/Perl/perl5/issues/16771>. π - Prevented the tests in ext/B/t/strict.t from being skipped. [GH #16783] <https://github.com/Perl/perl5/issues/16783>. π
/dinodes ending or beginning in s are nowEXACTF. We do not want twoEXACTFUto be joined together during optimization, and to form ass,sS,SsorSSsequence; they are the only multi-character sequences which may match differently under/uiand/di. π
π ACKNOWLEDGEMENTS π
okay so first of all, the lore. Perl 5.30.0 represents approximately 11 months of development since Perl 5.28.0, and it contains approximately 620,000 lines of changes across 1,300 files from 58 authors. the sheer volume?? it's giving main character energy fr fr.
and like, excluding auto-generated files, documentation and release tools, there were approximately 510,000 lines of changes to 750 .pm, .t, .c and .h files. bestie. the commitment.
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.30.0:
Aaron Crane, Abigail, Alberto SimΓ΅es, Alexandr Savca, Andreas KΓΆnig, Andy Dougherty, Aristotle Pagaltzis, Brian Greenfield, Chad Granum, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari MannsΓ₯ker, Dan Book, Dan Dedrick, Daniel Dragan, Dan Kogai, David Cantrell, David Mitchell, Dominic Hargreaves, E. Choroba, Ed J, Eugen Konkov, FranΓ§ois Perrad, Graham Knop, Hauke D, H.Merijn Brand, Hugo van der Sanden, Jakub Wilk, James Clarke, James E Keenan, Jerry D. Hedden, Jim Cromie, John SJ Anderson, Karen Etheridge, Karl Williamson, Leon Timmermans, Matthias Bethke, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Petr PΓsaΕ, Phil Pearl (Lobbes), Richard Leach, Ryan Voots, Sawyer X, Shlomi Fish, Sisyphus, Slaven Rezic, Steve Hay, Sullivan Beck, Tina MΓΌller, Tomasz Konojacki, Tom Wyant, Tony Cook, Unicode Consortium, Yves Orton, Zak B. Elep.
every single one of them π icons, all of them.
now, tea time β the list above is almost certainly incomplete, because it's automatically generated from version control history. in particular, it does not include the names of most of the (very much appreciated) contributors who reported issues to the Perl bug tracker. and noteworthy in this release were the large number of bug fixes made possible by Sergey Aleynikov's high quality perlbug reports for issues he discovered by fuzzing with AFL. fuzzing king, honestly. π
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 AUTHORS file in the Perl source distribution.
π REPORTING BUGS π
so if you find what you think is a bug, you might check the perl bug database at <https://rt.perl.org/>. there may also be information at <http://www.perl.org/>, the Perl Home Page.
if you believe you have an unreported bug, please run the perlbug program included with your release. be sure to trim your bug down to a tiny but sufficient test case. this part is not optional bestie, the porters need the lil minimal repro or they're gonna be sad π
your bug report, along with the output of perl -V, will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
π¨ if the bug you are reporting has security implications which make it inappropriate to send to a publicly archived mailing list, then see"SECURITY VULNERABILITY CONTACT INFORMATION"inperlsecfor details of how to report the issue. do NOT just yeet it into the public tracker, okay? pls pls pls.
π«Ά 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 perlthanks program:
perlthanks
this will send an email to the Perl 5 Porters list with your show of thanks. it's literally the easiest good deed ever, no cap. π
π SEE ALSO π
- the
Changesfile for an explanation of how to view exhaustive details on what changed. - the
INSTALLfile for how to build Perl. - the
READMEfile for general stuff. - the
ArtisticandCopyingfiles for copyright information.
and that's a wrap on this whole delta page, bestie!! πβ¨ this was perl v5.42.3, dated 2026-08-03, and yes it's PERL5300DELTA(1) β go forth and slay your Perl 5.30.0 upgrade π
π bye mwah π
π¦ where this page comes from
- fedora 43: perl-doc 5.42.3-524.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- fedora 44: perl-doc 5.42.3-525.fc44 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms