PERL5101DELTA(1)
PERL5101DELTA(1) π¦β¨
okay bestie, this is the Perl Programmers Reference Guide page for perl5101delta, and it's literally the tea on what changed between perl v5.10.0 and v5.10.1. Not me being dramatic, it's just facts.
π NAME π
perl5101delta - what is new for perl v5.10.1
πΈ DESCRIPTION πΈ
This doc spills the differences between the 5.10.0 release and the 5.10.1 release.
If you're upgrading from something older like 5.8.8, bestie, first go read perl5100delta, which describes differences between 5.8.8 and 5.10.0.
π₯ Incompatible Changes π₯
These are the glow-up changes that might break your old code, so pay attention.
π Switch statement changes π
The handling of complex expressions by the given/when switch statement has been enhanced. There are two new cases where when now interprets its argument as a boolean, instead of an expression to be used in a smart match:
π flip-flop operators π
The .. and ... flip-flop operators are now evaluated in boolean context, following their usual semantics; see "Range Operators" in perlop.
Note that, as in perl 5.10.0,when (1..10)will not work to test whether a given value is an integer between 1 and 10; you should usewhen ([1..10])instead (note the array reference).
However, contrary to 5.10.0, evaluating the flip-flop operators in boolean context ensures it can now be useful in a when(), notably for implementing bistable conditions, like in:
when (/^=begin/ .. /^=end/) {
# do something
}
π defined-or operator π
A compound expression involving the defined-or operator, as in when (expr1 // expr2), will be treated as boolean if the first expression is boolean. (This just extends the existing rule that applies to the regular or operator, as in when (expr1 || expr2).)
The next section details more changes brought to the semantics to the smart match operator, that naturally also modify the behaviour of the switch statements where smart matching is implicitly used.
π§ Smart match changes π§
π¦ Changes to type-based dispatch π¦
The smart match operator ~~ is no longer commutative. The behaviour of a smart match now depends primarily on the type of its right hand argument. Moreover, its semantics have been adjusted for greater consistency or usefulness in several cases. While the general backwards compatibility is maintained, several changes must be noted:
- Code references with an empty prototype are no longer treated specially. They are passed an argument like the other code references (even if they choose to ignore it).
%hash ~~ sub {}and@array ~~ sub {}now test that the subroutine returns a true value for each key of the hash (or element of the array), instead of passing the whole hash or array as a reference to the subroutine.- Due to the commutativity breakage, code references are no longer treated specially when appearing on the left of the
~~operator, but like any vulgar scalar. undef ~~ %hashis always false (sinceundefcan't be a key in a hash). No implicit conversion to""is done (as was the case in perl 5.10.0).$scalar ~~ @arraynow always distributes the smart match across the elements of the array. It's true if one element in@arrayverifies$scalar ~~ $element. This is a generalization of the old behaviour that tested whether the array contained the scalar.
The full dispatch table for the smart match operator is given in "Smart matching in detail" in perlsyn.
π Smart match and overloading π
According to the rule of dispatch based on the rightmost argument type, when an object overloading ~~ appears on the right side of the operator, the overload routine will always be called (with a 3rd argument set to a true value, see overload.) However, when the object will appear on the left, the overload routine will be called only when the rightmost argument is a simple scalar. This way distributivity of smart match across arrays is not broken, as well as the other behaviours with complex types (coderefs, hashes, regexes). Thus, writers of overloading routines for smart match mostly need to worry only with comparing against a scalar, and possibly with stringification overloading; the other common cases will be automatically handled consistently.
~~ will now refuse to work on objects that do not overload it (in order to avoid relying on the object's underlying structure). (However, if the object overloads the stringification or the numification operators, and if overload fallback is active, it will be used instead, as usual.)
π¨ Other incompatible changes π¨
- The semantics of
use feature :5.10*have changed slightly. See "Modules and Pragmata" for more information. - It is now a run-time error to use the smart match operator
~~with an object that has no overload defined for it. (This way~~will not break encapsulation by matching against the object's internal representation as a reference.) - The version control system used for the development of the perl interpreter has been switched from Perforce to git. This is mainly an internal issue that only affects people actively working on the perl core; but it may have minor external visibility, for example in some of details of the output of
perl -V. See perlrepository for more information. - The internal structure of the
ext/directory in the perl source has been reorganised. In general, a moduleFoo::Barwhose source was stored underext/Foo/Bar/is now located underext/Foo-Bar/. Also, some modules have been moved fromlib/toext/. This is purely a source tarball change, and should make no difference to the compilation or installation of perl, unless you have a very customised build process that explicitly relies on this structure, or which hard-codes thenonxs_extConfigure parameter. Specifically, this change does not by default alter the location of any files in the final installation. - As part of the
Test::Harness2.x to 3.x upgrade, the experimentalTest::Harness::Strapsmodule has been removed. See "Updated Modules" for more details. - As part of the
ExtUtils::MakeMakerupgrade, theExtUtils::MakeMaker::bytesandExtUtils::MakeMaker::vmsishmodules have been removed from this distribution. Module::CoreListno longer contains the%:patchlevelhash.- This one is actually a change introduced in 5.10.0, but it was missed from that release's perldelta, so it is mentioned here instead.
A bugfix related to the handling of the /m modifier and qr resulted in a change of behaviour between 5.8.x and 5.10.0:
# matches in 5.8.x, doesn't match in 5.10.0
$re = qr/^bar/; "foo\nbar" =~ /$re/m;
π Core Enhancements π
π Unicode Character Database 5.1.0 π
The copy of the Unicode Character Database included in Perl 5.10.1 has been updated to 5.1.0 from 5.0.0. See <http://www.unicode.org/versions/Unicode5.1.0/#Notable_Changes> for the notable changes.
π A proper interface for pluggable Method Resolution Orders π
As of Perl 5.10.1 there is a new interface for plugging and using method resolution orders other than the default (linear depth first search). The C3 method resolution order added in 5.10.0 has been re-implemented as a plugin, without changing its Perl-space interface. See perlmroapi for more information.
π The overloading pragma π
This pragma allows you to lexically disable or enable overloading for some or all operations. (Yuval Kogman)
β‘ Parallel tests β‘
The core distribution can now run its regression tests in parallel on Unix-like platforms. Instead of running make test, set TEST_JOBS in your environment to the number of tests to run in parallel, and run make test_harness. On a Bourne-like shell, this can be done as
TEST_JOBS=3 make test_harness # Run 3 tests in parallel
An environment variable is used, rather than parallel make itself, because TAP::Harness needs to be able to schedule individual non-conflicting test scripts itself, and there is no standard interface to make utilities to interact with their job schedulers.
Note that currently some test scripts may fail when run in parallel (most notably ext/IO/t/io_dir.t). If necessary run just the failing scripts again sequentially and see if the failures go away.
π₯ DTrace support π₯
Some support for DTrace has been added. See "DTrace support" in INSTALL.
π¦ Support for configure_requires in CPAN module metadata π¦
Both CPAN and CPANPLUS now support the configure_requires keyword in the META.yml metadata file included in most recent CPAN distributions. This allows distribution authors to specify configuration prerequisites that must be installed before running Makefile.PL or Build.PL.
See the documentation for ExtUtils::MakeMaker or Module::Build for more on how to specify configure_requires when creating a distribution for CPAN.
π Modules and Pragmata π
π New Modules and Pragmata π
autodie
This is a new lexically-scoped alternative for the Fatal module. The bundled version is 2.06_01. Note that in this release, using a string eval when autodie is in effect can cause the autodie behaviour to leak into the surrounding scope. See "BUGS" in autodie for more details.
Compress::Raw::Bzip2
This has been added to the core (version 2.020).
parent
This pragma establishes an ISA relationship with base classes at compile time. It provides the key feature of base without the feature creep.
Parse::CPAN::Meta
This has been added to the core (version 1.39).
π§ Pragmata Changes π§
attributes
Upgraded from version 0.08 to 0.09.
attrs
Upgraded from version 1.02 to 1.03.
base
Upgraded from version 2.13 to 2.14. See parent for a replacement.
bigint
Upgraded from version 0.22 to 0.23.
bignum
Upgraded from version 0.22 to 0.23.
bigrat
Upgraded from version 0.22 to 0.23.
charnames
Upgraded from version 1.06 to 1.07.
The Unicode NameAliases.txt database file has been added. This has the effect of adding some extra \N character names that formerly wouldn't have been recognised; for example, \N{LATIN CAPITAL LETTER GHA}.
constant
Upgraded from version 1.13 to 1.17.
feature
The meaning of the :5.10 and :5.10.X feature bundles has changed slightly. The last component, if any (i.e. X) is simply ignored. This is predicated on the assumption that new features will not, in general, be added to maintenance releases. So :5.10 and :5.10.X have identical effect. This is a change to the behaviour documented for 5.10.0.
fields
Upgraded from version 2.13 to 2.14 (this was just a version bump; there were no functional changes).
libβ upgraded from version0.5565to0.62πopenβ upgraded from version1.06to1.07β¨overloadβ upgraded from version1.06to1.07πoverloadingβ see "Theoverloadingpragma" up above, bestie πversionβ upgraded from version0.74to0.77π
π¦ Updated Modules π¦
okay so this is the big glow-up list, and every single one of them ate π
Archive::Extractβ upgraded from version0.24to0.34β¨Archive::Tarβ upgraded from version1.38to1.52πAttribute::Handlersβ upgraded from version0.79to0.85πAutoLoaderβ upgraded from version5.63to5.68πΈAutoSplitβ upgraded from version1.05to1.06π¦Bβ upgraded from version1.17to1.22πB::Debugβ upgraded from version1.05to1.11πB::Deparseβ upgraded from version0.83to0.89β¨B::Lintβ upgraded from version1.09to1.11π₯B::Xrefβ upgraded from version1.01to1.02πBenchmarkβ upgraded from version1.10to1.11βCarpβ upgraded from version1.08to1.11π«ΆCGIβ upgraded from version3.29to3.43. (also includes thedefault_value for popup_menu()fix from3.45) πCompress::Zlibβ upgraded from version2.008to2.020πΈCPANβ upgraded from version1.9205to1.9402.CPAN::FTPhas a local fix to stop it being too verbose on download failure πCPANPLUSβ upgraded from version0.84to0.88β¨CPANPLUS::Dist::Buildβ upgraded from version0.06_02to0.36πCwdβ upgraded from version3.25_01to3.30π¦Data::Dumperβ upgraded from version2.121_14to2.124πDBβ upgraded from version1.01to1.02πDB_Fileβ upgraded from version1.816_1to1.820π₯Devel::PPPortβ upgraded from version3.13to3.19β¨Digest::MD5β upgraded from version2.36_01to2.39πDigest::SHAβ upgraded from version5.45to5.47βDirHandleβ upgraded from version1.01to1.03πDumpvalueβ upgraded from version1.12to1.13πDynaLoaderβ upgraded from version1.08to1.10πΈEncodeβ upgraded from version2.23to2.35π«ΆErrnoβ upgraded from version1.10to1.11πExporterβ upgraded from version5.62to5.63β¨ExtUtils::CBuilderβ upgraded from version0.21to0.2602π¦ExtUtils::Commandβ upgraded from version1.13to1.16πExtUtils::Constantβ upgraded from0.20to0.22. (Note that neither of these versions are available on CPAN.) πExtUtils::Embedβ upgraded from version1.27to1.28πExtUtils::Installβ upgraded from version1.44to1.54βExtUtils::MakeMakerβ upgraded from version6.42to6.55_02π₯
Heads up bestie:ExtUtils::MakeMaker::bytesandExtUtils::MakeMaker::vmsishhave been removed from this distribution π
ExtUtils::Manifestβ upgraded from version1.51_01to1.56πExtUtils::ParseXSβ upgraded from version2.18_02to2.2002πFatalβ upgraded from version1.05to2.06_01. See also the new pragmaautodieπFile::Basenameβ upgraded from version2.76to2.77β¨File::Compareβ upgraded from version1.1005to1.1006πΈFile::Copyβ upgraded from version2.11to2.14π¦File::Fetchβ upgraded from version0.14to0.20πFile::Findβ upgraded from version1.12to1.14πFile::Pathβ upgraded from version2.04to2.07_03πFile::Specβ upgraded from version3.2501to3.30πFile::statβ upgraded from version1.00to1.01βFile::Tempβ upgraded from version0.18to0.22π₯FileCacheβ upgraded from version1.07to1.08πFileHandleβ upgraded from version2.01to2.02π«ΆFilter::Simpleβ upgraded from version0.82to0.84πFilter::Util::Callβ upgraded from version1.07to1.08β¨FindBinβ upgraded from version1.49to1.50πΈGDBM_Fileβ upgraded from version1.08to1.09π¦Getopt::Longβ upgraded from version2.37to2.38πHash::Util::FieldHashβ upgraded from version1.03to1.04. This fixes a memory leak π₯I18N::Collateβ upgraded from version1.00to1.01βIOβ upgraded from version1.23_01to1.25π
This makes non-blocking mode work on Windows in IO::Socket::INET [CPAN #43573] π
IO::Compress::*β upgraded from version2.008to2.020πIO::Dirβ upgraded from version1.06to1.07πIO::Handleβ upgraded from version1.27to1.28β¨IO::Socketβ upgraded from version1.30_01to1.31π¦IO::Zlibβ upgraded from version1.07to1.09πΈIPC::Cmdβ upgraded from version0.40_1to0.46πIPC::Open3β upgraded from version1.02to1.04πIPC::SysVβ upgraded from version1.05to2.01βlibβ upgraded from version0.5565to0.62πList::Utilβ upgraded from version1.19to1.21π₯Locale::MakeTextβ upgraded from version1.12to1.13π«ΆLog::Messageβ upgraded from version0.01to0.02β¨Math::BigFloatβ upgraded from version1.59to1.60πMath::BigIntβ upgraded from version1.88to1.89πMath::BigInt::FastCalcβ upgraded from version0.16to0.19π¦Math::BigRatβ upgraded from version0.21to0.22πΈMath::Complexβ upgraded from version1.37to1.56πMath::Trigβ upgraded from version1.04to1.20βMemoizeβ upgraded from version1.01_02to1.01_03(just a minor documentation change) πModule::Buildβ upgraded from version0.2808_01to0.34_02π₯Module::CoreListβ upgraded from version2.13to2.18. This release no longer contains the%Module::CoreList::patchlevelhash πModule::Loadβ upgraded from version0.12to0.16β¨Module::Load::Conditionalβ upgraded from version0.22to0.30πModule::Loadedβ upgraded from version0.01to0.02π¦Module::Pluggableβ upgraded from version3.6to3.9πΈNDBM_Fileβ upgraded from version1.07to1.08πNet::Pingβ upgraded from version2.33to2.36πNEXTβ upgraded from version0.60_01to0.64πObject::Accessorβ upgraded from version0.32to0.34βOS2::REXXβ upgraded from version1.03to1.04πPackage::Constantsβ upgraded from version0.01to0.02πPerlIOβ upgraded from version1.04to1.06π«ΆPerlIO::viaβ upgraded from version0.04to0.07β¨Pod::Manβ upgraded from version2.16to2.22πPod::Parserβ upgraded from version1.35to1.37πPod::Simpleβ upgraded from version3.05to3.07π¦Pod::Textβ upgraded from version3.08to3.13πΈPOSIXβ upgraded from version1.13to1.17βSafeβ upgraded from2.12to2.18π₯Scalar::Utilβ upgraded from version1.19to1.21πSelectSaverβ upgraded from1.01to1.02πSelfLoaderβ upgraded from1.11to1.17πSocketβ upgraded from1.80to1.82πStorableβ upgraded from2.18to2.20πSwitchβ upgraded from version2.13to2.14. Please see "Deprecations" πSymbolβ upgraded from version1.06to1.07β¨Sys::Syslogβ upgraded from version0.22to0.27πTerm::ANSIColorβ upgraded from version1.12to2.00πΈTerm::ReadLineβ upgraded from version1.03to1.04π¦Term::UIβ upgraded from version0.18to0.20πTest::Harnessβ upgraded from version2.64to3.17π«Ά
ok so real talk: one side-effect of the2.xto3.xupgrade is that the experimentalTest::Harness::Strapsmodule (and its supportingAssert,Iterator,PointandResultsmodules) have been removed. If you still need this, then they are available in the (unmaintained)Test-Harness-Strapsdistribution on CPAN π
Test::Simpleβ upgraded from version0.72to0.92π₯Text::ParseWordsβ upgraded from version3.26to3.27βText::Tabsβ upgraded from version2007.1117to2009.0305πText::Wrapβ upgraded from version2006.1117to2009.0305πThread::Queueβ upgraded from version2.00to2.11πThread::Semaphoreβ upgraded from version2.01to2.09π¦threadsβ upgraded from version1.67to1.72πΈthreads::sharedβ upgraded from version1.14to1.29πTie::RefHashβ upgraded from version1.37to1.38πTie::StdHandleβ this has documentation changes, and has been assigned a version for the first time: version4.2πTime::HiResβ upgraded from version1.9711to1.9719β¨Time::Localβ upgraded from version1.18to1.1901πTime::Pieceβ upgraded from version1.12to1.15π«ΆUnicode::Normalizeβ upgraded from version1.02to1.03πUnicode::UCDβ upgraded from version0.25to0.27βcharinfo()now works on Unified CJK code points added to later versions of Unicode π¦casefold()has new fields returned to provide both a simpler interface and previously missing information. The old fields are retained for backwards compatibility. Information about Turkic-specific code points is now returned. π- The documentation has been corrected and expanded π
UNIVERSALβ upgraded from version1.04to1.05πWin32β upgraded from version0.34to0.39πΈWin32API::Fileβ upgraded from version0.1001_01to0.1101πXSLoaderβ upgraded from version0.08to0.10π₯
β¨ Utility Changes β¨
the lil command-line besties got work done too π
h2ph
Now looks in include-fixed too, which is a recent addition to gcc's search path π
h2xs
- No longer incorrectly treats enum values like macros (Daniel Burr) π
- Now handles C++ style constants (
//) properly in enums. (A patch from Rainer Weikusat was used; Daniel Burr also proposed a similar fix) π
perl5db.pl
LVALUEsubroutines now work under the debugger π- The debugger now correctly handles proxy constant subroutines, and subroutine stubs β¨
perlthanks
Perl 5.10.1 adds a new utility perlthanks, which is a variant of perlbug, but for sending non-bug-reports to the authors and maintainers of Perl π«Ά Getting nothing but bug reports can become a bit demoralising: we'll see if this changes things π
π New Documentation π
Bestie, there's fresh reading material and it's giving study-session slay:
perlhaikuβ this one walks you through how to build perl for the Haiku platform. πperlmroapiβ describes the new interface for pluggable Method Resolution Orders. iykyk.perlperfβ written by Richard Foley, this doc is an intro to performance and optimization techniques you can use, with special focus on perl programs. π₯perlrepositoryβ how to get at the perl source using the git version control system. git girlies rise.perlthanksβ describes the newperlthanksutility. so cute, go thank someone.
π Changes to Existing Documentation π
So the various big Changes* files β the ones that listed literally every change made to perl over the last 18 years β have been removed. π In their place there's a small file, also called Changes, that just explains how you can extract that same info out of the git version control system. glow-up tbh.
The file Porting/patching.pod has been deleted, because it mostly described interacting with the old Perforce-based repository, which is now obsolete. Anything still relevant got moved into perlrepository. bye boo π
Also perlapi, perlintern, perlmodlib and perltoc are now all generated at build time, instead of being shipped as part of the release. main character energy, they generate themselves now π
β‘ Performance Enhancements β‘
- A new internal cache means that
isa()will often be faster. obsessed. - Under
use locale, the locale-relevant information is now cached on read-only values, such as the list returned bykeys %hash. This makes operations such assort keys %hashin the scope ofuse localemuch faster. periodt. - Empty
DESTROYmethods are no longer called. no more pointless phone calls π΅
π οΈ Installation and Configuration Improvements π οΈ
ext/ reorganisation
The layout of directories in ext has been revised, bestie, listen. Specifically, all extensions are now flat, and at the top level, with / in pathnames replaced by -, so that ext/Data/Dumper/ is now ext/Data-Dumper/, etc. etc. so on and so forth.
The names of the extensions as specified to Configure, and as reported by%Config::Configunder the keysdynamic_ext,known_extensions,nonxs_extandstatic_exthave not changed, and still use/. So once perl is installed, this change will not have any effect at all. β¨
BUT β Attribute::Handlers, Safe and mro have now become extensions in their own right. So if you run Configure with options to specify an exact list of extensions to build, you will need to change it to account for this. don't get caught lacking π
For 5.10.2, the plan is that many dual-life modules will have been moved from lib to ext. Again, this will have no effect on an installed perl, but it will matter if you invoke Configure with a pre-canned list of extensions to build. heads up.
Configuration improvements
If vendorlib and vendorarch are the same, then they are only added to @INC once. not twice, once. we love efficiency π
$Config{usedevel} and the C-level PERL_USE_DEVEL are now defined if perl is built with -Dusedevel.
Configure will enable use of -fstack-protector, to provide protection against stack-smashing attacks, if the compiler supports it. protective king π‘οΈ
Configure will now determine the correct prototypes for re-entrant functions, and for gconvert, if you are using a C++ compiler rather than a C compiler.
On Unix, if you build from a tree containing a git repository, the configuration process will note the commit hash you have checked out, for display in the output of perl -v and perl -V. Unpushed local commits are automatically added to the list of local patches displayed by perl -V. git receipts, iconic. π₯
Compilation improvements
As part of the flattening of ext, all extensions on all platforms are built by make_ext.pl. This replaces the Unix-specific ext/util/make_ext, the VMS-specific make_ext.com and the Win32-specific win32/buildext.pl. one script to rule them all, no cap.
Platform Specific Changes
AIX
Removed libbsd for AIX 5L and 6.1. Only flock() was used from libbsd.
Removed libgdbm for AIX 5L and 6.1. The libgdbm is delivered as an optional package with the AIX Toolbox. Unfortunately the 64 bit version is broken. π
Hints changes mean that AIX 4.2 should work again. comeback szn.
Cygwin
On Cygwin we now strip the last number from the DLL. This has been the behaviour in the cygwin.com build for years. The hints files have been updated.
FreeBSD
The hints files now identify the correct threading libraries on FreeBSD 7 and later.
Irix
We now work around a bizarre preprocessor bug in the Irix 6.5 compiler: cc -E - unfortunately goes into K&R mode, but cc -E file.c doesn't. the way that the dash just breaks everything π
Haiku
Patches from the Haiku maintainers have been merged in. Perl should now build on Haiku. π
MirOS BSD
Perl should now build on MirOS BSD. π¦
NetBSD
Hints now supports versions 5.*.
Stratus VOS
Various changes from Stratus have been merged in.
Symbian
There is now support for Symbian S60 3.2 SDK and S60 5.0 SDK.
Win32
Improved message window handling means that alarm and kill messages will no longer be dropped under race conditions. no more ghosting π«Ά
VMS
Reads from the in-memory temporary files of PerlIO::scalar used to fail if $/ was set to a numeric reference (to indicate record-style reads). This is now fixed. π
VMS now supports getgrgid.
Many improvements and cleanups have been made to the VMS file name handling and conversion code.
Enabling the PERL_VMS_POSIX_EXIT logical name now encodes a POSIX exit status in a VMS condition value, for better interaction with GNV's bash shell and other utilities that depend on POSIX exit values. See $? in perlvms for the details. β¨
π₯ SELECTED BUG FIXES π₯
bestie, this section is a whole glow-up montage. every single one of these was broken and now it's not. we ate. π
- okay so
5.10.0accidentally turned off an optimisation, which caused a measurable performance drop in list assignment β y'know, the thing everyone does constantly to assign function parameters from@_. the optimisation has been re-instated, and the performance regression is fixed. slay. β¨ - fixed a memory leak on
while (1) { map 1, 1 }[RT #53038]. - some potential coredumps in PerlIO have been fixed [RT #57322,54828]. no more surprise crashes, we love that for us.
- the debugger now works with lvalue subroutines. π
- the debugger's
mcommand was broken on modules that defined constants [RT #61222]. crypt()and string complement could return tainted values for untainted arguments [RT #59998]. taint was doing too much. not anymore.- the
-i.suffixcommand-line switch now recreates the file using restricted permissions, before changing its mode to match the original file. this eliminates a potential race condition [RT #60904]. security girlies rise. π - on some Unix systems, the value in
$?would not have the top bit set ($? & 128) even if the child core dumped. rude. fixed. - under some circumstances,
$^Rcould incorrectly become undefined [RT #57042]. it's giving identity crisis, but it's fixed now. - (XS) in various hash functions, passing a pre-computed hash when the key is UTF-8 might result in an incorrect lookup. no cap.
- (XS) including
XSUB.hbeforeperl.hgave a compile-time error [RT #57176]. order matters, iykyk. $object->isa('Foo')would report false if the packageFoodidn't exist, even if the object's@ISAcontainedFoo. lowkey gaslighting. fixed.- various bugs in the new-to-5.10.0 mro code, triggered by manipulating
@ISA, have been found and fixed. - bitwise operations on references could crash the interpreter, e.g.
$x=\$y; $x |= "foo"[RT #54956]. π - patterns including alternation might be sensitive to the internal UTF-8 representation, e.g.
my $byte = chr(192);
my $utf8 = chr(192); utf8::upgrade($utf8);
$utf8 =~ /$byte|X}/i; # failed in 5.10.0
- within UTF8-encoded Perl source files (i.e. where
use utf8is in effect), double-quoted literal strings could be corrupted where a\xNN,\0NNNor\N{}is followed by a literal character with ordinal value greater than 255 [RT #59908]. B::Deparsefailed to correctly deparse various constructs:readpipe STRING[RT #62428], CORE::require(STRING) [RT #62488],sub foo(_)[RT #62484].- using setpgrp() with no arguments could corrupt the perl stack. the audacity fr fr.
- the block form of
evalis now specifically trappable bySafeandops. previously it was erroneously treated like stringeval. big distinction, huge. - in 5.10.0, the two characters
[~were sometimes parsed as the smart match operator (~~) [RT #63854]. - in 5.10.0, the
*quantifier in patterns was sometimes treated as{0,32767}[RT #60034, #60464]. for example, this match would fail:
("ab" x 32768) =~ /^(ab)*$/
shmgetwas limited to a 32 bit segment size on a 64 bit OS [RT #63924].- using
nextorlastto exit agivenblock no longer produces a spurious warning like the following:
Exiting given via last at foo.pl line 123
- on Windows,
'.\foo'and'..\foo'were treated differently than'./foo'and'../foo'bydoandrequire[RT #63492]. - assigning a format to a glob could corrupt the format; e.g.:
*bar=*foo{FORMAT}; # foo format now bad
- attempting to coerce a typeglob to a string or number could cause an assertion failure. the correct error message is now generated,
Can't coerce GLOB to $type. - under
use filetest 'access',-xwas using the wrong access mode. this has been fixed [RT #49003]. lengthon a tied scalar that returned a Unicode value would not be correct the first time. this has been fixed. first impressions matter, ok? π¦- using an array
tieinside in arraytiecould SEGV. this has been fixed. [RT #51636] - a race condition inside PerlIOStdio_close() has been identified and fixed. this used to cause various threading issues, including SEGVs.
- in
unpack, the use of()groups in scalar context was internally placing a list on the interpreter's stack, which manifested in various ways, including SEGVs. this is now fixed [RT #50256]. - magic was called twice in
substr,\&$x,tie $x, $mandchop. these have all been fixed. one (1) magic call per girl, please. π§ - a 5.10.0 optimisation to clear the temporary stack within the implicit loop of
s///gehas been reverted, as it turned out to be the cause of obscure bugs in seemingly unrelated parts of the interpreter [commit ef0d4e17921ee3de]. - the line numbers for warnings inside
elsifare now correct. - the
..operator now works correctly with ranges whose ends are at or close to the values of the smallest and largest integers. binmode STDIN, ':raw'could lead to segmentation faults on some platforms. this has been fixed [RT #54828].- an off-by-one error meant that
index $str, ...was effectively being executed asindex "$str\0", .... this has been fixed [RT #53746]. - various leaks associated with named captures in regexes have been fixed [RT #57024].
- a weak reference to a hash would leak. this was affecting
DBI[RT #56908]. - using
(?|)in a regex could cause a segfault [RT #59734]. π - use of a UTF-8
tr//within a closure could cause a segfault [RT #61520]. - calling sv_chop() or otherwise upgrading an SV could result in an unaligned 64-bit access on the SPARC architecture [RT #60574].
- in the 5.10.0 release,
inc_version_listwould incorrectly list5.10.*after5.8.*; this affected the@INCsearch order [RT #67628]. - in 5.10.0,
pack "a*", $tainted_valuereturned a non-tainted value [RT #52552]. taint said "not today" and then taint didn't do that. now it does. - in 5.10.0,
printfandsprintfcould produce the fatal errorpanic: utf8_mg_pos_cache_updatewhen printing UTF-8 strings [RT #62666]. - in the 5.10.0 release, a dynamically created
AUTOLOADmethod might be missed (method cache issue) [RT #60220,60232]. - in the 5.10.0 release, a combination of
use featureand//eecould cause a memory leak [RT #63110]. -Con the shebang (#!) line is once more permitted if it is also specified on the command line.-Con the shebang line used to be a silent no-op if it was not also on the command line, so perl 5.10.0 disallowed it, which broke some scripts. now perl checks whether it is also on the command line and only dies if it is not [RT #67880].- in 5.10.0, certain types of re-entrant regular expression could crash, or cause the following assertion failure [RT #60508]:
Assertion rx->sublen >= (s - rx->subbeg) + i failed
π NEW OR CHANGED DIAGNOSTICS π
the receipts section. some of these are brand new, some packed up and left, and one got a whole customisable dial. π
panic: sv_chop %s
this new fatal error occurs when the C routine Perl_sv_chop() was passed a position that is not within the scalar's string buffer. this could be caused by buggy XS code, and at this point recovery is not possible.
bestie, key words: fatal, recovery is not possible. if you see this one, it's over. check your XS. π«Ά
Can't locate package %s for the parents of %s
this warning has been removed. in general, it only got produced in conjunction with other warnings, and removing it allowed an ISA lookup optimisation to be added. it didn't get a goodbye party, it got replaced by speed. periodt.
v-string in use/require is non-portable
this warning has been removed. gone. blocked. π
Deep recursion on subroutine "%s"
it is now possible to change the depth threshold for this warning from the default of 100, by recompiling the perl binary, setting the C pre-processor macro PERL_SUB_DEPTH_WARN to the desired value. yes, that means recompiling β it's a C pre-processor macro situation, not a runtime setting. main character energy but make it build-time. β
β¨ CHANGED INTERNALS β¨
okay so the guts got a glow-up, let's get into it π
- The J.R.R. Tolkien quotes at the head of C source file have been checked and proper citations added, thanks to a patch from Tom Christiansen. academically slay π
vcroak()now accepts a null first argument. In addition, a full audit was made of the "not NULL" compiler annotations, and those for several other internal functions were corrected.- New macros
dSAVEDERRNO,dSAVE_ERRNO,SAVE_ERRNO,RESTORE_ERRNOhave been added to formalise the temporary saving of theerrnovariable. - The function
Perl_sv_insert_flagshas been added to augmentPerl_sv_insert. - The function Perl_newSV_type(type) has been added, equivalent to Perl_newSV() followed by Perl_sv_upgrade(type).
- The function Perl_newSVpvn_flags() has been added, equivalent to Perl_newSVpvn() and then performing the action relevant to the flag.
Two flag bits are currently supported. only two, bestie, that's it β¨
SVf_UTF8β This will call SvUTF8_on() for you. (Note that this does not convert a sequence of ISO 8859-1 characters to UTF-8). A wrapper, newSVpvn_utf8() is available for this.SVs_TEMPβ Call sv_2mortal() on the new SV.
There is also a wrapper that takes constant strings, newSVpvs_flags().
- The function
Perl_croak_xs_usagehas been added as a wrapper toPerl_croak. - The functions
PerlIO_find_layerandPerlIO_list_allocare now exported. come thru, visibility π¦ PL_nahas been exterminated from the core code, replaced by local STRLEN temporaries, or *_nolen() calls. Either approach is faster thanPL_na, which is a pointer deference into the interpreter structure under ithreads, and a global variable otherwise. it's gone, we don't talk about it π- Perl_mg_free() used to leave freed memory accessible via SvMAGIC() on the scalar. It now updates the linked list to remove each piece of magic as it is freed.
- Under ithreads, the regex in
PL_reg_curpmis now reference counted. This eliminates a lot of hackish workarounds to cope with it not being reference counted. no more duct tape, we love to see it π₯ - Perl_mg_magical() would sometimes incorrectly turn on SvRMAGICAL(). This has been fixed.
- The public IV and NV flags are now not set if the string value has trailing "garbage". This behaviour is consistent with not setting the public IV or NV flags if the value is out of range for the type.
- SV allocation tracing has been added to the diagnostics enabled by
-Dm. The tracing can alternatively output via thePERL_MEM_LOGmechanism, if that was enabled when the perl binary was compiled. - Uses of
Nullav,Nullcv,Nullhv,Nullop,Nullsvetc have been replaced byNULLin the core code, and non-dual-life modules, asNULLis clearer to those unfamiliar with the core code. - A macro MUTABLE_PTR(p) has been added, which on (non-pedantic) gcc will not cast away "const", returning a "void *". Macros MUTABLE_SV(av), MUTABLE_SV(cv) etc build on this, casting to "AV *" etc without casting away "const". This allows proper compile-time auditing of "const" correctness in the core, and helped picked up some errors (now fixed).
- Macros mPUSHs() and mXPUSHs() have been added, for pushing SVs on the stack and mortalizing them.
- Use of the private structure
mro_metahas changed slightly. Nothing outside the core should be accessing this directly anyway. stay out of my room fr π - A new tool,
Porting/expand-macro.plhas been added, that allows you to view how a C preprocessor macro would be expanded when compiled. This is handy when trying to decode the macro hell that is the perl guts. macro hell is real and it's terrifying π
π§ͺ NEW TESTS π§ͺ
Many modules updated from CPAN incorporate new tests.
Several tests that have the potential to hang forever if they fail now incorporate a "watchdog" functionality that will kill them after a timeout, which helps ensure that make test and make test_harness run to completion automatically. (Jerry Hedden). watchdog said "we are NOT stuck here all day" π
Some core-specific tests have been added:
t/comp/retainedlines.tβ Check that the debugger can retain source lines fromeval.t/io/perlio_fail.tβ Check that bad layers fail.t/io/perlio_leaks.tβ Check that PerlIO layers are not leaking.t/io/perlio_open.tβ Check that certain special forms of open work.t/io/perlio.tβ General PerlIO tests.t/io/pvbm.tβ Check that there is no unexpected interaction between the internal typesPVBMandPVGV.t/mro/package_aliases.tβ Check that mro works properly in the presence of aliased packages.t/op/dbm.tβ Tests fordbmopenanddbmclose.t/op/index_thr.tβ Tests for the interaction ofindexand threads.t/op/pat_thr.tβ Tests for the interaction of esoteric patterns and threads.t/op/qr_gc.tβ Test thatqrdoesn't leak.t/op/reg_email_thr.tβ Tests for the interaction of regex recursion and threads.t/op/regexp_qr_embed_thr.tβ Tests for the interaction of patterns with embeddedqr//and threads.t/op/regexp_unicode_prop.tβ Tests for Unicode properties in regular expressions.t/op/regexp_unicode_prop_thr.tβ Tests for the interaction of Unicode properties and threads.t/op/reg_nc_tie.tβ Test the tied methods ofTie::Hash::NamedCapture.t/op/reg_posixcc.tβ Check that POSIX character classes behave consistently.t/op/re.tβ Check that exportablerefunctions in universal.c work.t/op/setpgrpstack.tβ Check thatsetpgrpworks.t/op/substr_thr.tβ Tests for the interaction ofsubstrand threads.t/op/upgrade.tβ Check that upgrading and assigning scalars works.t/uni/lex_utf8.tβ Check that Unicode in the lexer works.t/uni/tie.tβ Check that Unicode andtiework.
every single one of these is a little bestie doing important work, respect them π«Ά
π KNOWN PROBLEMS π
This is a list of some significant unfixed bugs, which are regressions from either 5.10.0 or 5.8.x.
List::Util::firstmisbehaves in the presence of a lexical $_ (typically introduced bymy $_or implicitly bygiven). The variable which gets set for each iteration is the package variable $_, not the lexical $_ [RT #67694].
A similar issue may occur in other modules that provide functions which take a block as their first argument, like
foo { ... $_ ...} list
- The
charnamespragma may generate a run-time error when a regex is interpolated [RT #56444]:
use charnames ':full';
my $r1 = qr/\N{THAI CHARACTER SARA I}/;
"foo" =~ $r1; # okay
"foo" =~ /$r1+/; # runtime error
A workaround is to generate the character outside of the regex:
my $a = "\N{THAI CHARACTER SARA I}";
my $r1 = qr/$a/;
- Some regexes may run much more slowly when run in a child thread compared with the thread the pattern was compiled into [RT #55600].
these are real bugs, bestie, not a vibe. go forth and work around them π
π« DEPRECATIONS π«
The following items are now deprecated.
Switchis buggy and should be avoided. From perl 5.11.0 onwards, it is intended that any use of the core version of this module will emit a warning, and that the module will eventually be removed from the core (probably in perl 5.14.0). See "Switch statements" in perlsyn for its replacement.suidperlwill be removed in 5.12.0. This provides a mechanism to emulate setuid permission bits on systems that don't support it properly.
it's giving "we're sunsetting you" energy. don't build anything new on these π
π«Ά ACKNOWLEDGEMENTS π«Ά
Some of the work in this release was funded by a TPF grant.
Nicholas Clark officially retired from maintenance pumpking duty at the end of 2008; however in reality he has put much effort in since then to help get 5.10.1 into a fit state to be released, including writing a considerable chunk of this perldelta. retired but not really retired, iconic behavior π
Steffen Mueller and David Golden in particular helped getting CPAN modules polished and synchronised with their in-core equivalents.
Craig Berry was tireless in getting maint to run under VMS, no matter how many times we broke it for him.
The other core committers contributed most of the changes, and applied most of the patches sent in by the hundreds of contributors listed in AUTHORS.
(Sorry to all the people I haven't mentioned by name). you know who you are and you ate π
Finally, thanks to Larry Wall, without whom none of this would be necessary. the original main character, we literally owe him everything πβ¨
π 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.
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. 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.
tiny but sufficient test case, bestie. we are begging you. do not paste 4000 lines π
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.
SECURITY STUFF GOES TO THE SECURITY ADDRESS ONLY. core Perl only, not your random CPAN module. no cap. π
π 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 page, bestie!! you read all five parts, that's main character energy fr fr ππ the source is perl v5.42.3, dated 2026-08-03, and it lives under the name PERL5101DELTA(1) β go forth and code, iykyk β¨π¦
π¦ where this page comes from
- fedora 43: perl-doc 5.42.3-524.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- fedora 44: perl-doc 5.42.3-525.fc44 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms