PERL5200DELTA(1perl)
π PERL5200DELTA π
okay bestie, welcome to perl5200delta, part of the Perl Programmers Reference Guide β¨
πΈ NAME πΈ
perl5200delta β what's new for perl v5.20.0 π
π¦ DESCRIPTION π¦
This doc spills the tea on every difference between the 5.18.0 release and the 5.20.0 release. glow up era π
If you're upgrading from something even older, like 5.16.0, bestie you gotta read perl5180delta first β that one covers the 5.16.0 β 5.18.0 differences. one at a time, we don't skip chapters π
π Core Enhancements π
β¨ Experimental Subroutine signatures β¨
Declarative syntax that unwraps your argument list straight into lexical variables. like, sub foo ($a,$b) {...} checks how many arguments you passed and then drops them into lexical variables. easy.
But listen β signatures are not equivalent to the existing idiom sub foo { my($a,$b) = @_; ... }. different thing, don't conflate them π
Signatures are only available by enabling a non-default feature, and they generate warnings about being experimental. The syntactic clash with prototypes is handled by disabling the short prototype syntax whenever signatures are enabled.
See "Signatures" in perlsub for the details, iykyk.
π "sub"s now take a "prototype" attribute π
When you declare or define a sub, you can now specify the prototype inside a prototype attribute instead of in the parens after the name. cute!
So for example, sub foo($$){} could be rewritten as sub foo : prototype($$){}. slay β¨
π More consistent prototype parsing π
Multiple semicolons in subroutine prototypes have long been tolerated and treated as a single semicolon. There was exactly one case where that didn't happen. A subroutine whose prototype begins with * or ;* can affect whether a bareword counts as a method name or a sub call. This now applies also to ;;;*. consistency, we love to see it π
Whitespace has long been allowed inside subroutine prototypes, so sub( $ $ ) is equivalent to sub($$), but until now it got stripped when the subroutine was parsed. Which means whitespace was not allowed in prototypes set by Scalar::Util::set_prototype. Now it is permitted, and the parser no longer strips whitespace. So prototype &mysub returns the original prototype, whitespace and all. periodt π«Ά
β "rand" now uses a consistent random number generator β
Previously perl would use a platform specific random number generator, varying between the libc rand(), random() or drand48().
Which meant the quality of perl's random numbers would vary from platform to platform β from the 15 bits of rand() on Windows to 48-bits on POSIX platforms such as Linux with drand48(). the inconsistency was giving chaos π
Perl now uses its own internal drand48() implementation on all platforms. That said, this does not make perl's rand cryptographically secure. no cap. [perl #115928]
π New slice syntax π
The new %hash{...} and %array[...] syntax returns a list of key/value (or index/value) pairs. See "Key/Value Hash Slices" in perldata. it's giving convenience π
π§ Experimental Postfix Dereferencing π§
When the postderef feature is in effect, these syntactical equivalencies get set up:
$sref->$*; # same as ${ $sref } # interpolates
$aref->@*; # same as @{ $aref } # interpolates
$href->%*; # same as %{ $href }
$cref->&*; # same as &{ $cref }
$gref->**; # same as *{ $gref }
$aref->$#*; # same as $#{ $aref }
$gref->*{ $slot }; # same as *{ $gref }{ $slot }
$aref->@[ ... ]; # same as @$aref[ ... ] # interpolates
$href->@{ ... }; # same as @$href{ ... } # interpolates
$aref->%[ ... ]; # same as %$aref[ ... ]
$href->%{ ... }; # same as %$href{ ... }
Those marked as interpolating only interpolate if the associated postderef_qq feature is also enabled. This feature is experimental and will trigger experimental::postderef-category warnings when used, unless they are suppressed. β οΈ
For more info, go read the Postfix Dereference Syntax section of perlref.
π Unicode 6.3 now supported π
Perl now supports and is shipped with Unicode 6.3 (though Perl may be recompiled with any previous Unicode release as well). A detailed list of Unicode 6.3 changes lives at http://www.unicode.org/versions/Unicode6.3.0/. π¦
πΈ New "\p{Unicode}" regular expression pattern property πΈ
This is a synonym for \p{Any} and matches the set of Unicode-defined code points 0 - 0x10FFFF. yes bestie, all of them π
π₯ Better 64-bit support π₯
On 64-bit platforms, the internal array functions now use 64-bit offsets, allowing Perl arrays to hold more than 2**31 elements, if you have the memory available. big array energy.
The regular expression engine now supports strings longer than 2**31 characters. [perl #112790, #116907]
The functions PerlIO_get_bufsiz, PerlIO_get_cnt, PerlIO_set_cnt and PerlIO_set_ptrcnt now have SSize_t, rather than int, return values and parameters. glow up for the types β¨
π "use locale" now works on UTF-8 locales π
Until this release, only single-byte locales β like the ISO 8859 series β were supported. Now the increasingly common multi-byte UTF-8 locales are also supported. A UTF-8 locale is one in which the character set is Unicode and the encoding is UTF-8.
The POSIX LC_CTYPE category operations (case changing (like lc(), "\U"), and character classification ("\w", "\D", qr/[[:punct:]]/)) under such a locale work just as if not under locale, but instead as if under use feature 'unicode_strings', except taint rules are followed.
Sorting remains by code point order in this release. [perl #56820].
π "use locale" now compiles on systems without locale ability π
Previously doing this caused the program to not compile. now it does, iconic π
Within its scope the program behaves as if in the C locale. So programs written for platforms that support locales can run on locale-less platforms without change. Attempts to change the locale away from the C locale will, of course, fail. that's just how it is π
π More locale initialization fallback options π
If there was an error with locales during Perl start-up, it immediately gave up and tried to use the C locale. Now it first tries using other locales given by the environment variables, as detailed in "ENVIRONMENT" in perllocale.
For example, if LC_ALL and LANG are both set, and using the LC_ALL locale fails, Perl will now try the LANG locale, and only if that fails will it fall back to C. On Windows machines, Perl will try β ahead of using C β the system default locale if all the locales given by environment variables fail. try, try, fallback, bestie πͺ
β "-DL" runtime option now added for tracing locale setting β
This is designed for Perl core developers to aid in field debugging bugs regarding locales. dev-mode only, iykyk π
π -F now implies -a and -a implies -n π
Previously -F without -a was a no-op, and -a without -n or -p was a no-op. With this change, if you supply -F then both -a and -n are implied, and if you supply -a then -n is implied.
You can still use -p for its extra behaviour. [perl #116190] π«Ά
π $a and $b warnings exemption π
The special variables $a and $b, used in sort, are now exempt from used once warnings, even where sort is not used. This makes it easier for CPAN modules to provide functions using $a and $b for similar purposes. [perl #120462] no more false alarms, we stan π
π‘οΈ Security π‘οΈ
π Avoid possible read of free()d memory during parsing π
It was possible that free()d memory could be read during parsing in the unusual circumstance of the Perl program ending with a heredoc and the last line of the file on disk having no terminating newline character.
This has now been fixed. πβ‘οΈπ
π₯ Incompatible Changes π₯
Okay so this is the part of the changelog where we say goodbye to stuff. Grab a snack, bestie, because some of these are lowkey going to affect code out there. π
π€ "do" can no longer be used to call subroutines π€
The do SUBROUTINE(LIST) form has been throwing a deprecation warning ever since perl v5.0.0 β and now? It's a full-blown syntax error. Not a vibe, not a warning, just no. Periodt. π
β¨ Quote-like escape changes β¨
- The character that follows
"\c"in a double-quoted string ("..."orqq(...)) or in a regular expression has to be a printable character now, and it may not be"{". - A literal
"{"after"\B"or"\b"is now fatal. π
Both of these were already deprecated back in perl v5.14.0, so like... we saw this coming, fr fr.
π«§ Tainting happens under more circumstances; now conforms to documentation π«§
This one hits regular expression matching and changing the case of a string (lc, \U, etc.) inside the scope of use locale. The result is now tainted based on the operation, no matter what the string actually contained β exactly like the documentation (perlsec, "SECURITY" in perllocale) says it should be. Previously, for the case change operation, if the string held no characters whose case change could be affected by the locale, the result would not get tainted. So for example, the result of uc() on an empty string, or on a string containing only above-Latin1 code points, is now tainted β and it wasn't before. Net result: way more consistent tainting behavior. π
Regular expression patterns taint their non-binary results (like $&, $2) if and only if the pattern contains elements whose matching depends on the current (potentially tainted) locale. Just like the case changing functions, the actual contents of the string being matched no longer matter β formerly it did. So if your pattern contains a \w, the results will be tainted even if the match didn't have to touch that portion of the pattern to succeed or fail, because what a \w matches depends on the locale. However β and this is the fun part β a . in a pattern will not enable tainting, because the dot matches any single character, and the current locale doesn't change in any way what matches and what doesn't. Iconic, honestly.
π¦ "\p{}", "\P{}" matching has changed for non-Unicode code points π¦
\p{} and \P{} are defined by Unicode only on Unicode-defined code points (U+0000 through U+10FFFF). Their behavior on matching those legal Unicode code points is unchanged, but there are changes for code points 0x110000 and above. Previously, Perl treated the result of matching \p{} and \P{} against these as undef, which translates into false. For \P{}, this was then complemented into true. A warning was supposed to be raised when this happened. But plot twist: various optimizations could prevent the warning, and the results were often counter-intuitive, with both a match and its seeming complement being false. π΅βπ«
Now all non-Unicode code points are treated as typical unassigned Unicode code points. This generally is more Do-What-I-Mean. A warning is raised only if the results are arguably different from a strict Unicode approach, and from what Perl used to do. Code that needs to be strictly Unicode compliant can make this warning fatal, and then Perl always raises the warning.
Details are in "Beyond Unicode code points" in perlunicode. Go read it, iykyk. π
πΈ "\p{All}" has been expanded to match all possible code points πΈ
The Perl-defined regular expression pattern element \p{All}, unused on CPAN, used to match just the Unicode code points; now it matches all possible code points β meaning it's equivalent to qr/./s. So \p{All} is no longer synonymous with \p{Any}, which continues to match just the Unicode code points, as Unicode says it should.
π Data::Dumper's output may change π
Depending on the data structures dumped and the settings set for Data::Dumper, the dumped output may have changed from previous versions.
If you have tests that depend on the exact output of Data::Dumper, they may fail. π
To avoid this problem in your code, test against the data structure from evaluating the dumped structure, instead of the dump itself.
π Locale decimal point character no longer leaks outside of use locale scope π
This is actually a bug fix, but some code has come to rely on the bug being present, so this change is listed here. The current locale that the program is running under is not supposed to be visible to Perl code except within the scope of a use locale. However, until now under certain circumstances, the character used for a decimal point (often a comma) leaked outside the scope. If your code is affected by this change, simply add a use locale. Easy fix, bestie. π«Ά
π Assignments of Windows sockets error codes to $! now prefer errno.h values over WSAGetLastError() values π
Buckle up, this one's a whole essay. π
In previous versions of Perl, Windows sockets error codes as returned by WSAGetLastError() were assigned to $!, and some constants such as ECONNABORTED, not in errno.h in VC++ (or the various Windows ports of gcc) were defined to corresponding WSAE* values to allow $! to be tested against the E* constants exported by Errno and POSIX.
This worked well until VC++ 2010 and later, which introduced new E* constants with values > 100 into errno.h, including some being (re)defined by perl to WSAE* values. That caused problems when linking XS code against other libraries which used the original definitions of errno.h constants.
To avoid this incompatibility, perl now maps WSAE* error codes to E* values where possible, and assigns those values to $!. The E* constants exported by Errno and POSIX are updated to match so that testing $! against them, wherever previously possible, will continue to work as expected, and all E* constants found in errno.h are now exported from those modules with their original errno.h values.
In order to avoid breakage in existing Perl code which assigns WSAE* values to $!, perl now intercepts the assignment and performs the same mapping to E* values as it uses internally when assigning to $! itself.
However, one backwards-incompatibility remains: existing Perl code which compares $! against the numeric values of the WSAE* error codes that were previously assigned to $! will now be broken in those cases where a corresponding E* value has been assigned instead. This is only an issue for those E* values < 100, which were always exported from Errno and POSIX with their original errno.h values, and therefore could not be used for WSAE* error code tests (e.g. WSAEINVAL is 10022, but the corresponding EINVAL is 22). (E* values > 100, if present, were redefined to WSAE* values anyway, so compatibility can be achieved by using the E* constants, which will work both before and after this change, albeit using different numeric values under the hood.)
π§ Functions PerlIO_vsprintf and PerlIO_sprintf have been removed π§
These two functions, undocumented, unused in CPAN, and problematic, have been removed. Booted. Evicted. Not on the guest list anymore. π
π¬ Deprecations π¬
Deprecations are basically the "we're not mad, we're just disappointed" of changelogs. Enjoy. β¨
π
The /\C/ character class π
The /\C/ regular expression character class is deprecated. From perl 5.22 onwards it will generate a warning, and from perl 5.24 onwards it will be a regular expression compiler 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.
π Literal control characters in variable names π
This deprecation affects things like $\cT, where \cT is a literal control (such as a NAK or NEGATIVE ACKNOWLEDGE character) in the source code. Surprisingly, it appears that originally this was intended as the canonical way of accessing variables like $^T, with the caret form only being added as an alternative.
The literal control form is being deprecated for two main reasons. It has what are likely unfixable bugs, such as $\cI not working as an alias for $^I, and their usage not being portable to non-ASCII platforms: While $^T will work everywhere, \cT is whitespace in EBCDIC. [perl #119123]
π«§ References to non-integers and non-positive integers in $/ π«§
Setting $/ to a reference to zero or a reference to a negative integer is now deprecated, and will behave exactly as though it was set to undef. If you want slurp behavior set $/ to undef explicitly.
Setting $/ to a reference to a non integer is now forbidden and will throw an error. Perl has never documented what would happen in this context and while it used to behave the same as setting $/ to the address of the references in future it may behave differently, so we have forbidden this usage.
π Character matching routines in POSIX π
Use of any of these functions in the POSIX module is now deprecated: isalnum, isalpha, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, and isxdigit. The functions are buggy and don't work on UTF-8 encoded strings. See their entries in POSIX for more information.
A warning is raised on the first call to any of them from each place in the code that they are called. (Hence a repeated statement in a loop will raise just the one warning.) So like, one warning per spot, not one warning per loop iteration β noted. π
π Interpreter-based threads are now discouraged π
The "interpreter-based threads" provided by Perl are not the fast, lightweight system for multitasking that one might expect or hope for. Threads are implemented in a way that make them easy to misuse. Few people know how to use them correctly or will be able to provide help.
The use of interpreter-based threads in perl is officially discouraged.
π Module removals π
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 the planned removal of these modules from core does not reflect a judgement about the quality of the code and should not be taken as a suggestion that their use be halted. Their disinclusion from core primarily hinges on their necessity to bootstrapping a fully functional, CPAN-capable Perl installation, not on concerns over their design.
- CGI and its associated CGI:: packages
- inc::latest
- Package::Constants
- Module::Build and its associated Module::Build:: packages
π§Ή Utility removals π§Ή
The following utilities will be removed from the core distribution in a future release, and will at that time need to be installed from CPAN.
- find2perl
- s2p
- a2p
β‘ PERFORMANCE ENHANCEMENTS β‘
okay bestie, buckle up, this section is literally just perl going zoom π¨
- Perl got a whole new copy-on-write mechanism that means it avoids copying the internal string buffer whenever you assign one scalar to another. so copying big chonky strings looks way faster now. but here's the tea β if you modify one of the two (or more) strings after that assignment, it forces a copy internally. which means it's lowkey unnecessary to pass strings by reference just for efficiency. iconic behavior tbh.
this feature was already available in 5.18.0, it just wasn't enabled by default. now it is the default, so you don't need to build perl with this Configure argument anymore:
-Accflags=-DPERL_NEW_COW
wait no, let me say that again properly bestie, it's:
-Accflags=-DPERL_NEW_COPY_ON_WRITE
and if you wanna disable it (for now, key word for now) in a perl build, you do:
-Accflags=-DPERL_NO_COW
also on some operating systems Perl can be compiled in such a way that any attempt to modify string buffers shared by multiple SVs will crash π. that's intentional actually β it lets XS authors test that their modules handle copy-on-write scalars correctly. see "Copy on Write" in perlguts for the detail, iykyk.
- Perl has an optimizer for regular expression patterns π. it analyzes the pattern to find stuff like the minimum length a string has to be to match, etc. and now it handles code points that are above the Latin1 range way better. slay.
- Executing a regex that contains the
"^"anchor (or its variant under the"/m"flag) has been made much faster in several situations. periodt. - Precomputed hash values are now used in more places during method lookup. no cap.
- Constant hash key lookups β that's
$hash{key}as opposed to$hash{$key}β have long had the internal hash value computed at compile time, to speed up lookup. and this optimisation has only now been applied to hash slices as well. we love an overdue glow-up π . - Combined
"and"and"or"operators in void context, like the ones generated for"unless ($a && $b)"and"if ($a || b)", now short circuit directly to the end of the statement.[perl #120128] - In certain situations, when
"return"is the last statement in a subroutine's main scope, it will be optimized out. which means code like:
sub baz { return $cat; }
will now behave like:
sub baz { $cat; }
which is notably faster. π
[perl #120765]
- Code like:
my $x; # or @x, %x
my $y;
is now optimized to:
my ($x, $y);
and when you combine that with the padrange optimization introduced in v5.18.0, it means longer uninitialized my variable statements get optimized too, so:
my $x; my @y; my %z;
becomes:
my ($x, @y, %z);
[perl #121077]
- The creation of certain sorts of lists β including array and hash slices β is now faster β¨.
- The optimisation for arrays indexed with a small constant integer is now applied for integers in the range
-128..127, rather than0..255. so this should speed up Perl code using expressions like$x[-1], at the expense of (presumably much rarer) code using expressions like$x[200]. trade-offs, bestie, trade-offs. - The first iteration over a large hash (using
"keys"or"each") is now faster π. how, you ask? by preallocating the hash's internal iterator state, rather than lazily creating it when the hash is first iterated. (for small hashes, the iterator is still created only when first needed. the assumption here is that small hashes are more likely to be used as objects, and therefore never allocated. for large hashes, that's less likely to be true, and the cost of allocating the iterator is swamped by the cost of allocating space for the hash itself.) the reasoning is giving very much big-brain fr fr. - When doing a global regex match on a string that came from the
"readline"or"<>"operator, the data is no longer copied unnecessarily.[perl #121259]π - Dereferencing (as in
"$obj->[0]"or"$obj->{k}") is now faster when$objis an instance of a class that has overloaded methods, but doesn't overload any of the dereferencing methods"@{}","%{}", and so on. so specific, so valid. - Perl's optimiser no longer skips optimising code that follows certain
"eval {}"expressions (including those with an apparent infinite loop). ngl that one's kinda funny, an infinite loop getting optimized π. - The implementation now does a better job of avoiding meaningless work at runtime. internal effect-free
"null"operations (created as a side-effect of parsing Perl programs) are normally deleted during compilation. that deletion is now applied in some situations that weren't previously handled. glow-up for the compiler π«Ά. - Perl now does less disk I/O when dealing with Unicode properties that cover up to three ranges of consecutive code points. your SSD says thank you πΈ.
π Modules and Pragmata π
Okay bestie, sit down, hydrate, because this is the big one. Every module and pragma that got a glow-up (or showed up brand new) in this release. Yes, it's a lot. Yes, we're doing all of them. No skipping. π
β¨ New Modules and Pragmata β¨
experimental0.007β brand new, freshly added to the Perl core πIO::Socket::IP0.29β also new, also in core, we love a debut π
π« Updated Modules and Pragmata π«
So many glow-ups. Every single one listed, in order, fr fr.
Archive::Tarβ upgraded from version1.90to1.96arybaseβ upgraded from version0.06to0.07Attribute::Handlersβ upgraded from version0.94to0.96attributesβ upgraded from version0.21to0.22autodieβ upgraded from version2.13to2.23AutoLoaderβ upgraded from version5.73to5.74autouseβ upgraded from version1.07to1.08Bβ upgraded from version1.42to1.48B::Conciseβ upgraded from version0.95to0.992B::Debugβ upgraded from version1.18to1.19B::Deparseβ upgraded from version1.20to1.26baseβ upgraded from version2.18to2.22Benchmarkβ upgraded from version1.15to1.18bignumβ upgraded from version0.33to0.37Carpβ upgraded from version1.29to1.3301CGIβ upgraded from version3.63to3.65
NOTE: CGI is deprecated and may be removed from a future version of Perl. It's giving legacy. π
charnamesβ upgraded from version1.36to1.40Class::Structβ upgraded from version0.64to0.65Compress::Raw::Bzip2β upgraded from version2.060to2.064Compress::Raw::Zlibβ upgraded from version2.060to2.065Config::Perl::Vβ upgraded from version0.17to0.20constantβ upgraded from version1.27to1.31CPANβ upgraded from version2.00to2.05CPAN::Metaβ upgraded from version2.120921to2.140640CPAN::Meta::Requirementsβ upgraded from version2.122to2.125CPAN::Meta::YAMLβ upgraded from version0.008to0.012Data::Dumperβ upgraded from version2.145to2.151DBβ upgraded from version1.04to1.07DB_Fileβ upgraded from version1.827to1.831DBM_Filterβ upgraded from version0.05to0.06deprecateβ upgraded from version0.02to0.03Devel::Peekβ upgraded from version1.11to1.16Devel::PPPortβ upgraded from version3.20to3.21diagnosticsβ upgraded from version1.31to1.34Digest::MD5β upgraded from version2.52to2.53Digest::SHAβ upgraded from version5.84to5.88DynaLoaderβ upgraded from version1.18to1.25Encodeβ upgraded from version2.49to2.60encodingβ upgraded from version2.6_01to2.12Englishβ upgraded from version1.06to1.09$OLD_PERL_VERSIONwas added as an alias of$]π«
Errnoβ upgraded from version1.18to1.20_03Exporterβ upgraded from version5.68to5.70ExtUtils::CBuilderβ upgraded from version0.280210to0.280216ExtUtils::Commandβ upgraded from version1.17to1.18ExtUtils::Embedβ upgraded from version1.30to1.32ExtUtils::Installβ upgraded from version1.59to1.67ExtUtils::MakeMakerβ upgraded from version6.66to6.98ExtUtils::Miniperlβ upgraded from version (yes, literally blank, no cap π) to1.01ExtUtils::ParseXSβ upgraded from version3.18to3.24ExtUtils::Typemapsβ upgraded from version3.19to3.24ExtUtils::XSSymSetβ upgraded from version1.2to1.3featureβ upgraded from version1.32to1.36fieldsβ upgraded from version2.16to2.17File::Basenameβ upgraded from version2.84to2.85File::Copyβ upgraded from version2.26to2.29File::DosGlobβ upgraded from version1.10to1.12File::Fetchβ upgraded from version0.38to0.48File::Findβ upgraded from version1.23to1.27File::Globβ upgraded from version1.20to1.23File::Specβ upgraded from version3.40to3.47File::Tempβ upgraded from version0.23to0.2304FileCacheβ upgraded from version1.08to1.09Filter::Simpleβ upgraded from version0.89to0.91Filter::Util::Callβ upgraded from version1.45to1.49Getopt::Longβ upgraded from version2.39to2.42Getopt::Stdβ upgraded from version1.07to1.10Hash::Util::FieldHashβ upgraded from version1.10to1.15HTTP::Tinyβ upgraded from version0.025to0.043I18N::Langinfoβ upgraded from version0.10to0.11I18N::LangTagsβ upgraded from version0.39to0.40ifβ upgraded from version0.0602to0.0603inc::latestβ upgraded from version0.4003to0.4205
NOTE: inc::latest is deprecated and may be removed from a future version of Perl. Living on borrowed time bestie π
integerβ upgraded from version1.00to1.01IOβ upgraded from version1.28to1.31IO::Compress::Gzipand friends β upgraded from version2.060to2.064(the whole squad came through π«Ά)IPC::Cmdβ upgraded from version0.80to0.92IPC::Open3β upgraded from version1.13to1.16IPC::SysVβ upgraded from version2.03to2.04JSON::PPβ upgraded from version2.27202to2.27203List::Utilβ upgraded from version1.27to1.38localeβ upgraded from version1.02to1.03Locale::Codesβ upgraded from version3.25to3.30Locale::Maketextβ upgraded from version1.23to1.25Math::BigIntβ upgraded from version1.9991to1.9993Math::BigInt::FastCalcβ upgraded from version0.30to0.31Math::BigRatβ upgraded from version0.2604to0.2606MIME::Base64β upgraded from version3.13to3.14Module::Buildβ upgraded from version0.4003to0.4205
NOTE: Module::Build is deprecated and may be removed from a future version of Perl. π₯
Module::CoreListβ upgraded from version2.89to3.10(it knows what shipped when, iconic behavior honestly)Module::Loadβ upgraded from version0.24to0.32Module::Load::Conditionalβ upgraded from version0.54to0.62Module::Metadataβ upgraded from version1.000011to1.000019mroβ upgraded from version1.11to1.16Net::Pingβ upgraded from version2.41to2.43Opcodeβ upgraded from version1.25to1.27Package::Constantsβ upgraded from version0.02to0.04
NOTE: Package::Constants is deprecated and may be removed from a future version of Perl. π
Params::Checkβ upgraded from version0.36to0.38parentβ upgraded from version0.225to0.228Parse::CPAN::Metaβ upgraded from version1.4404to1.4414Perl::OSTypeβ upgraded from version1.003to1.007perlfaqβ upgraded from version5.0150042to5.0150044PerlIOβ upgraded from version1.07to1.09PerlIO::encodingβ upgraded from version0.16to0.18PerlIO::scalarβ upgraded from version0.16to0.18PerlIO::viaβ upgraded from version0.12to0.14Pod::Escapesβ upgraded from version1.04to1.06Pod::Functionsβ upgraded from version1.06to1.08Pod::Htmlβ upgraded from version1.18to1.21Pod::Parserβ upgraded from version1.60to1.62Pod::Perldocβ upgraded from version3.19to3.23Pod::Usageβ upgraded from version1.61to1.63POSIXβ upgraded from version1.32to1.38_03reβ upgraded from version0.23to0.26Safeβ upgraded from version2.35to2.37Scalar::Utilβ upgraded from version1.27to1.38SDBM_Fileβ upgraded from version1.09to1.11Socketβ upgraded from version2.009to2.013Storableβ upgraded from version2.41to2.49strictβ upgraded from version1.07to1.08(still watching you π)subsβ upgraded from version1.01to1.02Sys::Hostnameβ upgraded from version1.17to1.18Sys::Syslogβ upgraded from version0.32to0.33Term::Capβ upgraded from version1.13to1.15Term::ReadLineβ upgraded from version1.12to1.14Test::Harnessβ upgraded from version3.26to3.30Test::Simpleβ upgraded from version0.98to1.001002Text::ParseWordsβ upgraded from version3.28to3.29Text::Tabsβ upgraded from version2012.0818to2013.0523Text::Wrapβ upgraded from version2012.0818to2013.0523Threadβ upgraded from version3.02to3.04Thread::Queueβ upgraded from version3.02to3.05threadsβ upgraded from version1.86to1.93threads::sharedβ upgraded from version1.43to1.46Tie::Arrayβ upgraded from version1.05to1.06Tie::Fileβ upgraded from version0.99to1.00(hitting the big one-oh-oh β¨)Tie::Hashβ upgraded from version1.04to1.05Tie::Scalarβ upgraded from version1.02to1.03Tie::StdHandleβ upgraded from version4.3to4.4Time::HiResβ upgraded from version1.9725to1.9726Time::Pieceβ upgraded from version1.20_01to1.27Unicode::Collateβ upgraded from version0.97to1.04Unicode::Normalizeβ upgraded from version1.16to1.17Unicode::UCDβ upgraded from version0.51to0.57utf8β upgraded from version1.10to1.13versionβ upgraded from version0.9902to0.9908vmsishβ upgraded from version1.03to1.04warningsβ upgraded from version1.18to1.23Win32β upgraded from version0.47to0.49XS::Typemapβ upgraded from version0.10to0.13XSLoaderβ upgraded from version0.16to0.17
And that's the whole roster, every last one, accounted for. π«‘
π Documentation π
Periodt, bestie, the docs got some GLOW UPS this release and honestly? It's giving "we finally wrote down the thing we've been doing for ten years." π
β¨ New Documentation β¨
πΈ perlrepository
Okay so story time: this doc got removed in Perl v5.14 β like, actually it was renamed to perlgit and given a major overhaul β and that little disappearing act caused Perl documentation websites to keep showing the now out-of-date version from Perl v5.12 as the latest version. π Embarrassing. It has now been restored in stub form, and its whole job is directing readers to current information. Iconic low-effort comeback, we love it. π«Ά
π Changes to Existing Documentation π
π¦ perldata
- New sections have been added to document the new index/value array slice and key/value hash slice syntax.
π perldebguts
- The
DB::gotoandDB::lsubdebugger subroutines are now documented. [perl #77680] π
β perlexperiment
"\s"matching"\cK"is marked experimental.- ithreads were accepted in v5.8.0 (but are discouraged as of v5.20.0). π¬
- Long doubles are not considered experimental.
- Code in regular expressions, regular expression backtracking verbs, and lvalue subroutines are no longer listed as experimental. (This also affects
perlreandperlsub.)
π perlfunc
"chop"and"chomp"now note that they can reset the hash iterator."exec"'s handling of arguments is now more clearly documented."eval EXPR"now has caveats about expanding floating point numbers in some locales."goto EXPR"is now documented to handle an expression that evaluates to a code reference as if it was"goto &$coderef". This behavior is at least ten years old. π (not us documenting a decade-old behavior, nope)- Since Perl v5.10, it has been possible for subroutines in
@INCto return a reference to a scalar holding initial source code to prepend to the file. This is now documented. - The documentation of
"ref"has been updated to recommend the use of"blessed","isa"and"reftype"when dealing with references to blessed objects.
π§ perlguts
- Numerous minor changes have been made to reflect changes made to the perl internals in this release.
- New sections on Read-Only Values and Copy on Write have been added. π
π perlhack
- The Super Quick Patch Guide section has been updated.
π perlhacktips
- The documentation has been updated to include some more examples of
"gdb"usage.
π perllexwarn
- The
perllexwarndocumentation used to describe the hierarchy of warning categories understood by thewarningspragma. That description has now been moved to thewarningsdocumentation itself, leavingperllexwarnas a stub that points to it. This change consolidates all documentation for lexical warnings in a single place. One source of truth, we're obsessed. β¨
πΈ perllocale
- The documentation now mentions
fc()and"\F", and includes many clarifications and corrections in general.
π perlop
- The language design of Perl has always called for monomorphic operators. This is now mentioned explicitly.
π«Ά perlopentut
- The
"open"tutorial has been completely rewritten by Tom Christiansen, and now focuses on covering only the basics, rather than providing a comprehensive reference to all things openable. This rewrite came as the result of a vigorous discussion on perl5-porters kicked off by a set of improvements written by Alexander Hartmaier to the existingperlopentut. A "more than you ever wanted to know about "open"" document may follow in subsequent versions of perl. π
π₯ perlre
- The fact that the regexp engine makes no effort to call
(?{})and(??{})constructs any specified number of times (although it will basically DWIM in case of a successful match) has been documented. - The
"/r"modifier (for non-destructive substitution) is now documented. [perl #119151] - The documentation for
"/x"and"(?# comment)"has been expanded and clarified.
β perlreguts
- The documentation has been updated in the light of recent changes to
regcomp.c.
π¦ perlsub
- The need to predeclare recursive functions with prototypes in order for the prototype to be honoured in the recursive call is now documented. [perl #2726]
- A list of subroutine names used by the perl implementation is now included. [perl #77680]
π§ perltrap
- There is now a JavaScript section. π
π perlunicode
- The documentation has been updated to reflect
"Bidi_Class"changes in Unicode 6.3.
π perlvar
- A new section explaining the performance issues of
$``,$&and$'`, including workarounds and changes in different versions of Perl, has been added. - Three English variable names which have long been documented but do not actually exist have been removed from the documentation. These were
$OLD_PERL_VERSION,$OFMT, and$ARRAY_BASE.
(Actually, "OLD_PERL_VERSION" does exist, starting with this revision, but remained undocumented until perl 5.22.0.) π
π perlxs
- Several problems in the
"MY_CXT"example have been fixed.
π©Ί DIAGNOSTICS π©Ί
okay so bestie, this is the part where Perl learns to talk to you. π«Ά Here's every addition and change to diagnostic output β warnings, fatal errors, the whole vibe. For the full β¨completeβ¨ list of diagnostic messages, go peek at perldiag. iykyk.
πΈ New Diagnostics πΈ
π New Errors
delete argument is index/value array slice, use array sliceβ (F) bestie you literally passed index/value array slice syntax (%array[...]) todelete. no cap, you probably meant@array[...]with an@sign instead. it's giving typo energy. πdelete argument is key/value hash slice, use hash sliceβ (F) same situation but for hashes: you handeddeletethe key/value hash slice syntax (%hash{...}). you almost certainly meant@hash{...}, with an@. one character, huge difference, we've all been there. πMagical list constants are not supportedβ (F) so you assigned a magical array to a stash element and then tried to use the subroutine from that same slot. you're asking Perl to do something it genuinely cannot do, and the details are subject to change between Perl versions. it's not you, it's the internals. πAdded Setting $/ to a %s reference is forbiddenβ yeah. that. forbidden. β
β οΈ New Warnings
%s on reference is experimentalβ the "auto-deref" feature is experimental, periodt.
Starting in v5.14.0, it was possible to use push, pop, keys, and other built-in functions not only on aggregate types, but on references to them. The feature was not deployed to its original intended specification, and now may become redundant to postfix dereferencing. It has always been categorized as an experimental feature, and in v5.20.0 it carries a warning as such. π¨
Warnings will now be issued at compile time when these operations are detected.
no if $] >= 5.01908, warnings => "experimental::autoderef";
Consider, though, replacing the use of these features, as they may change behavior again before becoming stable. π
A sequence of multiple spaces in a charnames alias definition is deprecatedandTrailing white-space in a charnames alias definition is deprecatedβ these two deprecation warnings involving"\N{...}"were incorrectly implemented. They didn't warn by default (now they do π€) and could not be made fatal viause warnings FATAL => 'deprecated'(now they can π ).Attribute prototype(%s) discards earlier prototype attribute in same subβ (W misc) a sub got declared likesub foo : prototype(A) : prototype(B) {}, for example. Since each sub can only have one prototype, the earlier declaration(s) get discarded while the last one is applied. last one wins, that's the rule. πInvalid \0 character in %s for %s: %s\0%sβ (W syscalls) embedded\0characters in pathnames or other system call arguments produce a warning as of 5.20. The parts after the\0were formerly ignored by system calls. not anymore bestie πMatched non-Unicode code point 0x%X against Unicode property; may not be portable.β this replaces the messageCode point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed. glow-up fr fr β¨Missing ']' in prototype for %s : %sβ (W illegalproto) a grouping was started with[but never closed with]. you opened a bracket and just... walked away. iconic but no. πPossible precedence issue with control flow operatorβ (W syntax) there's a possible problem with mixing a control flow operator (e.g.return) and a low-precedence operator likeor. Consider:
sub { return $a or $b; }
This is parsed as:
sub { (return $a) or $b; }
Which is effectively just:
sub { return $a; }
Either use parentheses or the high-precedence variant of the operator. π
Note this may be also triggered for constructs like:
sub { 1 if die; }
Postfix dereference is experimentalβ (S experimental::postderef) this warning is emitted if you use the experimental postfix dereference syntax. Simply suppress the warning if you want to use the feature β but know that in doing so you are taking the risk of using an experimental feature which may change or be removed in a future Perl version:
no warnings "experimental::postderef";
use feature "postderef", "postderef_qq";
$ref->$*;
$aref->@*;
$aref->@[@indices];
... etc ...
Prototype '%s' overridden by attribute 'prototype(%s)' in %sβ (W prototype) a prototype was declared in both the parentheses after the sub name and via the prototype attribute. The prototype in parentheses is useless, since it will be replaced by the prototype from the attribute before it's ever used. girl it never even got a chance. πScalar value @%s[%s] better written as $%s[%s]β (W syntax) in scalar context, you've used an array index/value slice (indicated by%) to select a single element of an array. Generally it's better to ask for a scalar value (indicated by$). The difference is that$foo[&bar]always behaves like a scalar, both in the value it returns and when evaluating its argument, while%foo[&bar]provides a list context to its subscript, which can do weird things if you're expecting only one subscript. When called in list context, it also returns the index (what&barreturns) in addition to the value. basically: pick the right sigil, bestie πScalar value @%s{%s} better written as $%s{%s}β (W syntax) in scalar context, you've used a hash key/value slice (indicated by%) to select a single element of a hash. Generally it's better to ask for a scalar value (indicated by$). The difference is that$foo{&bar}always behaves like a scalar, both in the value it returns and when evaluating its argument, while@foo{&bar}provides a list context to its subscript, which can do weird things if you're expecting only one subscript. When called in list context, it also returns the key in addition to the value. πSetting $/ to a reference to %s as a form of slurp is deprecated, treating as undefβ deprecated behavior, and it gets treated asundef. noting it, moving on π«ΆUnexpected exit %uβ (S)exit()was called or the script otherwise finished gracefully whenPERL_EXIT_WARNwas set inPL_exit_flags. unexpected but make it graceful β¨Unexpected exit failure %dβ (S) an uncaughtdie()was called whenPERL_EXIT_WARNwas set inPL_exit_flags.Use of literal control characters in variable names is deprecatedβ (D deprecated) using literal control characters in the source to refer to the^FOOvariables, like$^Xand${^GLOBAL_PHASE}, is now deprecated. This only affects code like$\cT, where\cTis a control (like a"SOH") in the source code:${"\cT"}and$^Tremain valid. so those two? still iconic. the literal one? deprecated. π«Useless use of greediness modifierβ this fixes [Perl #42957]. πβ¨
π Changes to Existing Diagnostics π
- Warnings and errors from the regexp engine are now UTF-8 clean. slay. β¨
- The
"Unknown switch condition"error message has some slight changes. This error triggers when there is an unknown condition in a(?(foo))conditional. The error message used to read:
Unknown switch condition (?(%s in regex;
But what %s could be was mostly up to luck. For (?(foobar)), you might have seen "fo" or "f". For Unicode characters, you would generally get a corrupted string. π The message has been changed to read:
Unknown switch condition (?(...)) in regex;
Additionally, the '<-- HERE' marker in the error will now point to the correct spot in the regex. π―
- The
"%s "\x%X" does not map to Unicode"warning is now correctly listed as a severe warning rather than as a fatal error. category correction, love that for us π - Under rare circumstances, one could get a
"Can't coerce readonly REF to string"instead of the customary"Modification of a read-only value". This alternate error message has been removed. gone. no longer in the group chat. π "Ambiguous use of * resolved as operator *": this and similar warnings about%and&used to occur in some circumstances where there was no operator of the type cited, so the warning was completely wrong. This has been fixed [perl #117535, #76910]. false alarm era is over π- Warnings about malformed subroutine prototypes are now more consistent in how the prototypes are rendered. Some of these warnings would truncate prototypes containing nulls. In other cases one warning would suppress another. The warning about illegal characters in prototypes no longer says
"after '_'"if the bad character came before the underscore. precision, bestie π Perl folding rules are not up-to-date for 0x%X; please use the perlbug utility to report; in regex; marked by <-- HERE in m/%s/
This message is now only in the regexp category, and not in the deprecated category. It is still a default (i.e., severe) warning [perl #89648].
%%s[%s] in scalar context better written as $%s[%s]
This warning now occurs for any %array[$index] or %hash{key} known to be in scalar context at compile time. Previously it was worded "Scalar value %%s[%s] better written as $%s[%s]". wording refresh, same energy β¨
Switch condition not recognized in regex; marked by <-- HERE in m/%s/:
The description for this diagnostic has been extended to cover all cases where the warning may occur. Issues with the positioning of the arrow indicator have also been resolved. π«Ά
- The error messages for
my($a?$b$c)andmy(do{})now mention"conditional expression"and"do block", respectively, instead of reading'Can't declare null operation in "my"'. so much clearer, honestly π - When
use re "debug"executes a regex containing a backreference, the debugging output now shows what string is being matched. bless, no more guessing π₯ - The now fatal error message
"Character following "\c" must be ASCII"has been reworded as"Character following "\c" must be printable ASCII"to emphasize that in"\cX", X must be a printable (non-control) ASCII character. π
β¨ UTILITY CHANGES β¨
Okay bestie, the little helper scripts got some love too. Sit with me. π«Ά
a2p
- A possible crash from an off-by-one error when trying to access before the beginning of a buffer has been fixed. [perl #120244]
Like, it was reaching behind the buffer. Rude. Gone now. π
bisect.pl
The git bisection tool Porting/bisect.pl has had many enhancements. β¨
It is provided as part of the source distribution but not installed, because it is not self-contained β it relies on being run from within a git checkout. Also note: it makes no attempt to fix tests, correct runtime bugs, or make something useful to install. Its whole purpose is to make minimal changes so that any historical revision of interest will build and run as close as possible to "as-was", and thereby make git bisect easy to use. No cap. π
- Can optionally run the test case with a timeout.
- Can now run in-place in a clean
gitcheckout. - Can run the test case under
valgrind. - Can apply user supplied patches and fixes to the source checkout before building.
- Now has fixups to enable building several more historical ranges of bleadperl, which can be useful for pinpointing the origins of bugs or behaviour changes.
Lowkey iconic for anyone doing archaeology on old perl. π
find2perl
find2perlnow handles?wildcards correctly. [perl #113054]
The ? was being disrespected and honestly? Not anymore. π¦
perlbug
perlbugnow has a-poption for attaching patches with a bug report.perlbughas been modified to supply the report template with CRLF line endings on Windows. [GH #13612] <https://github.com/Perl/perl5/issues/13612>perlbugnow makes as few assumptions as possible about the encoding of the report. This will likely change in the future to assume UTF-8 by default but allow a user override.
π CONFIGURATION AND COMPILATION π
The build system glow-up era. Buckle up, this section is stacked. π
- The
Makefile.PLforSDBM_Filenow generates a better Makefile, which avoids a race condition during parallel makes, which could cause the build to fail. This is the last known parallel make problem (on*nixplatforms), and therefore we believe that a parallel make should now always be error free.
Periodt. Last one. We believe parallel make is now always error free. ππ
installperlandinstallman's option handling has been refactored to useGetopt::Long. Both are used by the Makefileinstalltargets, and are not installed, so these changes are only likely to affect custom installation scripts.- Single letter options now also have long names.
- Invalid options are now rejected.
- Command line arguments that are not options are now rejected.
- Each now has a
--helpoption to display the usage message.
The behaviour for all valid documented invocations is unchanged.
- Where possible, the build now avoids recursive invocations of
makewhen building pure-Perl extensions, without removing any parallelism from the build. Currently around 80 extensions can be processed directly by themake_ext.pltool, meaning that 80 invocations ofmakeand 160 invocations ofminiperlare no longer made.
SIXTY extra... no wait, EIGHTYmakecalls and 160miniperlcalls just... not happening. Efficiency slay. π₯
- The build system now works correctly when compiling under GCC or Clang with link-time optimization enabled (the
-fltooption). [perl #113022] - Distinct library basenames with
d_libname_unique.
When compiling perl with this option, the library files for XS modules are named something "unique" β for example, Hash/Util/Util.so becomes Hash/Util/PL_Hash__Util.so. This behavior is similar to what currently happens on VMS, and serves as groundwork for the Android port.
sysrootoption to indicate the logical root directory undergccandclang.
When building with this option set, both Configure and the compilers search for all headers and libraries under this new sysroot, instead of /.
This is a huge time saver if cross-compiling, but can also help on native builds if your toolchain's files have non-standard locations.
- The cross-compilation model has been renovated. There's several new options, and some backwards-incompatible changes:
We now build binaries for miniperl and generate_uudmap to be used on the host, rather than running every miniperl call on the target; this means that, short of 'make test', we no longer need access to the target system once Configure is done. You can provide already-built binaries through the hostperl and hostgenerate options to Configure.
Additionally, if targeting an EBCDIC platform from an ASCII host, or viceversa, you'll need to run Configure with -Uhostgenerate, to indicate that generate_uudmap should be run on the target.
Finally, there's also a way of having Configure end early, right after building the host binaries, by cross-compiling without specifying a targethost.
The incompatible changes include no longer using xconfig.h, xlib, or Cross.pm, so canned config files and Makefiles will have to be updated.
- Related to the above, there is now a way of specifying the location of
sh(or equivalent) on the target system:targetsh.
For example, Android has its sh in /system/bin/sh, so if cross-compiling from a more normal Unixy system with sh in /bin/sh, targetsh would end up as /system/bin/sh, and sh as /bin/sh.
- By default, gcc 4.9 does some optimizations that break perl. The
-fwrapvoption disables those optimizations (and probably others), so for gcc 4.3 and later (since there might be similar problems lurking on older versions too, but-fwrapvwas broken before 4.3, and the optimizations probably won't go away), Configure now adds-fwrapvunless the user requests-fno-wrapv, which disables-fwrapv, or-fsanitize=undefined, which turns the overflows-fwrapvignores into runtime errors. [GH #13690] <https://github.com/Perl/perl5/issues/13690>
π§ͺ TESTING π§ͺ
- The
test.valgrindmake target now allows tests to be run in parallel. This target allows Perl's test suite to be run under Valgrind, which detects certain sorts of C programming errors, though at significant cost in running time. On suitable hardware, allowing parallel execution claws back a lot of that additional cost. [perl #121431]
Valgrind said "this will take forever" and parallel mode said "not me." π
- Various tests in
t/porting/are no longer skipped when the perl.gitdirectory is outside the perl tree and pointed to by$GIT_DIR. [perl #120505] - The test suite no longer fails when the user's interactive shell maintains a
$PWDenvironment variable, but the/bin/shused for running tests doesn't.
and more is coming bestie, don't unmatch yet π
πΈ Platform Support πΈ
Perl said "let me love more machines" and honestly? She did that. π
β¨ New Platforms β¨
Android π
Perl can now be built for Android β whether you go native or through cross-compilation β for all three of the currently available architectures (ARM, MIPS, and x86), across a wide range of versions. Bestie, she's portable fr fr.
Bitrig π¦
Compile support has been added for Bitrig, which is a fork of OpenBSD. Lowkey niche, highkey valid.
FreeMiNT π§
Support has been added for FreeMiNT β a free open-source OS for the Atari ST system and its successors, based on the original MiNT that was officially adopted by Atari. Retro icons rise up β¨
Synology π
Synology ships its NAS boxes with a lean Linux distribution (DSM) running on relatively cheap CPU's (like the Marvell Kirkwood mv6282 β ARMv5tel β or the Freescale QorIQ P1022 ppc β e500v2), which aren't meant for workstations or development. These boxes should build now. The basic problems are the non-standard location for tools.
π Discontinued Platforms π
Gone but we're not really mourning ngl.
sfio
Code related to supporting the sfio I/O system has been removed.
Perl 5.004 added support to use the native API of sfio, AT&T's Safe/Fast I/O library. This code still built with v5.8.0, albeit with many regression tests failing, but was inadvertently broken before the v5.8.1 release, meaning that it has not worked on any version of Perl released since then. In over a decade we have received no bug reports about this, hence it is clear that no-one is using this functionality on any version of Perl that is still supported to any degree.
Periodt. If nobody reports it for a decade, it's not a feature, it's a rumor. π
AT&T 3b1
Configure support for the 3b1 β also known as the AT&T Unix PC (and the similar AT&T 7300) β has been removed.
DG/UX
DG/UX was a Unix sold by Data General. The last release was in April 2001. It only runs on Data General's own hardware.
EBCDIC
In the absence of a regular source of smoke reports, code intended to support native EBCDIC platforms will be removed from perl before 5.22.0.
π«Ά Platform-Specific Notes π«Ά
Cygwin π
recv()on a connected handle would populate the returned sender address with whatever happened to be in the working buffer.recv()now uses a workaround similar to the Win32recv()wrapper and returns an empty string whenrecvfrom(2)doesn't modify the supplied address length.[perl #118843]- Fixed a build error in
cygwin.con Cygwin 1.7.28.
Tests now handle the errors that occur when cygserver isn't running.
GNU/Hurd π§
The BSD compatibility library libbsd is no longer required for builds. She's standing on her own two feet bestie π
Linux π§
The hints file now looks for libgdbm_compat only if libgdbm itself is also wanted. The former is never useful without the latter, and in some circumstances, including it could actually prevent building. Oops? Fixed. β¨
Mac OS π
The build system now honors an ld setting supplied by the user running Configure.
MidnightBSD π
objformat was removed from version 0.4-RELEASE of MidnightBSD and had been deprecated on earlier versions. This caused the build environment to be erroneously configured for a.out rather than elf. This has been now been corrected.
Mixed-endian platforms π
The code supporting pack and unpack operations on mixed endian platforms has been removed. We believe that Perl has long been unable to build on mixed endian architectures (such as PDP-11s), so we don't think that this change will affect any platforms which were able to build v5.18.0.
VMS π
- The
PERL_ENV_TABLESfeature to control the population of%ENVat perl start-up was broken in Perl 5.16.0 but has now been fixed. We love a comeback arc. - Skip access checks on remotes in
opendir().[perl #121002] - A check for glob metacharacters in a path returned by the
glob()operator has been replaced with a check for VMS wildcard characters. This saves a significant number of unnecessarylstat()calls such that some simple glob operations become 60-80% faster. Ate. π₯
Win32 πͺ
renameandlinkon Win32 now set$!toENOSPCandEDQUOTwhen appropriate.[perl #119857]- The
BUILD_STATICandALL_STATICmakefile options for linking some or (nearly) all extensions statically (intoperl520.dll, and into a separateperl-static.exetoo) were broken for MinGW builds. This has now been fixed.
The ALL_STATIC option has also been improved to include the Encode and Win32 extensions (for both VC++ and MinGW builds).
- Support for building with Visual C++ 2013 has been added. There are currently two possible test failures (see "Testing Perl on Windows" in
perlwin32) which will hopefully be resolved soon. - Experimental support for building with Intel C++ Compiler has been added. The nmake makefile (
win32/Makefile) and the dmake makefile (win32/makefile.mk) can be used. Anmake testwill not pass at this time due tocpan/CGI/t/url.t. - Killing a process tree with
killin perlfunc and a negative signal, was broken starting in 5.18.0. In this bug,killalways returned0for a negative signal even for valid PIDs, and no processes were terminated. This has been fixed[perl #121230]. - The time taken to build perl on Windows has been reduced quite significantly (time savings in the region of 30-40% are typically seen) by reducing the number of, usually failing, I/O calls for each
require()(forminiperl.exeonly).[GH #13566]https://github.com/Perl/perl5/issues/13566 - About 15 minutes of idle sleeping was removed from running
make testdue to a bug in which the timeout monitor used for tests could not be cancelled once the test completes, and the full timeout period elapsed before running the next test file.[GH #13647]https://github.com/Perl/perl5/issues/13647 - On a perl built without pseudo-fork (pseudo-fork builds were not affected by this bug), killing a process tree with
kill()and a negative signal resulted inkill()inverting the returned value. For example, ifkill()killed 1 process tree PID then it returned0instead of1, and ifkill()was passed 2 invalid PIDs then it returned2instead of0. This has probably been the case since the process tree kill feature was implemented on Win32. It has now been corrected to follow the documented behaviour.[GH #13595]https://github.com/Perl/perl5/issues/13595 - When building a 64-bit perl, an uninitialized memory read in
miniperl.exe, used during the build process, could lead to a 4GBwperl.exebeing created. This has now been fixed. (Note thatperl.exeitself was unaffected, but obviouslywperl.exewould have been completely broken.)[GH #13677]https://github.com/Perl/perl5/issues/13677 - Perl can now be built with gcc version 4.8.1 from
http://www.mingw.org. This was previously broken due to an incorrect definition ofDllMain()in one of perl's source files. Earlier gcc versions were also affected when using version 4 of the w32api package. Versions of gcc available fromhttp://mingw-w64.sourceforge.net/were not affected.[GH #13733]https://github.com/Perl/perl5/issues/13733 - The test harness now has no failures when perl is built on a FAT drive with the Windows OS on an NTFS drive.
[GH #6348]https://github.com/Perl/perl5/issues/6348 - When cloning the context stack in
fork()emulation,Perl_cx_dup()would crash accessing parameter information for context stack entries that included no parameters, as with&foo;.[GH #13763]https://github.com/Perl/perl5/issues/13763 - Introduced by
[GH #12161]https://github.com/Perl/perl5/issues/12161, a memory leak on every call tosystemand backticks ( `` ), on most Win32 Perls starting from 5.18.0 has been fixed. The memory leak only occurred if you enabled pseudo-fork in your build of Win32 Perl, and were running that build on Server 2003 R2 or newer OS. The leak does not appear on WinXP SP3.[GH #13741]https://github.com/Perl/perl5/issues/13741
WinCE π
- The building of XS modules has largely been restored. Several still cannot (yet) be built but it is now possible to build Perl on WinCE with only a couple of further patches (to
SocketandExtUtils::MakeMaker), hopefully to be incorporated soon. - Perl can now be built in one shot with no user intervention on WinCE by running
nmake -f Makefile.ce all.
Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl can also be built using Smart Devices for Visual C++ 2005 or 2008.
π Internal Changes π
The under-the-hood glow-up. Not your business, but also iconic.
- The internal representation has changed for the match variables
$1,$2etc.,$`,$&,$',${^PREMATCH},${^MATCH}and${^POSTMATCH}. It uses slightly less memory, avoids string comparisons and numeric conversions during lookup, and uses 23 fewer lines of C. This change should not affect any external code. - Arrays now use
NULLinternally to represent unused slots, instead of&PL_sv_undef.&PL_sv_undefis no longer treated as a special value, soav_store(av, 0, &PL_sv_undef)will cause element 0 of that array to hold a read-only undefined scalar.$array[0] = anythingwill croak and\$array[0]will compare equal to\undef. - The SV returned by
HeSVKEY_force()now correctly reflects the UTF8ness of the underlying hash key when that key is not stored as a SV.[perl #79074] - Certain rarely used functions and macros available to XS code are now deprecated. These are:
utf8_to_uvuni_buf(useutf8_to_uvchr_bufinstead),valid_utf8_to_uvuni(useutf8_to_uvchr_bufinstead),NATIVE_TO_NEED(this did not work properly anyway), andASCII_TO_NEED(this did not work properly anyway).
Starting in this release, almost never does application code need to distinguish between the platform's character set and Latin1, on which the lowest 256 characters of Unicode are based. New code should not use utf8n_to_uvuni (use utf8_to_uvchr_buf instead), nor uvuni_to_utf8 (use uvchr_to_utf8 instead),
- Okay bestie, the Makefile just got a β¨glow-downβ¨ β the shortcut targets for a bunch of rarely (or like, literally never) used testing and profiling targets? GONE. Removed, or smooshed into the one other Makefile target that actually uses them. Specifically these targets have officially left the chat, along with any documentation that referenced them or tried to explain how to use them:
check.third check.utf16 check.utf8 coretest minitest.prep
minitest.utf16 perl.config.dashg perl.config.dashpg
perl.config.gcov perl.gcov perl.gprof perl.gprof.config
perl.pixie perl.pixie.atom perl.pixie.config perl.pixie.irix
perl.third perl.third.config perl.valgrind.config purecovperl
pureperl quantperl test.deparse test.taintwarn test.third
test.torture test.utf16 test.utf8 test_notty.deparse
test_notty.third test_notty.valgrind test_prep.third
test_prep.valgrind torturetest ucheck ucheck.third ucheck.utf16
ucheck.valgrind utest utest.third utest.utf16 utest.valgrind
But like, breathe π«Ά β you can still run the relevant commands by "hand". No underlying functionality got removed, it's giving spring cleaning not demolition.
- Perl can now be told to NOT initialize locale handling, and honestly? iconic. For the most part, Perl doesn't even pay attention to locale (see
perllocale). But until now, on startup, it always initialized locale handling to the system default, just in case the program being run ends up using locales. (Which is, like, one of the first things a locale-aware program should do β long before Perl has any idea if it'll actually be needed or not. π) That works great except when Perl is embedded in another application that wants a locale that isn't the system default. So now: if the environment variablePERL_SKIP_LOCALE_INITis set at the time Perl is started, this initialization step gets skipped. Before this, on Windows platforms, the only workaround for this whole situation was to use a hacked-up copy of internal Perl code π. Applications that need to use older Perls can find out if the embedded Perl they're using needs the workaround by testing that the C preprocessor symbolHAS_SKIP_LOCALE_INITis not defined. [RT #38193] BmRAREandBmPREVIOUS? Removed. They weren't used anywhere and they're not part of the API. For XS modules, they are now#definedas0.sv_force_normal, which usually croaks on read-only values, used to allow read-only values to be modified at compile time. That's been changed: now it croaks on read-only values no matter what. And get this β this change uncovered several core bugs. πβ¨- Perl's new copy-on-write mechanism (which is now enabled by default, no cap) lets any
SvPOKscalar be automatically upgraded to a copy-on-write scalar when it's copied. A reference count on the string buffer is stored in the string buffer itself. For example:
$ perl -MDevel::Peek -e'$a="abc"; $b = $a; Dump $a; Dump $b'
SV = PV(0x260cd80) at 0x2620ad8
REFCNT = 1
FLAGS = (POK,IsCOW,pPOK)
PV = 0x2619bc0 "abc"\0
CUR = 3
LEN = 16
COW_REFCNT = 1
SV = PV(0x260ce30) at 0x2620b20
REFCNT = 1
FLAGS = (POK,IsCOW,pPOK)
PV = 0x2619bc0 "abc"\0
CUR = 3
LEN = 16
COW_REFCNT = 1
See how both scalars share the same PV buffer and have a COW_REFCNT greater than zero? Bestie behaviour, fr fr. π«Ά
What this means: XS code that wants to modify the SvPVX() buffer of an SV should call SvPV_force() or similar first, to make sure it has a valid (and unshared) buffer, and then call SvSETMAGIC() afterwards. And ngl, this has actually always been the case (like, hash keys were already copy-on-write) β this change just spreads the COW behaviour to a wider variety of SVs.
One important difference: before 5.18.0, shared hash-key scalars used to have the SvREADONLY flag set, and this is no longer the case.
You can still turn this new behaviour off by running Configure with -Accflags=-DPERL_NO_COW. This option will probably be removed in Perl 5.22, so like, don't get too attached. π
PL_sawampersandis now a constant. The switch this variable provided (to enable/disable the pre-match copy depending on whether$&had been seen) has been removed and replaced with copy-on-write, which eliminated a few bugs. The previous behaviour can still be enabled by running Configure with-Accflags=-DPERL_SAWAMPERSAND.- The functions
my_swap,my_htonlandmy_ntohl? Removed. It is unclear why these functions were ever marked asA, part of the API π. XS code can't call them directly, because it can't rely on them being compiled. And unsurprisingly, literally no code on CPAN references them. Not one. - The signature of the
Perl_re_intuit_start()regex function has changed, and the function pointerintuitin the regex engine plugin structure has changed to match. A new parameter,strbeg, has been added, and it has the same meaning as the same-named parameter inPerl_regexec_flags. Before this, intuit would try to guess the start of the string from the passed SV (if there was one), and sometimes it guessed wrong (e.g. with an overloaded SV). Rude. π - The signature of the
Perl_regexec_flags()regex function has also changed, and the function pointerexecin the regex engine plugin structure changed to match it too. Theminendparameter now has typeSSize_tto better support 64-bit systems. β¨ - XS code may use various macros to change the case of a character or code point (for example
toLOWER_utf8()). Only a couple of these were documented until now, and now they should be used in preference to calling the underlying functions. See "Character case changing" in perlapi. - The code dealt rather inconsistently with uids and gids β some places assumed they could be safely stored in UVs, others in IVs, others in ints. So four new macros are introduced:
SvUID(),sv_setuid(),SvGID(), andsv_setgid(). Consistency era. π sv_pos_b2u_flagshas been added to the API. It's similar tosv_pos_b2u, but it supports long strings on 64-bit platforms.PL_exit_flagscan now be used by perl embedders or other XS code to have perlwarnoraborton an attempted exit. [perl #52000]- Compiling with
-Accflags=-PERL_BOOL_AS_CHARnow allows C99 and C++ compilers to emulate the aliasing ofbooltocharthat perl does for C89 compilers. [perl #120314] - The
svargument insv_2pv_flagsin perlapi,sv_2iv_flagsin perlapi,sv_2uv_flagsin perlapi, andsv_2nv_flagsin perlapi β and their older wrapperssv_2pv,sv_2iv,sv_2uv,sv_2nvβ is now non-NULL. Passing NULL now will crash. π
When the non-NULL marker was introduced en masse in 5.9.3, the functions were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if NULL was passed, the functions returned 0 or false-type values. The code that supports the sv argument being non-NULL dates to 5.0 alpha 2 directly, and indirectly to Perl 1.0 (pre-5.0 api). The lack of documentation that the functions accepted a NULL sv was corrected in 5.11.0, and between 5.11.0 and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code has now been removed, and the functions became non-NULL marked again, because core getter-type macros never pass NULL to these functions and would crash before ever passing NULL.
The only way a NULL sv can be passed to sv_2*v* functions is if XS code directly calls sv_2*v*. This is unlikely, since XS code uses Sv*V* macros to get the underlying value out of the SV. One possible situation which leads to a NULL sv being passed to sv_2*v* functions is if XS code defines its own getter type Sv*V* macros, which check for NULL before dereferencing and checking the SV's flags through public API Sv*OK* macros or directly using private API SvFLAGS, and if sv is NULL, then calling the sv_2*v functions with a NULL literal or passing the sv containing a NULL value.
newATTRSUBis now a macro. The public APInewATTRSUBwas previously a macro to the private functionPerl_newATTRSUB. FunctionPerl_newATTRSUBhas been removed.newATTRSUBis now a macro to a different internal function.- Changes in warnings raised by
utf8n_to_uvchr()β okay so this bottom level function decodes the first character of a UTF-8 string into a code point. It's accessible to"XS"level code, but it's discouraged to use it directly. There are higher level functions that call it that should be used instead, such asutf8_to_uvchr_bufin perlapi. But for completeness, this documents some changes to it. Now, tests for malformations are done before any tests for other potential issues. One of those issues involves code points so large that they have never appeared in any official standard (the current standard has scaled back the highest acceptable code point from earlier versions). It's possible (though not done in CPAN) to warn and/or forbid these code points, while accepting smaller code points that are still above the legal Unicode maximum. The warning message for this now includes the code point if it's representable on the machine. Previously it always displayed raw bytes, which is what it still does for non-representable code points. - Regexp engine changes that affect the pluggable regex engine interface β many flags that used to be exposed via
regexp.hand used to populate theextflagsmember ofstruct regexphave been removed. These fields were technically private to Perl's own regexp engine and, honestly, should not have been exposed there in the first place. πͺ
The affected flags are:
RXf_NOSCAN
RXf_CANY_SEEN
RXf_GPOS_SEEN
RXf_GPOS_FLOAT
RXf_ANCH_BOL
RXf_ANCH_MBOL
RXf_ANCH_SBOL
RXf_ANCH_GPOS
As well as the follow flag masks:
RXf_ANCH_SINGLE
RXf_ANCH
All have been renamed to PREGf_ equivalents and moved to regcomp.h. The behavior previously achieved by setting one or more of the RXf_ANCH_ flags (via the RXf_ANCH mask) has now been replaced by a single flag bit in extflags:
RXf_IS_ANCHORED
So pluggable regex engines which previously used to set these flags should now set this flag ALONE. One flag, main character energy. π
- The Perl core now consistently uses
av_tindex()("the top index of an array") as a more clearly-named synonym forav_len(). Slay, clearer naming. β¨ PL_timesbufβ okay so this super obscure interpreter variable is expected to get yeeted early in the 5.21.x dev era, so that when Perl 5.22.0 shows up it will NOT be handing it to XS authors anymore π. It still exists in 5.20.0, but the whole point of warning you now is so that literally anyone out there still using it has time to cry about it and then migrate. Consider this your soft launch of the breakup.
π₯ Selected Bug Fixes π₯
πΈ Regular Expressions πΈ
- Bestie. A small handful of regexp constructions were out here either failing to match or straight-up crashing perl whenever the string being matched against was allocated above the 2GB line on 32-bit systems. Fixed. [RT #118175]
- All the memory leaks involved in parsing the
(?[...])regular expression construct? Yeah, those are gone π§Ή. (?[...])now lets you interpolate precompiled patterns that consist of(?[...])with bracketed character classes inside β like$pat = qr/(?[ [a] ])/; /(?[ $pat ])/. Before this, those brackets would just completely confuse the regex parser, which is honestly so relatable but also a bug.- The
"Quantifier unexpected on zero-length expression"warning message could pop up twice starting in Perl v5.10 for a regular expression that also contained alternations (likea|b) which triggered the trie optimisation. Double warning, no ma'am. - Perl v5.18 accidentally dropped a bug where interpolating mixed up- and down-graded UTF-8 strings in a regex could leave you with malformed UTF-8 in the pattern β specifically when a downgraded character in the range
"\x80..\xff"came after a UTF-8 string, like:
utf8::upgrade( my $u = "\x{e5}");
utf8::downgrade(my $d = "\x{e5}");
/$u$d/
[RT #118297]
- When a regular expression had multiple code blocks, the values of
$1,$2, etc. that got set by nested regex calls would leak from one block to the next π. Now those variables always refer to the outer regular expression at the start of an embedded block. [perl #117917] /$qr/pwas broken in Perl 5.18.0 β the/pflag was just being ignored, like it wasn't even invited. Fixed now. [perl #118213]- Starting in Perl 5.18.0, a construct like
/[#](?{})/xwould have its#incorrectly read as a comment, so the code block got skipped and never parsed π. Corrected. - And going all the way back to Perl 5.001: a regular expression like
/[#$a]/xor/[#]$a/xwould have its#incorrectly interpreted as a comment, meaning the variable never interpolated. Also corrected. [perl #45667] - Perl 5.18.0 inadvertently made dereferenced regular expressions (
${ qr// }) false as booleans, which is giving "gaslighting a regex" energy. Fixed. - Using
\Gin a regular expression where it's not at the start of the pattern is now slightly less buggy. Keywords: slightly. It is still somewhat problematic, ngl. - Where a regular expression included code blocks (
/(?{...})/), and where the use of constant overloading triggered a re-compilation of that code block, the second compilation couldn't see its outer lexical scope. Regression in Perl 5.18.0, now handled. - The string position set by
poscould shift if the string changed representation internally to or from utf8. This could happen, for example, with references to objects that have string overloading. Rude of it, honestly. - Taking references to the return values of two
poscalls with the same argument, then assigning a reference to one andundefto the other, could get you assertion failures or memory leaks. No more. - Elements of
@-and@+now update correctly when they refer to non-existent captures. Previously a referenced element ($ref = \$-[1]) could point at the wrong match after subsequent matches β like a group chat where the message keeps changing owners π. - The code that parses regex backrefs (or those ambiguous backref/octals) like
\123was doing a plain oldatoi(), which could wrap around to negative values on long digit strings and cause segmentation faults. Fixed now. [perl #119505] - Assigning another typeglob to
*^Rno longer makes the regular expression engine crash π. - The
\Nregular expression escape, when used without the curly braces (so meaning[^\n]), was ignoring a following*if it was followed by whitespace under/x. And it had been like that ever since\Nmeaning[^\n]was introduced in 5.12.0. Iconic holdover, terrible behaviour. s///,tr///andy///now actually work when a wide character is used as the delimiter. [perl #120463]- Some cases of unterminated
(?...)sequences in regular expressions (like/(?</) are fixed and now produce the proper error message instead of"panic: memory wrap"β which, respectfully, was a terrifying thing to read. Other cases (like/(?(/) have yet to be fixed π. - When a reference to a reference to an overloaded object got returned from a regular expression
(??{...})code block, an incorrect implicit dereference could happen if the inner reference had been returned by a code block previously. - A tied variable returned from
(??{...})sees the inner values of match variables (i.e., the$1etc. from any matches inside the block) in itsFETCHmethod. That was NOT the case if a reference to an overloaded object was the last thing assigned to the tied variable β instead, the match variables referred to the outer pattern during theFETCHcall. Confusing. Fixed. - Fixed unexpected tainting via regexp when using locale. Previously, under certain conditions, using character classes could cause tainting when it absolutely shouldn't. Some character classes are locale-dependent, but before this patch, sometimes tainting happened even for character classes that don't depend on the locale. [perl #120675]
- Under certain conditions Perl would throw an error if, in a lookbehind assertion in a regexp, the assertion referred to a named subpattern β complaining the lookbehind was variable when it wasn't. Fixed. [perl #120600], [perl #120618]. The current fix may be improved on in the future (so like, watch this space π).
$^Rwasn't available outside of the regular expression that initialized it. [perl #121070]- A large set of fixes and refactoring for
re_intuit_start()was merged, and the highlights are:- Fixed a panic when compiling the regular expression
/\x{100}[xy]\x{100}{2}/. - Fixed a performance regression when performing a global pattern match against a UTF-8 string. [perl #120692]
- Fixed another performance issue where matching a regular expression like
/ab.{1,2}x/against a long UTF-8 string would unnecessarily calculate byte offsets for a large portion of the string. [perl #120692]
- Fixed a panic when compiling the regular expression
- Fixed an alignment error when compiling regular expressions when built with GCC on HP-UX 64-bit.
- On 64-bit platforms,
poscan now be set to a value higher than2**31-1. [perl #72766]
π Perl 5 Debugger and -d π
- The debugger's
mancommand has been fixed β it was broken in the v5.18.0 release. Themancommand is aliased to the namesdocandperldoc, and all of them work again now π. @_is now correctly visible in the debugger, fixing a regression introduced in v5.18.0's debugger. [RT #118169]- Under copy-on-write builds (which are the default as of 5.20.0),
${'_<-e'}[0]no longer gets mangled. That's the first line of input saved for the debugger's use for one-liners. [perl #118627] - On non-threaded builds, setting
${"_<filename"}to a reference or typeglob no longer causes__FILE__and some error messages to produce a corrupt string, and no longer stops#linedirectives in string evals from providing the source lines to the debugger. Threaded builds were unaffected, bestie, they were fine the whole time π . - Starting with Perl 5.12, line numbers were off by one if the
-dswitch was used on the#!line. Now they are correct β . *DB::DB = sub {} if 0no longer stops Perl's debugging mode from findingDB::DBsubs declared thereafter.%{'_<...'}hashes now set breakpoints on the corresponding@{'_<...'}rather than whichever array@DB::dblinehappens to be aliased to. [perl #119799]- Call set-magic when setting
$DB::sub. [perl #121255] - The debugger's
ncommand now respects lvalue subroutines and steps over them. [perl #118839]
π¦ Lexical Subroutines π¦
- Lexical constants (
my sub a() { 42 }) no longer crash when inlined. Slay. - Parameter prototypes attached to lexical subroutines are now respected when compiling sub calls without parentheses. Previously the prototypes were only honoured for calls with parentheses. [RT #116735]
- Syntax errors in lexical subroutines combined with calls to those same subroutines no longer cause crashes at compile time.
- Deep recursion warnings no longer crash lexical subroutines. [RT #118521]
- The dtrace sub-entry probe now works with lexical subs instead of crashing. [perl #118305]
- Undefining an inlinable lexical subroutine (
my sub foo() { 42 } undef &foo) would crash if warnings were turned on. Fixed π. - An undefined lexical sub used as an inherited method no longer crashes.
- The presence of a lexical sub named
COREno longer stops theCORE::prefix from working.
β¨ Everything Else β¨
- The OP allocation code now returns correctly aligned memory in all cases for
struct pmop. Previously it could return memory aligned only to a 4-byte boundary, which isn't correct for an ithreads build with 64 bit IVs on some 32 bit platforms. Notably, this caused the build to fail completely on sparc GNU/Linux. [RT #118055] - Evaluating large hashes in scalar context is now much faster, because the number of used chains in the hash is now cached for larger hashes. Smaller hashes continue not to store it and calculate it when needed, since that saves one IV. And that would be 1 IV overhead for every object built from a hash, which is a lot of IVs, bestie. [RT #114576]
- Perl v5.16 inadvertently dropped a bug where calls to XSUBs that weren't visible at compile time were treated as lvalues and could be assigned to, even when the subroutine was not an lvalue sub. Fixed. [RT #117947]
- In Perl v5.18.0, dualvars that had an empty string for the string part but a non-zero number for the number part started being treated as true. In previous versions they were treated as false, with the string representation taking precedence. The old behaviour has been restored. [RT #118159]
- Since Perl v5.12, inlining of constants that override built-in keywords of the same name had countermanded
use subs, causing subsequent mentions of the constant to use the built-in keyword instead. Fixed. Periodt. - The warning from
-l $handlenow applies to IO refs and globs too, not just glob refs. Oh and it's UTF8-clean now as well. β¨ [RT #117595] delete local $ENV{nonexistent_env_var}is not out here leaking memory anymore.- When
sortandrequireget a keyword prefixed withCORE::, they now treat it as an actual keyword, and not as a subroutine or module name. [RT #24482] - Okay so through certain conundrums (iykyk), it's possible to get the current package freed. And
bless,reset,open, andevalcould not cope with that and would just crash π. They've all been made more resilient now. [RT #117941] - Aliasing filehandles through glob-to-glob assignment wasn't updating the internal method caches properly if a package with the same name as the filehandle existed β so filehandle method calls were going to the package instead π. Fixed.
./Configure -de -Dusevendorprefixdidn't default. [RT #64126]- The "Statement unlikely to be reached" warning was listed in perldiag as an
exec-category warning, but it was actually enabled and disabled by thesyntaxcategory. Meanwhile theexeccategory was the one controlling its fatal-ness. It's now entirely handled by theexeccategory. - That "Replacement list is longer that search list" warning for
tr///andy///? It no longer shows up when the/cflag is around. [RT #118047] - Stringification of NVs is not cached anymore, so the lexical locale gets to control how the decimal point gets stringified. [perl #108378] [perl #115800]
- There have been several fixes around Perl's handling of locales. perl #38193 was described above in "Internal Changes". Also fixed: #118197, where the radix (decimal point) character had to be an ASCII character (which straight up doesn't work for some non-Western languages); and #115808, where
POSIX::setlocale()on failure returned anundefthat didn't warn about not being defined even when those warnings were enabled. - Compiling a
splitoperator whose third argument is a named constant evaluating to 0 no longer makes the constant's value change. Rude of it honestly. - A named constant used as the second argument to
indexno longer gets coerced to a string if it's a reference, regular expression, dualvar, etc. - A named constant evaluating to the undefined value, used as the second argument to
index, no longer produces "uninitialized" warnings at compile time. It'll still produce them at run time though, so don't get comfy π«Ά - When a scalar was returned from a subroutine in @INC, that referenced scalar was magically getting converted into an IO thingy, which could hand you "Bizarre copy" errors if you kept using that scalar elsewhere π. Now Perl uses an internal copy of the scalar instead.
- Certain uses of the
sortoperator are optimised to modify an array in place, like@a = sort @a. During the sorting, the array gets made read-only. But if a sort block happened to die, the array stayed read-only even outside thesort. Fixed now. $aand$binside a sort block are aliased to the actual arguments tosort, so you can modify them through those two variables. This didn't always work, e.g. for lvalue subs and$#ary, and probably a whole bunch of other operators. It works now. π- The arguments to
sortare now all in list context. If thesortitself got called in void or scalar context, then some β but not all β of the arguments used to be in void or scalar context. - Subroutine prototypes with Unicode characters above U+00FF were getting mangled during closure cloning. This would happen with subroutines closing over lexical variables declared outside, and with lexical subs.
UNIVERSAL::cannow treats its first argument the same way method calls do: typeglobs and glob references with non-empty IO slots are treated as handles, and strings are treated as filehandles β not packages β if a handle with that name exists. [perl #113932]- Method calls on typeglobs (e.g.
*ARGV->getline) used to stringify the typeglob and then look it up again. Combined with the changes in Perl 5.18.0, that let*foo->barcall methods on thefoopackage (likefoo->bar). In some cases it could make the method get called on the wrong handle π. Now a typeglob argument is treated as a handle (just like(\*foo)->bar), or, if its IO slot is empty, an error is raised. - Assigning a vstring to a tied variable, or to a subroutine argument aliased to a nonexistent hash or array element, now works β without flattening the vstring into a regular string. Slay. β¨
pos,tie,tiedanduntiedid not work properly on subroutine arguments aliased to nonexistent hash and array elements. [perl #77814, #27010]- The
=>fat arrow operator can now quote built-in keywords even if it occurs on the next line, making it consistent with how it treats other barewords. - Autovivifying a subroutine stub via
\&$globstarted causing crashes in Perl 5.18.0 if the $glob was merely a copy of a real glob, i.e. a scalar that had had a glob assigned to it. Fixed. [perl #119051] - Perl used to leak an implementation detail when it came to referencing the return values of certain operators.
for ($a+$b) { warn \$_; warn \$_ }used to display two different memory addresses, because the\operator was copying the variable. Under threaded builds, it would also happen for constants (for(1) { ... }). Fixed. [perl #21979, #78194, #89188, #109746, #114838, #115388] - The range operator
..was returning the same modifiable scalars with each call, unless it was the only thing in aforeachloop header. Which meant changes to values within the list returned would be visible the next time the operator was executed. [perl #3105] - Constant folding and subroutine inlining no longer cause operations that would normally return new modifiable scalars to return read-only values instead.
- Closures of the form
sub () { $some_variable }are no longer inlined β that inlining was making changes to the variable get ignored by callers of the subroutine. [perl #79908] - Return values of certain operators such as
refwould sometimes be shared between recursive calls to the same subroutine, causing the inner call to modify the value returned byrefin the outer call π. Fixed. __PACKAGE__and constants returning a package name or hash key are now consistently read-only. In various previous Perl releases, they'd become mutable under certain circumstances.- Enabling "used once" warnings no longer causes crashes on stash circularities created at compile time (
*Foo::Bar::Foo:: = *Foo::). - Undef constants used in hash keys (
use constant u => undef; $h{+u}) no longer produce "uninitialized" warnings at compile time. - Modifying a substitution target inside the substitution replacement no longer causes crashes. π
- The first statement inside a string eval used to use the wrong pragma setting sometimes during constant folding.
eval 'uc chr 0xe0'would randomly choose between Unicode, byte, and locale semantics. Fixed. - The handling of return values of @INC filters (subroutines returned by subroutines in @INC) has been fixed in various ways. Previously tied variables were mishandled, and setting
$_to a reference or typeglob could result in crashes. - The
SvPVbyteXS function has been fixed to work with tied scalars returning something other than a string. It used to return utf8 in those cases whereSvPVwould. - Perl 5.18.0 inadvertently made
--and++crash on dereferenced regular expressions, and stopped++from flattening vstrings. blessno longer dies with "Can't bless non-reference value" if its first argument is a tied reference.resetwith an argument no longer skips copy-on-write scalars, regular expressions, typeglob copies, and vstrings. Also, when encountering those or read-only values, it no longer skips any array or hash with the same name.resetwith an argument now skips scalars aliased to typeglobs (for $z (*foo) { reset "z" }). Previously it would corrupt memory or crash π.ucfirstandlcfirstwere not respecting the bytes pragma. That was a regression from Perl 5.12. [perl #117355]- Changes to
UNIVERSAL::DESTROYnow update DESTROY caches in all classes, instead of causing classes that have already had objects destroyed to keep using the old sub. That was a regression in Perl 5.18. [perl #114864] - All known false-positive occurrences of the deprecation warning "Useless use of ''; doesn't escape metacharacter '%c'", added in Perl 5.18.0, have been removed. [perl #119101]
- The value of $^E is now saved across signal handlers on Windows. [perl #85104]
- A lexical filehandle (as in
open my $fh...) is usually given a name based on the current package and the name of the variable, e.g.main::$fh. Under recursion, the filehandle was losing the$fhpart of the name π. Fixed. - Uninitialized values returned by XSUBs are no longer exempt from uninitialized warnings. [perl #118693]
elsif ("")no longer erroneously produces a warning about void context. [perl #118753]- Passing
undefto a subroutine now causes @_ to contain the same read-only undefined scalar thatundefreturns. Furthermore,exists $_[0]will now return true ifundefwas the first argument. [perl #7508, #109726] - Passing a non-existent array element to a subroutine does not usually autovivify it unless the subroutine modifies its argument. This didn't work correctly with negative indices or with non-existent elements within the array β the element would get vivified immediately. The delayed vivification has been extended to work with those. [perl #118691]
- Assigning references or globs to the scalar returned by $#foo, after the @foo array has been freed, no longer causes assertion failures on debugging builds and memory leaks on regular builds.
- On 64-bit platforms, large ranges like 1..1000000000000 no longer crash β they just eat up all your memory instead π. [perl #119161]
__DATA__now drops theDATAhandle straight into the correct package, even when the current package has been renamed through glob assignment. the handle knows where home is now π β¨- okay so picture this:
die,last,next,redo,gotoandexitare unwinding the scope, and aDESTROYmethod recursively calls a subroutine or format that's currently being exited. In that case, sometimes the lexical variables inside the sub would start out holding values from the outer call instead of being undefined like they're literally supposed to. fixed.[perl #119311]π ${^MPEN}is no longer treated as a synonym for${^MATCH}. that era? over. π«- Perl now tries a little harder to hand you the correct line number in
(caller)[2]. she's putting in the effort fr fr.[perl #115768]β¨ - Line numbers inside multiline quote-like operators are now reported correctly.
[perl #3643]π #linedirectives inside code embedded in quote-like operators are now respected. yes ma'am, honored as they should be. π- Line numbers are now correct inside the second here-doc when two here-doc markers show up on the same line.
[perl #3643]... okay no, that one was just the previous vibe, this here-doc one stands on its own. π¦ - An optimization in Perl 5.18 made some incorrect assumptions and caused a bad interaction with the Devel::CallParser CPAN module. If the module got loaded, then lexical variables declared in separate statements following a
my(...)list might fail to be cleared on scope exit. awkward. fixed. π¬ &xsubandgoto &xsubcalls now let the called subroutine autovivify elements of@_. slay.@_is invited to the party too π&xsubandgoto &xsubno longer crash if*_has been undefined and has noARRAYentry (i.e.@_doesn't exist). no more π on the way in.&xsubandgoto &xsubnow work with tied@_. tied@_girlies, we see you, you're valid now π«Ά- Overlong identifiers no longer cause a buffer overflow (and a crash). They started doing so in Perl 5.18. so like... that was a thing for a bit. fixed.
[perl #3643]... nope, my bad, no ticket on that one β just the fix. π - The warning
Scalar value @hash{foo} better written as $hash{foo}now produces far fewer false positives. In particular,@hash{+function_returning_a_list}and@hash{ qw "foo bar baz" }no longer warn. Same applies to array slices.[perl #28380, #114024]π $! = EINVAL; waitpid(0, WNOHANG);no longer goes into an internal infinite loop. yes it literally used to just keep going. no more.[perl #85228]ππ«- A possible segmentation fault in filehandle duplication has been fixed. π
- A subroutine in
@INCcan return a reference to a scalar containing the initial contents of the file. However, that scalar was being freed prematurely if it wasn't referenced elsewhere, giving you random results. fixed. π lastno longer returns values that the same statement has accumulated so far. This fixes, amongst other things, the long-standing bug thatpush @a, lastwould try to return the@a, copying it like a scalar in the process and resulting in the error,Bizarre copy of ARRAY in last.[perl #3112]the drama of it all π- In some cases, closing file handles opened to pipe to or from a process β which had been duplicated into a standard handle β would call perl's internal waitpid wrapper with a pid of zero. With the fix for
[perl #85228], this zero pid was passed towaitpid, possibly blocking the process. This wait for process zero no longer occurs.[perl #119893]β selectused to ignore magic on the fourth (timeout) argument, which led to effects likeselectblocking indefinitely instead of sleeping the expected time. fixed now, bestie, your timeouts are real timeouts.[perl #120102]π- The class name in
for my class $foois now parsed correctly. Back in the day, if the second character of the class name was followed by a digit (e.g.'a1b') you'd get the errorMissing $ on loop variable. fixed.[perl #120112]π - Perl 5.18.0 accidentally disallowed
-barewordunderuse strictanduse integer. This has been fixed.[perl #120288]ok so that was a whoopsie π -aat the start of a line (or a hyphen with any single letter that is not a filetest operator) no longer produces the erroneous'Use of "-a" without parentheses is ambiguous'warning.[perl #120288]no more false alarms π¨β- Lvalue context is now properly propagated into bare blocks and
ifandelseblocks in lvalue subroutines. Previously, arrays and hashes would sometimes incorrectly be flattened when returned in lvalue list context, orBizarre copyerrors could occur.[perl #119797]β¨ - Lvalue context is now propagated to the branches of
||and&&(and their alphabetic equivalents,orandand). This meansforeach (pos $x || pos $y) {...}now allowsposto be modified through$_. the glow-up is real π statandreadlineremember the last handle used β the former for the special_filehandle, the latter for${^LAST_FH}. Buteval "*foo if 0"where*foowas the last handle passed tostatorreadlinecould cause that handle to be forgotten if it hadn't been opened yet. This has been fixed. π¦- Various cases of
delete $::{a},delete $::{ENV}etc. causing a crash have been fixed.[perl #54044]πβ‘οΈπ - Setting
$!to EACCESS before callingrequirecould affectrequire's behaviour. This has been fixed. thank u next π«Ά - The
Can't use \1 to mean $1 in expressionwarning message now only occurs on the right-hand (replacement) part of a substitution. Formerly it could happen in code embedded in the left-hand side, or in any other quote-like operator. π - Blessing into a reference (
bless $thisref, $thatref) has long been disallowed, but magical scalars for the second arg like$/and those that were tied got exempted. They no longer are.[perl #119809]exempt era over π« - Blessing into a reference was accidentally allowed in 5.18 if the class argument were a blessed reference with stale method caches (i.e., whose class had had subs defined since the last method call). They're disallowed once more, exactly as in 5.16. we love consistency π
$x->{key}where$xwas declared asmy Class $xno longer crashes if aClass::FIELDSsubroutine stub has been declared. π@$obj{'key'}and${$obj}{key}used to be exempt from compile-time field checking (No such class field; see fields) but they no longer are. the rules apply to everyone, periodt. π- A nonexistent array element with a large index passed to a subroutine that ties the array and then tries to access the element no longer results in a crash. π
- Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative array indices crash when the current package is a tied array class. π¦
- Declaring a
require,glob, ordosubroutine stub in theCORE::GLOBAL::package no longer makes compilation of calls to the corresponding functions crash. π₯ - Aliasing
CORE::GLOBAL::functions to constants stopped working in Perl 5.10 β but it's been fixed now. the comeback arc we deserved π - When
`...`orqx/.../calls areadpipeoverride, double-quotish interpolation now happens, exactly like when there's no override. Previously, the presence of an override would make these quote-like operators act likeq{}, suppressing interpolation.[perl #115330]π <<<`...`here-docs (with backticks as the delimiters) now callreadpipeoverrides.[perl #119827]β¨&CORE::exit()and&CORE::die()now respect vmsish hints. π- Undefining a glob that triggers a
DESTROYmethod which undefines the same glob is now safe. It used to produceAttempt to free unreferenced glob pointerwarnings and leak memory. we love a memory-leak-free queen π«Ά - If subroutine redefinition (
eval 'sub foo{}'ornewXSfor XS code) triggers aDESTROYmethod on the sub that's being redefined, and that method assigns a subroutine to the same slot (*foo = sub {}), then$_[0]is no longer left pointing to a freed scalar. NowDESTROYis delayed until the new subroutine has been installed. iconic behavior honestly β¨ - On Windows, perl no longer calls
CloseHandle()on a socket handle. This makes debugging easier on Windows by removing certain irrelevant bad handle exceptions. It also fixes a race condition that made socket functions randomly fail in a Perl process with multiple OS threads, plus possible test failures indist/IO/t/cachepropagate-tcp.t.[perl #120091/118059]π - Formats involving UTF-8 encoded strings, or strange vars like ties, overloads, or stringified refs (and in recent perls, pure NOK vars) would generally do the wrong thing in formats when the var is treated as a string and repeatedly chopped, as in
"^<<<~~"and similar. This has now been resolved.[perl #33832/45325/113868/119847/119849/119851]that's a whole lot of ticket numbers and tbh they all ate π semctl(..., SETVAL, ...)would set the semaphore to the top 32-bits of the supplied integer instead of the bottom 32-bits on 64-bit big-endian systems.[perl #120635]big-endian besties we got you π«Άreaddir()now only sets$!on error.$!is no longer set toEBADFwhen the terminatingundefis read from the directory β unless the system call sets$!.[perl #118651]π¦&CORE::globno longer causes an intermittent crash due to perl's stack getting corrupted.[perl #119993]π₯openwith layers that load modules (e.g.,<:encoding(utf8)>) no longer runs the risk of crashing due to stack corruption. π- Perl 5.18 broke autoloading via
->SUPER::foomethod calls by looking upAUTOLOADfrom the current package rather than the current package's superclass. This has been fixed.[perl #120694]β - A longstanding bug causing
do {} until CONSTANTβ where the constant holds a true value β to read unallocated memory has been resolved. This would usually happen after a syntax error. In past versions of Perl it has crashed intermittently.[perl #72406]scary fr, glad it's over π - Fix for the HP-UX
$!failure. HP-UXstrerror()returns an empty string for an unknown error code. This caused an assertion to fail under DEBUGGING builds. Now instead, the returned string for$!contains text indicating the code is for an unknown error. π - Individually-tied elements of
@INC(as intie $INC[0]...) are now handled correctly. Formerly, whether a sub returned by such a tied element would be treated as a sub depended on whether aFETCHhad occurred previously. no more mystery behavior π getcon a byte-sized handle, after the samegetcoperator had been used on a utf8 handle, used to treat the bytes as utf8 β resulting in erratic behavior (e.g., malformed UTF-8 warnings). fixed. π- An initial
{at the beginning of a format argument line was always interpreted as the beginning of a block prior to v5.18. In Perl v5.18, it started being treated as an ambiguous token. The parser would guess whether it was meant to be an anonymous hash constructor or a block based on the contents. Now the previous behaviour has been restored.[perl #119973]the way 5.18 said "let me guess" and we said "no β€οΈ" π - In Perl v5.18,
undef *_; goto &subandlocal *_; goto &substarted crashing. This has been fixed.[perl #119949]we don't talk about 5.18's little phase π - Backticks (that's
`` orqx//, bestie) + multiple threads on Win32 = chaos π« like, output meant forstdouton one thread could get snatched up by backticks of an external command running in another thread. Rude! And yes this could happen for pseudo-forked processes too, because Win32's pseudo-fork is literally built out of threads. [perl #77672] open $fh, ">+", undefis no longer out here leaking memory whenTMPDIRis set but points to a directory where a temp file just Can Not be created. [perl #120951]for ( $h{k} || '' )no longer auto-vivifies$h{k}. periodt, no mystery keys appearing out of nowhere. [perl #120374]- On Windows machines, Perl now emulates the POSIX way of using the environment for locale initialization β¨ previously the environment was simply ignored. Full deets in "ENVIRONMENT" in perllocale.
- Fixed a crash when destroying a self-referencing
GLOB. that one was giving unhinged π [perl #121242]
π Known Problems π
IO::Socketis known to fail tests on AIX 5.3 π there's a patch <https://github.com/Perl/perl5/issues/13484> sitting in the request tracker, #120835, which may get applied to future releases.- These modules are known to have test failures with this version of Perl. Patches have been submitted, so hopefully new releases are coming soooon:
Data::Structure::Utilversion 0.15HTML::StripScriptsversion 1.05List::Gatherversion 0.08.
ποΈ Obituary ποΈ
Diana Rosa, 27, of Rio de Janeiro, went to her long rest on May 10, 2014, along with the plush camel she kept hanging on her computer screen all the time πͺ She was a passionate Perl hacker who loved the language and its community, and who never missed a Rio.pm event. She was a true artist, an enthusiast about writing code, singing arias and graffiting walls. We'll never forget you. π
Greg McCarroll died on August 28, 2013.
Greg was well known for many good reasons. He was one of the organisers of the first YAPC::Europe, which concluded with an unscheduled auction where he frantically tried to raise extra money to avoid the conference making a loss. It was Greg who mistakenly arrived for a london.pm meeting a week late; some years later he was the one who sold the choice of official meeting date at a YAPC::Europe auction, and eventually as glorious leader of london.pm he got to inherit the irreverent confusion that he had created.
Always helpful, friendly and cheerfully optimistic, you will be missed, but never forgotten. π«Ά
π Acknowledgements π
Perl 5.20.0 represents approximately 12 months of development since Perl 5.18.0 and contains approximately 470,000 lines of changes across 2,900 files from 124 authors. iconic behavior honestly π
Excluding auto-generated files, documentation and release tools, there were approximately 280,000 lines of changes to 1,800 .pm, .t, .c and .h files.
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.20.0:
Aaron Crane, Abhijit Menon-Sen, Abigail, Abir Viqar, Alan Haggai Alavi, Alan Hourihane, Alexander Voronov, Alexandr Ciornii, Andy Dougherty, Anno Siegel, Aristotle Pagaltzis, Arthur Axel 'fREW' Schmidt, Brad Gilbert, Brendan Byrd, Brian Childs, Brian Fraser, Brian Gottreu, Chris 'BinGOs' Williams, Christian Millour, Colin Kuskie, Craig A. Berry, Dabrien 'Dabe' Murphy, Dagfinn Ilmari MannsΓ₯ker, Daniel Dragan, Darin McBride, David Golden, David Leadbeater, David Mitchell, David Nicol, David Steinbrunner, Dennis Kaarsemaker, Dominic Hargreaves, Ed Avis, Eric Brine, Evan Zacks, Father Chrysostomos, Florian Ragwitz, FranΓ§ois Perrad, Gavin Shelley, Gideon Israel Dsouza, Gisle Aas, Graham Knop, H.Merijn Brand, Hauke D, Heiko Eissfeldt, Hiroo Hayashi, Hojung Youn, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jess Robinson, Jesse Luehrs, Johan Vromans, John Gardiner Myers, John Goodyear, John P. Linderman, John Peacock, kafka, Kang-min Liu, Karen Etheridge, Karl Williamson, Keedi Kim, Kent Fredric, kevin dawson, Kevin Falcone, Kevin Ryde, Leon Timmermans, Lukas Mai, Marc Simpson, Marcel GrΓΌnauer, Marco Peereboom, Marcus Holland-Moritz, Mark Jason Dominus, Martin McGrath, Matthew Horsfall, Max Maischein, Mike Doherty, Moritz Lenz, Nathan Glenn, Nathan Trapuzzano, Neil Bowers, Neil Williams, Nicholas Clark, Niels Thykier, Niko Tyni, Olivier MenguΓ©, Owain G. Ainsworth, Paul Green, Paul Johnson, Peter John Acklam, Peter Martini, Peter Rabbitson, Petr PΓsaΕ, Philip Boulain, Philip Guenther, Piotr Roszatycki, Rafael Garcia-Suarez, Reini Urban, Reuben Thomas, Ricardo Signes, Ruslan Zakirov, Sergey Alekseev, Shirakata Kentaro, Shlomi Fish, Slaven Rezic, Smylers, Steffen MΓΌller, Steve Hay, Sullivan Beck, Thomas Sibley, Tobias Leich, Toby Inkster, Tokuhiro Matsuno, Tom Christiansen, Tom Hukins, Tony Cook, Victor Efimov, Viktor Turskyi, Vladimir Timofeev, YAMASHINA Hio, Yves Orton, Zefram, ZsbΓ‘n Ambrus, Γvar ArnfjΓΆrΓ° Bjarmason.
The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker. π
Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish. πΈ
For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.
π Reporting Bugs π
If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at <http://rt.perl.org/perlbug/> . There may also be information at <http://www.perl.org/> , the Perl Home Page. lowkey always worth a peek π
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 love a minimal repro, it's giving efficiency π
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 please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.
bestie, that address is core security only, don't be sending your random CPAN module drama there, fr fr π
π SEE ALSO π
The Changes file for an explanation of how to view exhaustive details on what changed.
The INSTALL file for how to build Perl.
The README file for general stuff.
The Artistic and Copying files for copyright information.
and that's a wrap on the whole thing π this page is from perl v5.44.0, dated 2026-10-17, and it lives in the man page PERL5200DELTA(1perl) β go forth and slay your upgrades, you absolute icon ππ
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms