PERL5240DELTA(1)
PERL5240DELTA π
okay bestie, so this is perl5240delta β it lives in the Perl Programmers Reference Guide section, and it's literally the whole tea on what is new for perl v5.24.0. pull up a chair, we're doing this. π«Ά
β¨ NAME β¨
perl5240delta β what is new for perl v5.24.0. no cap, that's the whole name, that's the assignment. π
πΈ DESCRIPTION πΈ
This doc spills every single difference between the 5.22.0 release and the 5.24.0 release. it's giving "changelog but make it a moment". β¨
π Core Enhancements π
π Postfix dereferencing is no longer experimental
Using the postderef and postderef_qq features no longer emits a warning. bestie it's just fine now, no more yellow text jumping out at you.
Existing code that disables the experimental::postderef warning category β the one they previously used β will continue to work, so nobody's old code is gonna fall apart. π«Ά
And listen: the postderef feature has no effect. Like, none. All Perl code can use postfix dereferencing, regardless of what feature declarations are in scope. it's just... allowed now. the 5.24 feature bundle now includes the postderef_qq feature. slay. π
π Unicode 8.0 is now supported
For the deets on what's actually in this release, go peek at <http://www.unicode.org/versions/Unicode8.0.0/>. that's the whole thing, I'm not gatekeeping. β¨
π perl will now croak when closing an in-place output file fails
Until now, failure to close the output file for an in-place edit was not detected β which means the input file could get clobbered without the edit actually being successfully completed. π that's a whole tragedy, the original file gone and the new one not even written.
Now, when the output file cannot be closed successfully, an exception is raised. periodt. π«Ά
π¦ New \b{lb} boundary in regular expressions
lb stands for Line Break. It's a Unicode property that determines where a line of text is suitable to break β typically so that it can be output without overflowing the available horizontal space. very "make it fit on the slide" energy.
This capability has long been furnished by the Unicode::LineBreak module, but now a light-weight, non-customizable version that is suitable for many purposes is in core Perl. no CPAN install required, bestie, it's just there. β¨
π
qr/(?[ ])/ now works in UTF-8 locales
Extended Bracketed Character Classes now will successfully compile when use locale is in effect. the compiled pattern will use standard Unicode rules.
If the runtime locale is not a UTF-8 one, a warning is raised and standard Unicode rules are used anyway. And no tainting is done, since the outcome does not actually depend on the locale. iykyk. π§
π₯ Integer shift (<< and >>) now more explicitly defined
Negative shifts are reverse shifts: left shift becomes right shift, and right shift becomes left shift. it's giving "mirror world".
Shifting by the number of bits in a native integer (or more) is zero β except when the overshift is right shifting a negative value under use integer, in which case the result is -1 (arithmetic shift). okay so that's the one exception, don't forget it. π
Until now negative shifting and overshifting have been undefined, because they relied on whatever the C implementation happens to do. for example, for the overshift a common C behavior is "modulo shift":
1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior.
# And the same for <<, while Perl now produces 0 for both.
Now these behaviors are well-defined under Perl, regardless of what the underlying C implementation does. π
note, however, that you are still constrained by the native integer width: you need to know how far left you can go. you can use for example:
use Config;
my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3.
If you need a more bits on the left shift, you can use for example the bigint pragma, or the Bit::Vector module from CPAN. options exist, bestie. πΈ
β printf and sprintf now allow reordered precision arguments
That is, sprintf '|%.*2$d|', 2, 3 now returns |002|. cute right?
This extends the existing reordering mechanism, which allows reordering for arguments that are used as format fields, widths, and vector separators. so the precision args get to join the party too. π
π More fields provided to sigaction callback with SA_SIGINFO
When passing the SA_SIGINFO flag to sigaction, the errno, status, uid, pid, addr and band fields are now included in the hash passed to the handler β if supported by the platform. (if it's not supported by your platform, then... it's not, sorry bestie π«Ά)
π Hashbang redirection to Perl 6
Previously perl would redirect to another interpreter if it found a hashbang path unless the path contains perl (see perlrun).
To improve compatibility with Perl 6 this behavior has been extended to also redirect if perl is followed by 6. iconique. β¨
π‘οΈ Security π‘οΈ
π Set proper umask before calling mkstemp(3)
In 5.22 perl started setting umask to 0600 before calling mkstemp(3) and restoring it afterwards. This wrongfully tells open(2) to strip the owner read and write bits from the given mode before applying it, rather than the intended negation of leaving only those bits in place. π not the opposite of what we wanted.
Systems that use mode 0666 in mkstemp(3) (like old versions of glibc) create a file with permissions 0066, leaving world read and write permissions regardless of current umask. that is genuinely scary, bestie.
This has been fixed by using umask 0177 instead. [perl #127322] π
π₯ Fix out of boundary access in Win32 path handling
This is CVE-2015-8608. For more information see [GH #15067] <https://github.com/Perl/perl5/issues/15067>
πΈ Fix loss of taint in canonpath
This is CVE-2015-8607. For more information see [GH #15084] <https://github.com/Perl/perl5/issues/15084>
π Avoid accessing uninitialized memory in win32 crypt()
Added validation that will detect both a short salt and invalid characters in the salt. [GH #15091] <https://github.com/Perl/perl5/issues/15091>
π¦ Remove duplicate environment variables from environ
Previously, if an environment variable appeared more than once in environ[], %ENV would contain the last entry for that name, while a typical getenv() would return the first entry. we now make sure %ENV contains the same as what getenv returns. consistency, we love her.
Second, we remove duplicates from environ[], so if a setting with that name is set in %ENV, we won't pass an unsafe value to a child process. π«Ά
[CVE-2016-2381]
π Incompatible Changes π
π« The autoderef feature has been removed
The experimental autoderef feature β which allowed calling push, pop, shift, unshift, splice, keys, values, and each on a scalar argument β has been deemed unsuccessful. it's gone, bestie.
It has now been removed; trying to use the feature (or to disable the experimental::autoderef warning it previously triggered) now yields an exception. π
π« Lexical $_ has been removed
my $_ was introduced in Perl 5.10, and subsequently caused much confusion with no obvious solution. π΅βπ«
In Perl 5.18.0, it was made experimental on the theory that it would either be removed or redesigned in a less confusing (but backward-incompatible) way. Over the following years, no alternatives were proposed. The feature has now been removed and will fail to compile. periodt, it had its moment and its moment is over.
π qr/\b{wb}/ is now tailored to Perl expectations
This is now more suited to be a drop-in replacement for plain \b, but giving better results for parsing natural language. πΈ
Previously it strictly followed the current Unicode rules, which calls for it to match between each white space character. Now it doesn't generally match within spans of white space, behaving like \b does. See "\b{wb}" in perlrebackslash. iykyk. π
π Regular expression compilation errors
Some regular expression patterns that had runtime errors now don't compile at all. it's giving "caught way earlier, actually".
Almost all Unicode properties using the \p{} and \P{} regular expression pattern constructs are now checked for validity at pattern compilation time, and invalid ones will cause the program to not compile. In earlier releases, this check was often deferred until run time.
Whenever an error check is moved from run- to compile time, erroneous code is caught 100% of the time, whereas before it would only get caught if and when the offending portion actually gets executed β which for unreachable code might be never. so yeah, this one's a glow up. β¨
π« qr/\N{}/ now disallowed under use re "strict"
An empty \N{} makes no sense, but for backwards compatibility is accepted as doing nothing, though a deprecation warning is raised by default. but now this is a fatal error under the experimental feature "'strict' mode" in re. π
π¦ Nested declarations are now disallowed
A my, our, or state declaration is no longer allowed inside of another my, our, or state declaration. nesting them was never the vibe.
For example, these are now fatal:
my ($x, my($y));
our (my $x);
[GH #14799] <https://github.com/Perl/perl5/issues/14799>
[GH #13548] <https://github.com/Perl/perl5/issues/13548>
π The /\C/ character class has been removed
This regular expression character class was deprecated in v5.20.0 and has produced a deprecation warning since v5.22.0. It is now a compile-time error. π
If you need to examine the individual bytes that make up a UTF8-encoded character, then use utf8::encode() on the string (or a copy) first. π«Ά
π« chdir('') no longer chdirs home
Using chdir('') or chdir(undef) to chdir home has been deprecated since perl v5.8, and will now fail. Use chdir() instead. just... no arguments, bestie. that's the whole trick. β¨
π ASCII characters in variable names must now be all visible
It was legal until now on ASCII platforms for variable names to contain non-graphical ASCII control characters (ordinals 0 through 31, and 127, which are the C0 controls and "DELETE"). This usage has been deprecated since v5.20, and as of now causes a syntax error.
The variables these names referred to are special, reserved by Perl for whatever use it may choose, now, or in the future. Each such variable has an alternative way of spelling it. Instead of the single non-graphic control character, a two character sequence beginning with a caret is used, like $^] and "${^GLOBAL_PHASE}". Details are at perlvar.
It remains legal, though unwise and deprecated (raising a deprecation warning), to use certain non-graphic non-ASCII characters in variables names when not under use utf8. No code should do this, as all such variables are reserved by Perl, and Perl doesn't currently define any of them (but could at any time, without notice). π
π An off by one issue in $Carp::MaxArgNums has been fixed
$Carp::MaxArgNums is supposed to be the number of arguments to display. Prior to this version, it was instead showing $Carp::MaxArgNums + 1 arguments, contrary to the documentation. classic off-by-one, we've all been there. π
π
Only blanks and tabs are now allowed within [...] within (?[...])
The experimental Extended Bracketed Character Classes can contain regular bracketed character classes within them. These differ from regular ones in that white space is generally ignored, unless escaped by preceding it with a backslash.
The white space that is ignored is now limited to just tab \t and SPACE characters. Previously, it was any white space. See "Extended Bracketed Character Classes" in perlrecharclass. πΈ
Deprecations πβ¨
Okay bestie, these are the things Perl is currently side-eyeing. They still work (for now), but they're lowkey on notice. π
Using code points above the platform's IV_MAX is now deprecated π«
So Unicode defines code points in the range 0..0x10FFFF. Some standards at one time defined them up to 2**31 - 1, but Perl has allowed them to be as high as anything that will fit in a word on the platform being used. However, use of those above the platform's IV_MAX is broken in some constructs, notably tr///, regular expression patterns involving quantifiers, and in some arithmetic and comparison operations, such as being the upper limit of a loop. Now the use of such code points raises a deprecation warning, unless that warning category is turned off. IV_MAX is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on 64-bit ones. So like, don't be out here using those big code points unless you want the warning. π
Doing bitwise operations on strings containing code points above 0xFF is deprecated π§¨
The string bitwise operators treat their operands as strings of bytes, and values beyond 0xFF are nonsensical in this context. To operate on encoded bytes, first encode the strings. To operate on code points' numeric values, use split and map ord. In the future, this warning will be replaced by an exception. So bestie, if you're bitwise-ing strings with code points above 0xFF, that's a no from Perl. π
sysread(), syswrite(), recv() and send() are deprecated on :utf8 handles π
The sysread(), recv(), syswrite() and send() operators are deprecated on handles that have the :utf8 layer, either explicitly, or implicitly, eg., with the :encoding(UTF-16LE) layer.
Both sysread() and recv() currently use only the :utf8 flag for the stream, ignoring the actual layers. Since sysread() and recv() do no UTF-8 validation they can end up creating invalidly encoded scalars.
Similarly, syswrite() and send() use only the :utf8 flag, otherwise ignoring any layers. If the flag is set, both write the value UTF-8 encoded, even if the layer is some different encoding, such as the example above.
Ideally, all of these operators would completely ignore the :utf8 state, working only with bytes, but this would result in silently breaking existing code. To avoid this a future version of perl will throw an exception when any of sysread(), recv(), syswrite() or send() are called on handle with the :utf8 layer. So yeah, this whole :utf8 situation is giving "we need to fix this but can't just yet" energy. π«
Performance Enhancements β‘π₯
Perl said "let me make things faster" and honestly? She ate. π
- The overhead of scope entry and exit has been considerably reduced, so for example subroutine calls, loops and basic blocks are all faster now. This empty function call now takes about a third less time to execute:
sub f{} f();
- Many languages, such as Chinese, are caseless. Perl now knows about most common ones, and skips much of the work when a program tries to change case in them (like
ucfirst()) or match caselessly (qr//i). This will speed up a program, such as a web server, that can operate on multiple languages, while it is operating on a caseless one. /fixed-substr/has been made much faster.
On platforms with a libc memchr() implementation which makes good use of underlying hardware support, patterns which include fixed substrings will now often be much faster; for example with glibc on a recent x86_64 CPU, this:
$s = "a" x 1000 . "wxyz";
$s =~ /wxyz/ for 1..30000
is now about 7 times faster. On systems with slow memchr(), e.g. 32-bit ARM Raspberry Pi, there will be a small or little speedup. Conversely, some pathological cases, such as ""ab" x 1000 =~ /aa/" will be slower now; up to 3 times slower on the rPi, 1.5x slower on x86_64.
- Faster addition, subtraction and multiplication.
Since 5.8.0, arithmetic became slower due to the need to support 64-bit integers. To deal with 64-bit integers, a lot more corner cases need to be checked, which adds time. We now detect common cases where there is no need to check for those corner cases, and special-case them.
- Preincrement, predecrement, postincrement, and postdecrement have been made faster by internally splitting the functions which handled multiple cases into different functions.
- Creating Perl debugger data structures (see "Debugger Internals" in perldebguts) for XSUBs and const subs has been removed. This removed one glob/scalar combo for each unique
.cfile that XSUBs and const subs came from. On startup (perl -e"0") about half a dozen glob/scalar debugger combos were created. Loading XS modules created more glob/scalar combos. These things were being created regardless of whether the perl debugger was being used, and despite the fact that it can't debug C code anyway - On Win32,
stating or-Xing a path, if the file or directory does not exist, is now 3.5x faster than before. - Single arguments in list assign are now slightly faster:
($x) = (...);
(...) = ($x);
- Less peak memory is now used when compiling regular expression patterns.
π Modules and Pragmata π
β¨ Updated Modules and Pragmata β¨
okay bestie, the glow-up list is LONG and i'm literally obsessed. every single one of these got a version bump, no cap:
arybaseβ has been upgraded from version0.10to0.11. πAttribute::Handlersβ has been upgraded from version0.97to0.99. β¨autodieβ has been upgraded from version2.26to2.29. πautouseβ has been upgraded from version1.08to1.11. π¦Bβ has been upgraded from version1.58to1.62. πΈB::Deparseβ has been upgraded from version1.35to1.37. πbaseβ has been upgraded from version2.22to2.23. π«ΆBenchmarkβ has been upgraded from version1.2to1.22. π₯bignumβ has been upgraded from version0.39to0.42. πbytesβ has been upgraded from version1.04to1.05. πCarpβ has been upgraded from version1.36to1.40. βCompress::Raw::Bzip2β has been upgraded from version2.068to2.069. πCompress::Raw::Zlibβ has been upgraded from version2.068to2.069. πConfig::Perl::Vβ has been upgraded from version0.24to0.25. πCPAN::Metaβ has been upgraded from version2.150001to2.150005. π§CPAN::Meta::Requirementsβ has been upgraded from version2.132to2.140. πCPAN::Meta::YAMLβ has been upgraded from version0.012to0.018. β¨Data::Dumperβ has been upgraded from version2.158to2.160. πDevel::Peekβ has been upgraded from version1.22to1.23. πDevel::PPPortβ has been upgraded from version3.31to3.32. π¦Dumpvalueβ has been upgraded from version1.17to1.18. πΈDynaLoaderβ has been upgraded from version1.32to1.38. πEncodeβ has been upgraded from version2.72to2.80. π«Άencodingβ has been upgraded from version2.14to2.17. π₯encoding::warningsβ has been upgraded from version0.11to0.12. πEnglishβ has been upgraded from version1.09to1.10. πErrnoβ has been upgraded from version1.23to1.25. βexperimentalβ has been upgraded from version0.013to0.016. πExtUtils::CBuilderβ has been upgraded from version0.280221to0.280225. πExtUtils::Embedβ has been upgraded from version1.32to1.33. πExtUtils::MakeMakerβ has been upgraded from version7.04_01to7.10_01. π§ExtUtils::ParseXSβ has been upgraded from version3.28to3.31. πExtUtils::Typemapsβ has been upgraded from version3.28to3.31. β¨featureβ has been upgraded from version1.40to1.42. πfieldsβ has been upgraded from version2.17to2.23. πFile::Findβ has been upgraded from version1.29to1.34. π¦File::Globβ has been upgraded from version1.24to1.26. πΈFile::Pathβ has been upgraded from version2.09to2.12_01. πFile::Specβ has been upgraded from version3.56to3.63. π«ΆFilter::Util::Callβ has been upgraded from version1.54to1.55. π₯Getopt::Longβ has been upgraded from version2.45to2.48. πHash::Utilβ has been upgraded from version0.18to0.19. πHash::Util::FieldHashβ has been upgraded from version1.15to1.19. βHTTP::Tinyβ has been upgraded from version0.054to0.056. πI18N::Langinfoβ has been upgraded from version0.12to0.13. πifβ has been upgraded from version0.0604to0.0606. πIOβ has been upgraded from version1.35to1.36. π§IO-Compressβ has been upgraded from version2.068to2.069. πIPC::Open3β has been upgraded from version1.18to1.20. β¨IPC::SysVβ has been upgraded from version2.04to2.06_01. πList::Utilβ has been upgraded from version1.41to1.42_02. πlocaleβ has been upgraded from version1.06to1.08. π¦Locale::Codesβ has been upgraded from version3.34to3.37. πΈMath::BigIntβ has been upgraded from version1.9997to1.999715. πMath::BigInt::FastCalcβ has been upgraded from version0.31to0.40. π«ΆMath::BigRatβ has been upgraded from version0.2608to0.260802. π₯Module::CoreListβ has been upgraded from version5.20150520to5.20160320. πModule::Metadataβ has been upgraded from version1.000026to1.000031. πmroβ has been upgraded from version1.17to1.18. βODBM_Fileβ has been upgraded from version1.12to1.14. πOpcodeβ has been upgraded from version1.32to1.34. πparentβ has been upgraded from version0.232to0.234. πParse::CPAN::Metaβ has been upgraded from version1.4414to1.4417. π§Perl::OSTypeβ has been upgraded from version1.008to1.009. πperlfaqβ has been upgraded from version5.021009to5.021010. β¨PerlIO::encodingβ has been upgraded from version0.21to0.24. πPerlIO::mmapβ has been upgraded from version0.014to0.016. πPerlIO::scalarβ has been upgraded from version0.22to0.24. π¦PerlIO::viaβ has been upgraded from version0.15to0.16. πΈPod::Functionsβ has been upgraded from version1.09to1.10. πPod::Perldocβ has been upgraded from version3.25to3.25_02. π«ΆPod::Simpleβ has been upgraded from version3.29to3.32. π₯Pod::Usageβ has been upgraded from version1.64to1.68. πPOSIXβ has been upgraded from version1.53to1.65. πScalar::Utilβ has been upgraded from version1.41to1.42_02. βSDBM_Fileβ has been upgraded from version1.13to1.14. πSelfLoaderβ has been upgraded from version1.22to1.23. πSocketβ has been upgraded from version2.018to2.020_03. πStorableβ has been upgraded from version2.53to2.56. π§strictβ has been upgraded from version1.09to1.11. πTerm::ANSIColorβ has been upgraded from version4.03to4.04. β¨Term::Capβ has been upgraded from version1.15to1.17. πTestβ has been upgraded from version1.26to1.28. πTest::Harnessβ has been upgraded from version3.35to3.36. π¦Thread::Queueβ has been upgraded from version3.05to3.08. πΈthreadsβ has been upgraded from version2.01to2.06. πthreads::sharedβ has been upgraded from version1.48to1.50. π«ΆTie::Fileβ has been upgraded from version1.01to1.02. π₯Tie::Scalarβ has been upgraded from version1.03to1.04. πTime::HiResβ has been upgraded from version1.9726to1.9732. πTime::Pieceβ has been upgraded from version1.29to1.31. βUnicode::Collateβ has been upgraded from version1.12to1.14. πUnicode::Normalizeβ has been upgraded from version1.18to1.25. πUnicode::UCDβ has been upgraded from version0.61to0.64. πUNIVERSALβ has been upgraded from version1.12to1.13. π§utf8β has been upgraded from version1.17to1.19. πversionβ has been upgraded from version0.9909to0.9916. β¨warningsβ has been upgraded from version1.32to1.36. πWin32β has been upgraded from version0.51to0.52. πWin32API::Fileβ has been upgraded from version0.1202to0.1203. π¦XS::Typemapβ has been upgraded from version0.13to0.14. πΈXSLoaderβ has been upgraded from version0.20to0.21. π
πΈ Documentation πΈ
π Changes to Existing Documentation π
π perlapi π
- the whole "using undocumented globals" thing is now documented: namely, that one should send email to
perl5-porters@perl.org<mailto:perl5-porters@perl.org> first to get the go-ahead for documenting and using an undocumented function or global variable. π
π perlcall π
- a number of cleanups have been made to
perlcall, including:- use
"EXTEND(SP, n)"andPUSHs()instead ofXPUSHs()where applicable and update prose to match β¨ - add
POPu,POPulandPOPpbytexto the "complete list of POP macros" and clarify the documentation for some of the existing entries, and a note about side-effects π - add API documentation for
POPuandPOPulπ - use
ERRSVmore efficiently π¦ - approaches to thread-safety storage of SVs. π
- use
π perlfunc π
- the documentation of
"hex"has been revised to clarify valid inputs. π’ - better explain meaning of negative PIDs in
"waitpid". [GH #15108] <https://github.com/Perl/perl5/issues/15108> π - general cleanup: there's more consistency now (in POD usage, grammar, code examples), better practices in code examples (use of
"my", removal of bareword filehandles, dropped usage of"&"when calling subroutines, ...), etc. π§Ή
π perlguts π
- a new section has been added, "Dynamic Scope and the Context Stack" in
perlguts, which explains how the perl context stack works. π₯
π perllocale π
- a stronger caution about using locales in threaded applications is given. locales are not thread-safe, and you can get wrong results or even segfaults if you use them there. π
π perlmodlib π
- we now recommend contacting the module-authors list or PAUSE in seeking guidance on the naming of modules. π
π perlop π
- the documentation of
"qx//"now describes how$?is affected. β
π perlpolicy π
- this note has been added to
perlpolicy:
While civility is required, kindness is encouraged; if you have any doubt about whether you are being civil, simply ask yourself, "Am I being kind?" and aspire to that.
π«Ά
π perlreftut π
- fix some examples to be strict clean. π§Ό
π perlrebackslash π
- clarify that in languages like Japanese and Thai, dictionary lookup is required to determine word boundaries. π
π perlsub π
- updated to note that anonymous subroutines can have signatures. βοΈ
π perlsyn π
- fixed a broken example where
"="was used instead of"=="in conditional in do/while example. π
π perltie π
- the usage of
"FIRSTKEY"and"NEXTKEY"has been clarified. ππ
π perlunicode π
- discourage use of 'In' as a prefix signifying the Unicode Block property. π«
π perlvar π
- the documentation of
$@was reworded to clarify that it is not just for syntax errors in"eval". [GH #14572] <https://github.com/Perl/perl5/issues/14572> π¬ - the specific true value of
$!{E...}is now documented, noting that it is subject to change and not guaranteed. β οΈ - use of
$OLD_PERL_VERSIONis now discouraged. π ββοΈ
π perlxs π
- the documentation of
"PROTOTYPES"has been corrected; they are disabled by default, not enabled. ββ
π DIAGNOSTICS π
ok so this is where perl talks back to you β all the warnings and fatal errors, the whole "hey bestie ur code is doing something" collection. Everything new and everything that got a glow-up lives here. Want the complete list of diagnostic messages? That's perldiag, go read it, i'll wait π«Ά
π New Diagnostics π
π New Errors π
%s must not be a named sequence in transliteration operatorCan't find Unicode property definition "%s" in regex;Can't redeclare "%s" in "%s"Character following \p must be '{' or a single-character Unicode property name in regex;Empty \%c in regex; marked by <-- HERE in m/%s/Illegal user-defined property nameInvalid number '%s' for -C option.Sequence (?... not terminated in regex; marked by <-- HERE in m/%s/Sequence (?P<... not terminated in regex; marked by <-- HERE in m/%s/Sequence (?P>... not terminated in regex; marked by <-- HERE in m/%s/
β οΈ New Warnings β οΈ
Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in m/%s/%s() is deprecated on :utf8 handles
π Changes to Existing Diagnostics π
- Accessing the
"IO"part of a glob as"FILEHANDLE"instead of"IO"is no longer deprecated. It's discouraged tho β purely so everything stays uniform (so like, you can grep more easily, iykyk) β but bestie, it is not getting removed. [GH #15105] https://github.com/Perl/perl5/issues/15105 - The diagnostic
"Hexadecimal float: internal error"got a lil upgrade: it's now"Hexadecimal float: internal error (%s)"so it can spill extra info at you. π Can't modify non-lvalue subroutine call of &%s
This one now actually names the non-lvalue subroutine you tried to use as an lvalue. so helpful of it honestly π
- When you ran out of memory while perl was trying to increase the stack size, it used to just die with the absolutely cryptic nonsense message
"panic: av_extend_guts() negative count (-9223372036854775681)". That's fixed now and instead you get the way prettier:Out of memory during stack extendβ¨
π οΈ Configuration and Compilation π οΈ
"Configure"now acts like the-Ooption is always passed, which lets command line options override saved configuration. The goal? No more confusion when your command line options get silently ignored for no obvious reason π-Ois now permitted, but it's also just... ignored. periodt.- Bison 3.0 is now supported. slay.
- Configure no longer probes for
libnmby default. Originally that was the "New Math" library, but the name got re-used by the GNOME NetworkManager. [GH #15115] https://github.com/Perl/perl5/issues/15115 - Added Configure probes for
"newlocale","freelocale", and"uselocale". π¦ "PPPort.so/PPPort.dll"no longer get installed, because"PPPort.pm"doesn't use them β only its test files do.- It's now possible to pick which compilation date shows up on
"perl -V"output, by setting the macro"PERL_BUILD_DATE". - Using the
"NO_HASH_SEED"define together with the default hash algorithm"PERL_HASH_FUNC_ONE_AT_A_TIME_HARD"caused a fatal error while compiling the interpreter, and it had been like that since Perl 5.17.10. Fixed. π - Configure should handle spaces in paths a little better now.
- No longer generates EBCDIC POSIX-BC tables. As far as anyone knows, nobody is running Perl and POSIX-BC together rn, and skipping these tables saves time during development and makes the resulting tar ball smaller. win-win honestly πΈ
- The GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
- You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
- The Win32 miniperl now has a real
"getcwd", which boosts build performance β resulting ingetcwd()being 605x faster in Win32 miniperl. 605x. no cap. π₯ - Configure now takes
"-Dusequadmath"into account when calculating the"alignbytes"configuration variable. Before this, the mis-calculated"alignbytes"could cause alignment errors on debugging builds. [perl #127894]
π§ͺ Testing π§ͺ
- A new test (
t/op/aassign.t) has been added to test the list assignment operator"OP_AASSIGN". we love a dedicated test file π - Parallel building has been added to the dmake
"makefile.mk"makefile. All Win32 compilers are supported. π
πΈ Platform Support πΈ
okay bestie, we're deep in the platform lore now π every OS got a little something in this release, and honestly? the range is giving "we love every child equally." let's go.
π Platform-Specific Notes π
π AmigaOS
- The AmigaOS port has been reintegrated into the main tree, based off of Perl 5.22.1. welcome home girl π«Ά
π¦ Cygwin
- Tests are more robust against unusual
cygdriveprefixes. [GH #15076]https://github.com/Perl/perl5/issues/15076
π EBCDIC
β¨ UTF-EBCDIC extended
UTF-EBCDIC is like UTF-8, but for EBCDIC platforms. It now has been extended so that it can represent code points up to 2 ** 64 - 1 on platforms with 64-bit words. This brings it into parity with UTF-8. β¨
heads up though β this enhancement requires an incompatible change to the representation of code points in the range2 ** 30to2 ** 31 -1(the latter was the previous maximum representable code point). This means that a file that contains one of these code points, written out with previous versions of perl cannot be read in, without conversion, by a perl containing this change. π
We do not believe any such files are in existence, but if you do have one, submit a ticket at perlbug@perl.org, and we will write a conversion script for you. π
β¨ EBCDIC cmp() and sort() fixed for UTF-EBCDIC strings
Comparing two strings that were both encoded in UTF-8 (or more precisely, UTF-EBCDIC) did not work properly until now. Since sort() uses cmp(), this fixes that as well. slay π₯
β¨ EBCDIC tr/// and y/// fixed for \N{}, and use utf8 ranges
Perl v5.22 introduced the concept of portable ranges to regular expression patterns. A portable range matches the same set of characters no matter what platform is being run on. This concept is now extended to tr///. See tr///. π
There were also some problems with these operations under use utf8, which are now fixed.
πΈ FreeBSD
- Use the
fdclose()function from FreeBSD if it is available. [GH #15082]https://github.com/Perl/perl5/issues/15082
π IRIX
- Under some circumstances IRIX stdio
fgetc()andfread()set theerrnotoENOENT, which made no sense according to either IRIX or POSIX docs. Errno is now cleared in such cases. [GH #14557]https://github.com/Perl/perl5/issues/14557 - Problems when multiplying long doubles by infinity have been fixed. [GH #14993]
https://github.com/Perl/perl5/issues/14993
π MacOS X
- Until now OS X builds of perl have specified a link target of
10.3(Panther, 2003) but have not specified a compiler target. From now on, builds of perl on OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X version and specify that as the explicit build target in both compiler and linker flags, thus preserving binary compatibility for extensions built later regardless of changes in OS X, SDK, or compiler and linker versions. To override the default value used in the build and preserved in the flags, specifyexport MACOSX_DEPLOYMENT_TARGET=10.Nbefore configuring and building perl, where10.Nis the version of OS X you wish to target. In OS X 10.5 or earlier there is no change to the behavior present when those systems were current; the link target is still OS X10.3and there is no explicit compiler target. π― - Builds with both
-DDEBUGGINGand threading enabled would fail with apanic: free from wrong poolerror when built or tested from Terminal on OS X. This was caused by perl's internal management of the environment conflicting with anatforkhandler using the libcsetenv()function to update the environment.
Perl now uses setenv()/unsetenv() to update the environment on OS X. [GH #14955] https://github.com/Perl/perl5/issues/14955
β Solaris
- All Solaris variants now build a shared libperl π
Solaris and variants like OpenIndiana now always build with the shared Perl library (Configure -Duseshrplib). This was required for the OpenIndiana builds, but this has also been the setting for Oracle/Sun Perl builds for several years.
π§ Tru64
- Workaround where Tru64 balks when prototypes are listed as
PERL_STATIC_INLINE, but where the test is build with-DPERL_NO_INLINE_FUNCTIONS.
π VMS
- On VMS, the math function prototypes in
math.hare now visible under C++. Now building the POSIX extension with C++ will no longer crash. π - VMS has had
setenv/unsetenvsince v7.0 (released in 1996),Perl_vmssetenvnow always usessetenv/unsetenv. - Perl now implements its own
killpgby scanning for processes in the specified process group, which may not mean exactly the same thing as a Unix process group, but allows us to send a signal to a parent (or master) process and all of its sub-processes. At the perl level, this means we can now send a negative pid like so:
kill SIGKILL, -$pid;
to signal all processes in the same group as $pid. bestie that's main character energy fr fr π
- For those
%ENVelements based on the CRTL environ array, we've always preserved case when setting them but did look-ups only after upcasing the key first, which made lower- or mixed-case entries go missing. This problem has been corrected by making%ENVelements derived from the environ array case-sensitive on look-up as well as case-preserving on store. - Environment look-ups for
PERL5LIBandPERLLIBpreviously only considered logical names, but now consider all sources of%ENVas determined byPERL_ENV_TABLESand as documented in%ENVin perlvms. - The minimum supported version of VMS is now v7.3-2, released in 2003. As a side effect of this change, VAX is no longer supported as the terminal release of OpenVMS VAX was v7.3 in 2001. rip VAX π
πͺ Win32
- A new build option
USE_NO_REGISTRYhas been added to the makefiles. This option is off by default, meaning the default is to do Windows registry lookups. This option stops Perl from looking inside the registry for anything. For what values are looked up in the registry see perlwin32. Internally, in C, the name of this option isWIN32_NO_REGISTRY. - The behavior of Perl using
HKEY_CURRENT_USER\Software\PerlandHKEY_LOCAL_MACHINE\Software\Perlto lookup certain values, including%ENVvars starting withPERLhas changed. Previously, the 2 keys were checked for entries at all times through the perl process's life time even if they did not exist. For performance reasons, now, if the root key (i.e.HKEY_CURRENT_USER\Software\PerlorHKEY_LOCAL_MACHINE\Software\Perl) does not exist at process start time, it will not be checked again for%ENVoverride entries for the remainder of the perl process's life. This more closely matches Unix behavior in that the environment is copied or inherited on startup and changing the variable in the parent process or another process or editing.bashrcwill not change the environmental variable in other existing, running, processes. β¨ - One glob fetch was removed for each
-Xorstatcall whether done from Perl code or internally from Perl's C code. The glob being looked up was${^WIN32_SLOPPY_STAT}which is a special variable. This makes-Xandstatslightly faster. π₯ - During miniperl's process startup, during the build process, 4 to 8 IO calls related to the process starting .pl and the
buildcustomize.plfile were removed from the code opening and executing the first 1 or 2 .pl files. - Builds using Microsoft Visual C++ 2003 and earlier no longer produce an
INTERNAL COMPILER ERRORmessage. [perl #126045] - Visual C++ 2013 builds will now execute on XP and higher. Previously they would only execute on Vista and higher.
- You can now build perl with GNU Make and GCC. [perl #123440]
truncate($filename, $size)now works for files over 4GB in size. [perl #125347]- Parallel building has been added to the dmake
makefile.mkmakefile. All Win32 compilers are supported. - Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would result in an invalid
$Config{archname}for the resulting perl. [perl #127584] - Errors set by Winsock functions are now put directly into
$^E, and the relevantWSAE*error codes are now exported from the Errno and POSIX modules for testing this against.
The previous behavior of putting the errors (converted to POSIX-style E* error codes since Perl 5.20.0) into $! was buggy due to the non-equivalence of like-named Winsock and POSIX error constants, a relationship between which has unfortunately been established in one way or another since Perl 5.8.0.
The new behavior provides a much more robust solution for checking Winsock errors in portable software without accidentally matching POSIX tests that were intended for other OSes and may have different meanings for Winsock.
The old behavior is currently retained, warts and all, for backwards compatibility, but users are encouraged to change any code that tests$!againstE*constants for Winsock errors to instead test$^EagainstWSAE*constants. After a suitable deprecation period, the old behavior may be removed, leaving$!unchanged after Winsock function calls, to avoid any possible confusion over which error variable to check. π
π¦ ppc64el
β¨ floating point
The floating point format of ppc64el (Debian naming for little-endian PowerPC) is now detected correctly. ate that π
π¦ INTERNAL CHANGES π¦
okay bestie this section is the deep-lore, behind-the-scenes stuff. it's giving plumbing. but it matters if you write XS, so let's go π
- the implementation of perl's context stack system, and its internal API, have been heavily reworked. and listen β no significant changes have been made to any external APIs, but XS code that relies on these internal details may need to be fixed. the main changes are:
- the
PUSHBLOCK(),POPSUB()etc. macros have been replaced with static inline functions such ascx_pushblock(),cx_popsub()etc. these use function args rather than implicitly relying on local vars such asgimmeandnewspbeing available. also their functionality has changed: in particular,cx_popblock()no longer decrementscxstack_ix. the ordering of the steps in thepp_leave*functions involvingcx_popblock(),cx_popsub()etc. has changed. see the new documentation, "Dynamic Scope and the Context Stack" in perlguts, for details on how to use them. π - various macros, which now consistently have a
CX_prefix, have been added:
- the
CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
or renamed:
CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
cx_pushblock()now savesPL_savestack_ixandPL_tmps_floor, sopp_enter*andpp_leave*no longer do
ENTER; SAVETMPS; ....; LEAVE
cx_popblock()now also restoresPL_curpm. β¨- in
dounwind()for every context type, the current savestack frame is now processed before each context is popped; formerly this was only done for sub-like context frames. this action has been removed fromcx_popsub()and placed into its own macro,CX_LEAVE_SCOPE(cx), which must be called beforecx_popsub()etc.
dounwind() now also does a cx_popblock() on the last popped frame (formerly it only did the cx_popsub() etc. actions on each frame).
- the temps stack is now freed on scope exit; previously, temps created during the last statement of a block wouldn't be freed until the next
nextstatefollowing the block (apart from an existing hack that did this for recursive subs in scalar context); and in something likef(g()), the temps created by the last statement in g() would formerly not be freed until the statement following the return from f(). π€ - most values that were saved on the savestack on scope entry are now saved in suitable new fields in the context struct, and saved and restored directly by
cx_pushfoo()andcx_popfoo(), which is much faster. π₯ - various context struct fields have been added, removed or modified.
- the handling of
@_incx_pushsub()andcx_popsub()has been considerably tidied up, including removing theargarrayfield from the context struct, and extracting out some common (but rarely used) code into a separate function,clear_defarray(). also, useful subsets ofcx_popsub()which had been unrolled in places likepp_gotohave been gathered into the new functionscx_popsub_args()andcx_popsub_common(). pp_leavesubandpp_leavesublvnow use the same function as the rest of thepp_leave*'s to process return args.CXp_FOR_PADandCXp_FOR_GVflags have been added, andCXt_LOOP_FORhas been split intoCXt_LOOP_LIST,CXt_LOOP_ARY. π- some variables formerly declared by
dMULTICALL(but not documented) have been removed.
- the obscure
PL_timesbufvariable, effectively a vestige of Perl 1, has been removed. it was documented as deprecated in Perl 5.20, with a statement that it would be removed early in the 5.21.x series; that has now finally happened. [GH #13632] <https://github.com/Perl/perl5/issues/13632> - an unwarranted assertion in
Perl_newATTRSUB_x()has been removed. if a stub subroutine definition with a prototype has been seen, then any subsequent stub (or definition) of the same subroutine with an attribute was causing an assertion failure because of a null pointer. [GH #15081] <https://github.com/Perl/perl5/issues/15081> ::has been replaced by__inExtUtils::ParseXS, like it's done for parameters/return values. this is more consistent, and simplifies writing XS code wrapping C++ classes into a nested Perl namespace (it requires only a typedef forFoo__Barrather than two, one forFoo_Barand the other forFoo::Bar). π- the
to_utf8_case()function is now deprecated. instead usetoUPPER_utf8,toTITLE_utf8,toLOWER_utf8, andtoFOLD_utf8. (See <http://nntp.perl.org/group/perl.perl5.porters/233287>.) - Perl core code and the threads extension have been annotated so that, if Perl is configured to use threads, then during compile-time clang (3.6 or later) will warn about suspicious uses of mutexes. see <http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more information.
- the
signbit()emulation has been enhanced. this will help older and/or more exotic platforms or configurations. π«Ά - most EBCDIC-specific code in the core has been unified with non-EBCDIC code, to avoid repetition and make maintenance easier.
- MSWin32 code for
$^Xhas been moved out of the win32 directory tocaretx.c, where other operating systems set that variable. sv_ref()is now part of the API. β¨sv_backoffin perlapi had its return type changed frominttovoid. it previously has always returned 0 since Perl 5.000 stable but that was undocumented. althoughsv_backoffis marked as public API, XS code is not expected to be impacted since the proper API call would be through public APIsv_setsv(sv, &PL_sv_undef), or quasi-publicSvOOK_off, or non-publicSvOK_offcalls, and the return value ofsv_backoffwas previously a meaningless constant that can be rewritten as(sv_backoff(sv),0).- the
EXTENDandMEXTENDmacros have been improved to avoid various issues with integer truncation and wrapping. in particular, some casts formerly used within the macros have been removed. this means for example that passing an unsignednitemsargument is likely to raise a compiler warning now (it's always been documented to require a signed value; formerly int, lately SSize_t). PL_sawaliasandGPf_ALIASED_SVhave been removed.GvASSIGN_GENERATIONandGvASSIGN_GENERATION_sethave been removed.
β SELECTED BUG FIXES β
the glow-up era fr fr, look at all these fixes π
- it now works properly to specify a user-defined property, such as
qr/\p{mypkg1::IsMyProperty}/i
with /i caseless matching, an explicit package name, and IsMyProperty not defined at the time of the pattern compilation.
- Perl's
memcpy(),memmove(),memset()andmemcmp()fallbacks are now more compatible with the originals. [perl #127619] - fixed the issue where a
s///rwith-DPERL_NO_COWattempts to modify the source SV, resulting in the program dying. [perl #127635] π - fixed an EBCDIC-platform-only case where a pattern could fail to match. this occurred when matching characters from the set of C1 controls when the target matched string was in UTF-8.
- narrow the filename check in
strict.pmandwarnings.pm. previously, it assumed that if the filename (without the.pmc?extension) differed from the package name, if was a misspelled use statement (i.e.use Strictinstead ofuse strict). we now check whether there's really a miscapitalization happening, and not some other issue. π - turn an assertion into a more user friendly failure when parsing regexes. [perl #127599]
- correctly raise an error when trying to compile patterns with unterminated character classes while there are trailing backslashes. [perl #126141].
- line numbers larger than
2**31-1but less than2**32are no longer returned bycaller()as negative numbers. [perl #126991] unless ( assignment )now properly warns when syntax warnings are enabled. [perl #127122]- setting an
ISAglob to an array reference now properly addsisaelemmagic to any existing elements. previously modifying such an element would not update the ISA cache, so method calls would call the wrong function. Perl would also crash if theISAglob was destroyed, since new code added in 5.23.7 would try to release theisaelemmagic from the elements. [perl #127351] - if a here-doc was found while parsing another operator, the parser had already read end of file, and the here-doc was not terminated, perl could produce an assertion or a segmentation fault. this now reliably complains about the unterminated here-doc. [perl #125540]
untie()would sometimes return the last value returned by theUNTIE()handler as well as its normal value, messing up the stack. [perl #126621] π- fixed an operator precedence problem when
castflags & 2is true. [perl #127474] - caching of
DESTROYmethods could result in a non-pointer or a non-STASH stored in theSvSTASH()slot of a stash, breaking theBSTASH()method. theDESTROYmethod is now cached in the MRO metadata for the stash. [perl #126410] - the
AUTOLOADmethod is now called when searching for aDESTROYmethod, and correctly sets$AUTOLOADtoo. [perl #124387] [perl #127494] π - avoid parsing beyond the end of the buffer when processing a
#linedirective with no filename. [perl #127334] - Perl now raises a warning when a regular expression pattern looks like it was supposed to contain a POSIX class, like
qr/[[:alpha:]]/, but there was some slight defect in its specification which causes it to instead be treated as a regular bracketed character class. an example would be missing the second colon in the above like this:qr/[[:alpha]]/. this compiles to match a sequence of two characters. the second is], and the first is any of:[,:,a,h,l, orp. this is unlikely to be the intended meaning, and now a warning is raised. no warning is raised unless the specification is very close to one of the 14 legal POSIX classes. (See "POSIX Character Classes" in perlrecharclass.) [perl #8904] - certain regex patterns involving a complemented POSIX class in an inverted bracketed character class, and matching something else optionally would improperly fail to match. an example of one that could fail is
qr/_?[^\Wbar]\x{100}/. this has been fixed. [perl #127537] π - Perl 5.22 added support for the C99 hexadecimal floating point notation, but bestie, sometimes it would misparse hex floats. That's fixed now.
[perl #127183] - A regression that let undeclared barewords work as hash keys even with strictures on has been fixed. Rude of it, honestly.
[GH #15099]https://github.com/Perl/perl5/issues/15099 - Calls to the placeholder
&PL_sv_yesthat perl uses internally when animport()orunimport()method isn't found now correctly handle scalar context.[GH #14902]https://github.com/Perl/perl5/issues/14902 - Now we report more context when we see an array where we expected an operator, and we dodge an assertion failure while we're at it.
[GH #14472]https://github.com/Perl/perl5/issues/14472 - Modifying an array that used to be a package
@ISAno longer causes assertion failures or crashes. π[GH #14492]https://github.com/Perl/perl5/issues/14492 - Binary compatibility is retained across plain and
DEBUGGINGperl builds.[GH #15122]https://github.com/Perl/perl5/issues/15122 - No more memory leaks when you set
$ENV{foo}on darwin.[GH #14955]https://github.com/Perl/perl5/issues/14955 /...\G/no longer crashes on utf8 strings. Here's the tea: when\Gis a fixed number of characters from the start of the regex, perl needs to count back that many characters from the currentpos()position and start matching from there. But it was counting back bytes instead of characters, which could lead to panics on utf8 strings. Not anymore. π- In some cases, operators that return integers would return negative integers as large positive integers.
[GH #15049]https://github.com/Perl/perl5/issues/15049 - The
pipe()operator would assert forDEBUGGINGbuilds instead of producing the correct error message. The condition it asserted on is detected and reported on correctly without the assertions, so the assertions were removed.[GH #15015]https://github.com/Perl/perl5/issues/15015 - In some cases, failing to parse a here-doc would attempt to use freed memory. This was caused by a pointer not being restored correctly.
[GH #15009]https://github.com/Perl/perl5/issues/15009 @x = sort { *a = 0; $a <=> $b } 0 .. 1no longer frees the GP for*abefore restoring its SV slot.[GH #14595]https://github.com/Perl/perl5/issues/14595- Multiple problems with the new hexadecimal floating point
printfformat%awere fixed:[GH #15032]https://github.com/Perl/perl5/issues/15032,[GH #15033]https://github.com/Perl/perl5/issues/15033,[GH #15074]https://github.com/Perl/perl5/issues/15074 - Calling
mg_set()inleave_scope()no longer leaks. β¨ - A regression from Perl v5.20 was fixed in which debugging output of regular expression compilation was wrong. (The pattern was correctly compiled, but what got displayed for it was wrong.) iykyk, it's giving "the vibes were off but the math was mathing."
\b{sb}works much better. In Perl v5.22.0, this new construct didn't seem to give the expected results, yet it passed all the tests in the extensive suite furnished by Unicode. Turns out that was because those were short input strings, and the failures had to do with longer inputs. π¦- Certain syntax errors in "Extended Bracketed Character Classes" in perlrecharclass caused panics instead of the proper error message. This has now been fixed.
[perl #126481] - Perl 5.20 added a message when a quantifier in a regular expression was useless, but then caused the parser to skip it; this caused the surplus quantifier to be silently ignored, instead of throwing an error. This is now fixed.
[perl #126253] - The switch to building non-XS modules last in
win32/makefile.mk(introduced by design as part of the changes to enable parallel building) caused the build ofPOSIXto break due to problems with theversionmodule. This is now fixed. - Improved parsing of hex float constants. π₯
- Fixed an issue with
packwherepack "H"(andpack "h") could read past the source when given a non-utf8 source, and a utf8 target.[perl #126325] - Fixed several cases where perl would abort due to a segmentation fault, or a C-level assert.
[perl #126615],[perl #126602],[perl #126193]. - There were places in regular expression patterns where comments (
(?#...)) weren't allowed, but should have been. This is now fixed.[GH #12755]https://github.com/Perl/perl5/issues/12755 - Some regressions from Perl 5.20 have been fixed, in which some syntax errors in
(?[...])constructs within regular expression patterns could cause a segfault instead of a proper error message.[GH #14933]https://github.com/Perl/perl5/issues/14933[GH #14996]https://github.com/Perl/perl5/issues/14996 - Another problem with
(?[...])constructs has been fixed wherein things like\c]could cause panics.[GH #14934]https://github.com/Perl/perl5/issues/14934 - Some problems with attempting to extend the perl stack to around 2G or 4G entries have been fixed. This was particularly an issue on 32-bit perls built to use 64-bit integers, and was easily noticeable with the list repetition operator, e.g.
@a = (1) x $big_number
Formerly perl may have crashed, depending on the exact value of $big_number; now it will typically raise an exception. [GH #14880] https://github.com/Perl/perl5/issues/14880
- In a regex conditional expression
(?(condition)yes-pattern|no-pattern), if the condition is(?!)then perl failed the match outright instead of matching the no-pattern. This has been fixed.[GH #14947]https://github.com/Perl/perl5/issues/14947 - The special backtracking control verbs
(*VERB:ARG)now all allow an optional argument and setREGERROR/REGMARKappropriately as well.[GH #14937]https://github.com/Perl/perl5/issues/14937 - Several bugs, including a segmentation fault, have been fixed with the boundary checking constructs (introduced in Perl 5.22)
\b{gcb},\b{sb},\b{wb},\B{gcb},\B{sb}, and\B{wb}. All the\B{}ones now match an empty string; none of the\b{}ones do.[GH #14976]https://github.com/Perl/perl5/issues/14976 - Duplicating a closed file handle for write no longer creates a filename of the form
GLOB(0xXXXXXXXX).[perl #125115] - Warning fatality is now ignored when rewinding the stack. This prevents infinite recursion when the now fatal error also causes rewinding of the stack.
[perl #123398] - In perl v5.22.0, the logic changed when parsing a numeric parameter to the
-Coption, such that the successfully parsed number was not saved as the option value if it parsed to the end of the argument.[perl #125381] - The
PadlistNAMESmacro is an lvalue again. π - Zero
-DPERL_TRACE_OPSmemory for sub-threads.
perl_clone_using() was missing Zero init of PL_op_exec_cnt[]. This caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly large op-counts at destruct. These counts would print %x as "ABABABAB", clearly a mem-poison value.
- A leak in the XS typemap caused one scalar to be leaked each time a
FILE *or aPerlIO *wasOUTPUT:ed or imported to Perl, since perl 5.000. These particular typemap entries are thought to be extremely rarely used by XS modules.[perl #124181] alarm()andsleep()will now warn if the argument is a negative number and return undef. Previously they would pass the negative value to the underlying C function which may have set up a timer with a surprising value. π- Perl can again be compiled with any Unicode version. This used to (mostly) work, but was lost in v5.18 through v5.20. The property
Name_Aliasdid not exist prior to Unicode 5.0. Unicode::UCD incorrectly said it did. This has been fixed. - Very large code-points (beyond Unicode) in regular expressions no longer cause a buffer overflow in some cases when converted to UTF-8.
[GH #14858]https://github.com/Perl/perl5/issues/14858 - The integer overflow check for the range operator (
...) in list context now correctly handles the case where the size of the range is larger than the address space. This could happen on 32-bits with-Duse64bitint.[GH #14843]https://github.com/Perl/perl5/issues/14843 - A crash with
%::=(); J->${\"::"}has been fixed.[GH #14790]https://github.com/Perl/perl5/issues/14790 qr/(?[ () ])/no longer segfaults, giving a syntax error message instead.[perl #125805]- Regular expression possessive quantifier v5.20 regression now fixed.
qr/PAT{min,max}+/is supposed to behave identically toqr/(?>PAT{min,max})/. Since v5.20, this didn't work if min and max were equal.[perl #125825] BEGIN <>no longer segfaults and properly produces an error message.[perl #125341]- In
tr///an illegal backwards range liketr/\x{101}-\x{100}//was not always detected, giving incorrect results. This is now fixed. π
π ACKNOWLEDGEMENTS π
okay so this is the part where we all clap for the girlies and the theydies and the entire group chat of humans who built this π
Perl 5.24.0 represents approximately 11 months of development since Perl 5.24.0 and contains approximately 360,000 lines of changes across 1,800 files from 75 authors. (yes bestie, that's the number, that's what it says, we don't ask questions, we just vibe π«Ά)
Excluding auto-generated files, documentation and release tools, there were approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h files. that is so many files. iconic behavior fr fr π₯
Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.24.0 β roll call, everybody say thank you ππ:
- Aaron Crane
- Aaron Priven
- Abigail
- Achim Gratz
- Alexander D'Archangel
- Alex Vandiver
- Andreas KΓΆnig
- Andy Broad
- Andy Dougherty
- Aristotle Pagaltzis
- Chase Whitener
- Chas. Owens
- Chris 'BinGOs' Williams
- Craig A. Berry
- Dagfinn Ilmari MannsΓ₯ker
- Dan Collins
- Daniel Dragan
- David Golden
- David Mitchell
- Doug Bell
- Dr.Ruud
- Ed Avis
- Ed J
- Father Chrysostomos
- Herbert Breunung
- H.Merijn Brand
- Hugo van der Sanden
- Ivan Pozdeev
- James E Keenan
- Jan Dubois
- Jarkko Hietaniemi
- Jerry D. Hedden
- Jim Cromie
- John Peacock
- John SJ Anderson
- Karen Etheridge
- Karl Williamson
- kmx
- Leon Timmermans
- Ludovic E. R. Tolhurst-Cleaver
- Lukas Mai
- Martijn Lievaart
- Matthew Horsfall
- Mattia Barbon
- Max Maischein
- Mohammed El-Afifi
- Nicholas Clark
- Nicolas R.
- Niko Tyni
- Peter John Acklam
- Peter Martini
- Peter Rabbitson
- Pip Cet
- Rafael Garcia-Suarez
- Reini Urban
- Ricardo Signes
- Sawyer X
- Shlomi Fish
- Sisyphus
- Stanislaw Pusep
- Steffen MΓΌller
- Stevan Little
- Steve Hay
- Sullivan Beck
- Thomas Sibley
- Todd Rinaldo
- Tom Hukins
- Tony Cook
- Unicode Consortium
- Victor Adam
- Vincent Pit
- Vladimir Timofeev
- Yves Orton
- Zachary Storer
- Zefram
lowkey important caveat: 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 the (very much appreciated) contributors who reported issues to the Perl bug tracker. so if you're not on here, bestie, you're still a whole legend, no cap π₯Ίπ
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. πΈ the CPAN girlies really carried, and we love them for it.
For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution. go read it, it's giving β¨ history β¨.
π REPORTING BUGS π
okay so if you find what you think is a bug β first of all, mood, second of all, here's the plan π
You might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at https://rt.perl.org/. There may also be information at http://www.perl.org/, the Perl Home Page. (yes bestie, click around, the answer is probably already sitting there being a main character π)
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 β we are begging you, not a 4,000 line wall of vibes, just the tiny one that reproduces it π«Ά. 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.
β οΈ and if the bug you are reporting has security implications which make it inappropriate to send to a publicly archived mailing list, then please see"SECURITY VULNERABILITY CONTACT INFORMATION"inperlsecfor details of how to report the issue. do NOT just blast it in the group chat, bestie, this is the one time we keep it in the DMs ππ
π SEE ALSO π
- The
Changesfile for an explanation of how to view exhaustive details on what changed. (exhaustive. she said exhaustive. and she meant it π) - The
INSTALLfile for how to build Perl. - The
READMEfile for general stuff. - The
ArtisticandCopyingfiles for copyright information.
and that's a wrap on PERL5240DELTA(1) π ty for reading the whole thing, you ate, no crumbs left. this page ships as perl v5.42.3, dated 2026-08-03, so if you're quoting it in the group chat, cite it properly and keep slaying β¨ππ¦
π¦ 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