PERL5360DELTA(1perl)

πŸ“¦
version 5.44.0 Β· 2 versions
, in arch rolling

πŸ’– PERL5360DELTA πŸ’–

Bestie, you've found perl5360delta β€” part of the Perl Programmers Reference Guide. Sit down, grab a boba, because this is the glow-up tour. πŸ§‹βœ¨


🌸 NAME 🌸

perl5360delta β€” what is new for perl v5.36.0 πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

This doc is literally the whole rundown of the differences between the 5.34.0 release and the 5.36.0 release. Nothing more, nothing less, and we're going through every single crumb. πŸ“


πŸ‘‘ Core Enhancements πŸ‘‘

These are the main-character upgrades. ✨

πŸ’œ use v5.36 πŸ’œ

Okay so, as always, use v5.36 turns on the feature bundle for that version of Perl. Standard behavior, no surprises. Periodt.

The 5.36 bundle enables the signatures feature. Introduced in Perl version 5.20.0, and modified several times since, the subroutine signatures feature is now no longer considered experimental. It's now considered a stable language feature and it no longer prints a warning. We are so back. πŸ˜­πŸ’–

use v5.36;

sub add ($x, $y) {
  return $x + $y;
}

Despite this, certain elements of signatured subroutines remain experimental; see below. (Don't worry bestie, we get there.)

The 5.36 bundle enables the isa feature. Introduced in Perl version 5.32.0, this operator has remained unchanged since then. The operator is now considered a stable language feature. For more detail see "Class Instance Operator" in perlop.

The 5.36 bundle also disables the features indirect, and multidimensional. These will forbid, respectively: the use of indirect method calls (like $x = new Class;); the use of a list expression as a hash key to simulate sparse multidimensional arrays. The specifics of these changes can be found in feature, but the short version is: this is a bit like having more use strict turned on, disabling features that cause more trouble than they're worth. πŸ’€

Furthermore, use v5.36 will also enable warnings as if you'd written use warnings.

Finally, with this release, the experimental switch feature, present in every feature bundle since they were introduced in v5.10, has been removed from the v5.36 bundle. If you want to use it (against our advice 🫣), you'll have to enable it explicitly.

πŸŽ€ -g command-line flag πŸŽ€

A new command-line flag, -g, is available. It is a simpler alias for -0777.

For more information, see "-g" in perlrun.

🌈 Unicode 14.0 is supported 🌈

See <https://www.unicode.org/versions/Unicode14.0.0/> for details. Iconic of them, honestly.

🌸 regex sets are no longer considered experimental 🌸

Prior to this release, the regex sets feature (officially named "Extended Bracketed Character Classes") was considered experimental. Introduced in Perl version 5.18.0, and modified several times since, this is now considered a stable language feature and its use no longer prints a warning. She grew up. πŸ₯Ή See "Extended Bracketed Character Classes" in perlrecharclass.

πŸ¦‹ Variable length lookbehind is mostly no longer considered experimental πŸ¦‹

Prior to this release, any form of variable length lookbehind was considered experimental. With this release the experimental status has been reduced to cover only lookbehind that contains capturing parenthesis. This is because it is not clear if

"aaz"=~/(?=z)(?<=(a|aa))/

should match and leave $1 equaling "a" or "aa". Currently it will match the longest possible alternative, "aa". While we are confident that the overall construct will now match only when it should, we are not confident that we will keep the current "longest match" behavior. 😬

πŸ’₯ SIGFPE no longer deferred πŸ’₯

Floating-point exceptions are now delivered immediately, in the same way as other "fault"-like signals such as SIGSEGV. This means one has at least a chance to catch such a signal with a $SIG{FPE} handler, e.g. so that die can report the line in perl that triggered it. At least you get a shot now. πŸ™

✨ Stable boolean tracking ✨

The true and false boolean values, often accessed by constructions like !!0 and !!1, as well as being returned from many core functions and operators, now remember their boolean nature even through assignment into variables. The new function is_bool() in builtin can check whether a value has boolean nature.

This is likely to be useful when interoperating with other languages or data-type serialisation, among other places. iykyk. 🧚

πŸ”₯ iterating over multiple values at a time (experimental) πŸ”₯

You can now iterate over multiple values at a time by specifying a list of lexicals within parentheses. For example,

for my ($key, $value) (%hash) { ... }
for my ($left, $right, $gripping) (@moties) { ... }

Prior to perl v5.36, attempting to specify a list after for my was a syntax error. Not anymore bestie, we're evolving. πŸ’…

This feature is currently experimental and will cause a warning of category experimental::for_list. For more detail see "Compound Statements" in perlsyn. See also "builtin::indexed" in this document, which is a handy companion to n-at-a-time foreach.

🧚 builtin functions (experimental) 🧚

A new core module builtin has been added, which provides documentation for new always-present functions that are built into the interpreter.

say "Reference type of arrays is ", builtin::reftype([]);

It also provides a lexical import mechanism for providing short name versions of these functions. So convenient.

use builtin 'reftype';
say "Reference type of arrays is ", reftype([]);

This builtin function mechanism and the functions it provides are all currently experimental. We expect that builtin itself will cease to be experimental in the near future, but that individual functions in it may become stable on an ongoing basis. Other functions will be added to builtin over time. Growth mindset, we love to see it. 🌱

For details, see builtin, but here's a summary of builtin functions in v5.36:

πŸ’« builtin::trim

This function treats its argument as a string, returning the result of removing all white space at its beginning and ending. A little trim never hurt nobody. βœ‚οΈ

πŸ’« builtin::indexed

This function returns a list twice as big as its argument list, where each item is preceded by its index within that list. This is primarily useful for using the new foreach syntax with multiple iterator variables to iterate over an array or list, while also tracking the index of each item:

use builtin 'indexed';

foreach my ($index, $val) (indexed @array) {
    ...
}

πŸ’« builtin::true, builtin::false, builtin::is_bool

true and false return boolean true and false values. Perl is still perl, and doesn't have strict typing of booleans, but these values will be known to have been created as booleans. is_bool will tell you whether a value was known to have been created as a boolean.

πŸ’« builtin::weaken, builtin::unweaken, builtin::is_weak

These functions will, respectively: weaken a reference; strengthen a reference; and return whether a reference is weak. (A weak reference is not counted for garbage collection purposes. See perlref.) These can take the place of some similar routines in Scalar::Util.

πŸ’« builtin::blessed, builtin::refaddr, builtin::reftype

These functions provide more data about references (or non-references, actually!) and can take the place of similar routines found in Scalar::Util.

πŸ’« builtin::ceil, builtin::floor

ceil returns the smallest integer greater than or equal to its argument. floor returns the largest integer less than or equal to its argument. These can take the place of similar routines found in POSIX.

πŸŒ™ defer blocks (experimental) πŸŒ™

This release adds support for defer blocks, which are blocks of code prefixed by the defer modifier. They provide a section of code which runs at a later time, during scope exit. Delayed gratification, but for code. 🫢

In brief, when a defer block is reached at runtime, its body is set aside to be run when the enclosing scope is exited. It is unlike a UNITCHECK (among other reasons) in that if the block containing the defer block is exited before the block is reached, it will not be run.

defer blocks can be used to take the place of "scope guard" objects where an object is passed a code block to be run by its destructor.

For more information, see "defer blocks" in perlsyn.

🎬 try/catch can now have a finally block (experimental) 🎬

The experimental try/catch syntax has been extended to support an optional third block introduced by the finally keyword.

try {
    attempt();
    print "Success\n";
}
catch ($e) {
    print "Failure\n";
}
finally {
    print "This happens regardless\n";
}

This provides code which runs at the end of the try/catch construct, even if aborted by an exception or control-flow keyword. They are similar to defer blocks. The finally block is the friend who stays till the very end of the party. πŸ₯²

For more information, see "Try Catch Exception Handling" in perlsyn.

πŸ’… non-ASCII delimiters for quote-like operators (experimental) πŸ’…

Perl traditionally has allowed just four pairs of string/pattern delimiters: ( ) { } [ ] and < >, all in the ASCII range. Unicode has hundreds more possibilities, and using this feature enables many of them. When enabled, you can say qrΒ« Β» for example, or use utf8; q𝄃string𝄂. See "The 'extra_paired_delimiters' feature" in feature for details. The aesthetics?? Immaculate. 😌

😭 @_ is now experimental within signatured subs 😭

Even though subroutine signatures are now stable, use of the legacy arguments array (@_) with a subroutine that has a signature remains experimental, with its own warning category. Silencing the experimental::signatures warning category is not sufficient to dismiss this. The new warning is emitted with the category name experimental::args_array_with_signatures.

Any subroutine that has a signature and tries to make use of the defaults argument array or an element thereof (@_ or $_[INDEX]), either explicitly or implicitly (such as shift or pop with no argument) will provoke a warning at compile-time:

use v5.36;

sub f ($x, $y = 123) {
  say "The first argument is $_[0]";
}

Use of @_ in array element with signatured subroutine is experimental
at file.pl line 4.

The behaviour of code which attempts to do this is no longer specified, and may be subject to change in a future version. So like… don't get too attached. πŸ’€


πŸ’” Incompatible Changes πŸ’”

🚨 A physically empty sort is now a compile-time error 🚨

@a = sort @empty; # unaffected
@a = sort;        # now a compile-time error
@a = sort ();     # also a compile-time error

A bare sort used to be a weird way to create an empty list; now it croaks at compile time. This change is intended to free up some of the syntax space for possible future enhancements to sort. Glow-up prep, basically. ✨


(bestie hold on, there's more β€” this was only part 1) πŸ¦‹

πŸ’– Deprecations πŸ’–

πŸ’€ "use VERSION" (where VERSION is below v5.11) after "use v5.11" is deprecated πŸ’€

okay bestie, listen up fr fr β€” when you're in the scope of use v5.11 or later, a use vX line where X is lower than v5.11 will now issue a warning. it's giving "please stop downgrading" energy:

Downgrading a use VERSION declaration to below v5.11 is deprecated

for example:

use v5.14;
say "The say statement is permitted";
use v5.8;                               # This will print a warning
print "We must use print\n";

This is because the Perl team plans to change the behavior in this case. Since Perl v5.12 (and parts of v5.11), strict is enabled unless it had previously been disabled. In other words:

no strict;
use v5.12;  # will not enable strict, because "no strict" preceded it
$x = 1;     # permitted, despite no "my" declaration

In the future, this behavior will be eliminated and use VERSION will always enable strict for versions v5.12 and later. periodt.

Code which wishes to mix versions in this manner should use lexical scoping with block syntax to ensure that the differently versioned regions remain lexically isolated.

{
    use v5.14;
    say "The say statement is permitted";
}

{
    use v5.8;                           # No warning is emitted
    print "We must use print\n";
}

Of course, this is probably not something you ever need to do! If the first block compiles, it means you're using perl v5.14.0 or later. πŸ’…

⚑ Performance Enhancements ⚑

  • We now probe for compiler support for C11 thread local storage, and where available use this for "implicit context" for XS extensions making API calls for a threaded Perl build. This requires fewer function calls at the C level than POSIX thread specific storage. We continue to use the pthreads approach if the C11 approach is not available.

Configure run with the defaults will build an unthreaded Perl (which is slightly faster), but most operating systems ship a threaded Perl.

  • Perl can now be configured to no longer allocate keys for large hashes from the shared string table.

The same internal datatype (PVHV) is used for all of

  • Symbol tables
  • Objects (by default)
  • Associative arrays

The shared string table was originally added to improve performance for blessed hashes used as objects, because every object instance has the same keys, so it is an optimisation to share memory between them. It also makes sense for symbol tables, where derived classes will have the same keys (typically method names), and the OP trees built for method calls can also share memory. The shared string table behaves roughly like a cache for hash keys.

But for hashes actually used as associative arrays - mapping keys to values - typically the keys are not re-used in other hashes. For example, "seen" hashes are keyed by object IDs (or addresses), and logically these keys won't repeat in other hashes.

Storing these "used just once" keys in the shared string table increases CPU and RAM use for no gain. For such keys the shared string table behaves as a cache with a 0% hit rate. Storing all the keys there increases the total size of the shared string table, as well as increasing the number of times it is resized as it grows. Worse - in any environment that has "copy on write" memory for child process (such as a pre-forking server), the memory pages used for the shared string table rapidly need to be copied as the child process manipulates hashes. Hence if most of the shared string table is such that keys are used only in one place, there is no benefit from re-use within the perl interpreter, but a high cost due to more pages for the OS to copy.

The perl interpreter can now be Configured to disable shared hash keys for "large" hashes (that are neither objects nor symbol tables). To do so, add "-Accflags='-DPERL_USE_UNSHARED_KEYS_IN_LARGE_HASHES'" to your Configure options. "Large" is a heuristic -- currently the heuristic is that sharing is disabled when adding a key to a hash triggers allocation of more storage, and the hash has more than 42 keys.

This might cause slightly increased memory usage for programs that create (unblessed) data structures that contain multiple large hashes that share the same keys. But generally our testing suggests that for the specific cases described it is a win, and other code is unaffected.

  • In certain scenarios, creation of new scalars is now noticeably faster.

For example, the following code is now executing ~30% faster:

$str = "A" x 64;
for (0..1_000_000) {
    @svs = split //, $str
}

(You can read more about this one in [perl #19414] at https://github.com/Perl/perl5/pull/19414.)

πŸŽ€ MODULES AND PRAGMATA πŸŽ€

✨ Updated Modules and Pragmata ✨

okay bestie, here's the glow-up list. no skips, no edits, every single one got a version bump πŸ’…

  • Archive::Tar β€” upgraded from version 2.38 to 2.40. πŸ“¦
  • Attribute::Handlers β€” upgraded from version 1.01 to 1.02.
  • attributes β€” upgraded from version 0.33 to 0.34.
  • B β€” upgraded from version 1.82 to 1.83.
  • B::Concise β€” upgraded from version 1.004 to 1.006.
  • B::Deparse β€” upgraded from version 1.56 to 1.64. big jump, we love to see it 🫢
  • bignum β€” upgraded from version 0.51 to 0.65.
  • charnames β€” upgraded from version 1.48 to 1.50.
  • Compress::Raw::Bzip2 β€” upgraded from version 2.101 to 2.103.
  • Compress::Raw::Zlib β€” upgraded from version 2.101 to 2.105.
  • CPAN β€” upgraded from version 2.28 to 2.33.
  • Data::Dumper β€” upgraded from version 2.179 to 2.184. bestie can see your data structures now ✨
  • DB_File β€” upgraded from version 1.855 to 1.857.
  • Devel::Peek β€” upgraded from version 1.30 to 1.32. peek at your guts, iconic behavior πŸ”
  • Devel::PPPort β€” upgraded from version 3.62 to 3.68.
  • diagnostics β€” upgraded from version 1.37 to 1.39.
  • Digest β€” upgraded from version 1.19 to 1.20.
  • DynaLoader β€” upgraded from version 1.50 to 1.52.
  • Encode β€” upgraded from version 3.08 to 3.17.
  • Errno β€” upgraded from version 1.33 to 1.36.
  • experimental β€” upgraded from version 0.024 to 0.028.
  • Exporter β€” upgraded from version 5.76 to 5.77.
  • ExtUtils::MakeMaker β€” upgraded from version 7.62 to 7.64.
  • ExtUtils::Miniperl β€” upgraded from version 1.10 to 1.11.
  • ExtUtils::ParseXS β€” upgraded from version 3.43 to 3.45.
  • ExtUtils::Typemaps β€” upgraded from version 3.43 to 3.45.
  • Fcntl β€” upgraded from version 1.14 to 1.15.
  • feature β€” upgraded from version 1.64 to 1.72.
  • File::Compare β€” upgraded from version 1.1006 to 1.1007.
  • File::Copy β€” upgraded from version 2.35 to 2.39.
  • File::Fetch β€” upgraded from version 1.00 to 1.04.
  • File::Find β€” upgraded from version 1.39 to 1.40.
  • File::Glob β€” upgraded from version 1.33 to 1.37.
  • File::Spec β€” upgraded from version 3.80 to 3.84.
  • File::stat β€” upgraded from version 1.09 to 1.12.
  • FindBin β€” upgraded from version 1.52 to 1.53.
  • GDBM_File β€” upgraded from version 1.19 to 1.23.
  • Hash::Util β€” upgraded from version 0.25 to 0.28.
  • Hash::Util::FieldHash β€” upgraded from version 1.21 to 1.26.
  • HTTP::Tiny β€” upgraded from version 0.076 to 0.080.
  • I18N::Langinfo β€” upgraded from version 0.19 to 0.21.
  • if β€” upgraded from version 0.0609 to 0.0610.
  • IO β€” upgraded from version 1.46 to 1.50.
  • IO-Compress β€” upgraded from version 2.102 to 2.106.
  • IPC::Open3 β€” upgraded from version 1.21 to 1.22.
  • JSON::PP β€” upgraded from version 4.06 to 4.07.
  • libnet β€” upgraded from version 3.13 to 3.14.
  • Locale::Maketext β€” upgraded from version 1.29 to 1.31.
  • Math::BigInt β€” upgraded from version 1.999818 to 1.999830.
  • Math::BigInt::FastCalc β€” upgraded from version 0.5009 to 0.5012.
  • Math::BigRat β€” upgraded from version 0.2614 to 0.2621.
  • Module::CoreList β€” upgraded from version 5.20210520 to 5.20220520. it literally knows everything about every perl release πŸ‘‘
  • mro β€” upgraded from version 1.25_001 to 1.26.
  • NEXT β€” upgraded from version 0.68 to 0.69.
  • Opcode β€” upgraded from version 1.50 to 1.57.
  • open β€” upgraded from version 1.12 to 1.13.
  • overload β€” upgraded from version 1.33 to 1.35.
  • perlfaq β€” upgraded from version 5.20210411 to 5.20210520.
  • PerlIO β€” upgraded from version 1.11 to 1.12.
  • Pod::Functions β€” upgraded from version 1.13 to 1.14.
  • Pod::Html β€” upgraded from version 1.27 to 1.33.
  • Pod::Simple β€” upgraded from version 3.42 to 3.43.
  • POSIX β€” upgraded from version 1.97 to 2.03. major version, main character energy πŸ’…
  • re β€” upgraded from version 0.41 to 0.43.
  • Scalar::Util β€” upgraded from version 1.55 to 1.62.
  • sigtrap β€” upgraded from version 1.09 to 1.10.
  • Socket β€” upgraded from version 2.031 to 2.033.
  • sort β€” upgraded from version 2.04 to 2.05.
  • Storable β€” upgraded from version 3.23 to 3.26.
  • Sys::Hostname β€” upgraded from version 1.23 to 1.24.
  • Test::Harness β€” upgraded from version 3.43 to 3.44.
  • Test::Simple β€” upgraded from version 1.302183 to 1.302190.
  • Text::ParseWords β€” upgraded from version 3.30 to 3.31.
  • Text::Tabs β€” upgraded from version 2013.0523 to 2021.0814. glow up of the decade fr fr 🌈
  • Text::Wrap β€” upgraded from version 2013.0523 to 2021.0814.
  • threads β€” upgraded from version 2.26 to 2.27.
  • threads::shared β€” upgraded from version 1.62 to 1.64.
  • Tie::Handle β€” upgraded from version 4.2 to 4.3.
  • Tie::Hash β€” upgraded from version 1.05 to 1.06.
  • Tie::Scalar β€” upgraded from version 1.05 to 1.06.
  • Tie::SubstrHash β€” upgraded from version 1.00 to 1.01.
  • Time::HiRes β€” upgraded from version 1.9767 to 1.9770.
  • Unicode::Collate β€” upgraded from version 1.29 to 1.31.
  • Unicode::Normalize β€” upgraded from version 1.28 to 1.31.
  • Unicode::UCD β€” upgraded from version 0.75 to 0.78.
  • UNIVERSAL β€” upgraded from version 1.13 to 1.14.
  • version β€” upgraded from version 0.9928 to 0.9929.
  • VMS::Filespec β€” upgraded from version 1.12 to 1.13.
  • VMS::Stdio β€” upgraded from version 2.45 to 2.46.
  • warnings β€” upgraded from version 1.51 to 1.58.
  • Win32 β€” upgraded from version 0.57 to 0.59.
  • XS::APItest β€” upgraded from version 1.16 to 1.22.
  • XS::Typemap β€” upgraded from version 0.18 to 0.19.
  • XSLoader β€” upgraded from version 0.30 to 0.31.

πŸ“š DOCUMENTATION πŸ“š

πŸ†• New Documentation πŸ†•

Porting/vote_admin_guide.pod

This document provides the process for administering an election or vote within the Perl Core Team. πŸ—³οΈ yes bestie, there IS a whole doc for running democracy in perl land and it ate.

✏️ Changes to Existing Documentation ✏️

We have attempted to update the documentation to reflect the changes listed in this document. If you find any we have missed, open an issue at https://github.com/Perl/perl5/issues. 🫢 (do it, they literally asked)

Additionally, the following selected changes have been made:

perlapi

  • This has been cleaned up some, and more than 80% of the (previously many) undocumented functions have now either been documented or deemed to have been inappropriately marked as API.

As always, Patches Welcome! ✨

perldeprecation

  • notes the new location for functions moved from Pod::Html to Pod::Html::Util that are no longer intended to be used outside of core.

perlexperiment

  • notes the ":win32" IO pseudolayer is removed (this happened in 5.35.2). πŸ’€ gone but not forgotten

perlgov

  • The election process has been finetuned to allow the vote to be skipped if there are no more candidates than open seats.
  • A special election is now allowed to be postponed for up to twelve weeks, for example until a normal election.

perlop

  • now notes that an invocant only needs to be an object or class name for method calls, not for subroutine references.

perlre

  • Updated to discourage the use of the /d regexp modifier. πŸ™ˆ lowkey read this one

perlrun

  • -? is now a synonym for -h
  • -g is now a synonym for -0777

🩺 Diagnostics πŸ’–

okay so here's the tea on all the new/changed warning-y and fatal-error-y stuff. This is diagnostic output only β€” for the complete list of diagnostic messages, you gotta go look at perldiag, bestie. ✨

πŸ†• New Diagnostics (fresh off the press, no cap)

πŸ’€ New Errors

  • Can't "%s" out of a "defer" block β€” (F) okay so somebody tried to jump out of a defer block's scope using a control-flow statement like return, goto, or a loop control. That is not permitted. Sorry babe, the defer block is a roach motel, you check in you don't check out 🚫
  • Can't modify %s in %s (this one's for scalar assignment to undef) β€” so like, if you try to do a scalar assignment to undef β€” for example via undef = $foo; β€” it used to blow up at runtime with a fatal error saying Modification of a read-only value attempted. But catching it early is wayyy more helpful, so now it's a compile time error instead, and the message you get is Can't modify undef operator in scalar assignment. glow up fr 🌟
  • panic: newFORLOOP, %s β€” the parser hit an internal consistency check and it failed while trying to parse a foreach loop. It's giving "something is deeply wrong internally", iykyk 😭

⚠️ New Warnings

  • Built-in function '%s' is experimental β€” you're calling a function in the builtin:: namespace, and heads up, that's currently experimental πŸ§ͺ
  • defer is experimental β€” the defer block modifier is experimental, periodt. If you wanna use it anyway you can silence it with no warnings 'experimental::defer', but know that doing so means you're taking the risk that your code may break in a future Perl version. Do with that what you will 🫣
  • Downgrading a use VERSION declaration to below v5.11 is deprecated β€” this one pops off on a use VERSION statement requesting a version below v5.11 (that's the point where the effects of use strict would get disabled) after you already declared a bigger number before (which would've turned those effects on). Rude, honestly.
  • for my (...) is experimental β€” emitted when you use for to iterate multiple values at once. This syntax is experimental rn and its behaviour may change in future releases of Perl. πŸ¦‹
  • Implicit use of @_ in %s with signatured subroutine is experimental β€” an expression that implicitly involves the @_ arguments array showed up in a subroutine that uses a signature. Caught in 4k πŸ‘€
  • Use of @_ in %s with signatured subroutine is experimental β€” same vibe but explicit: an expression involving the @_ arguments array was found in a subroutine that uses a signature.
  • Wide character in $0 β€” trying to shove wide characters into the program name ($0) now triggers this warning. Stop it πŸ’…

πŸ”„ Changes to Existing Diagnostics

  • '/' does not take a repeat count in %s β€” this warning used to not include the in %s part. Now it does, slay.
  • Subroutine %s redefined β€” localized subroutine redefinitions no longer trigger this warning. Finally, peace and quiet πŸ™
  • unexpected constant lvalue entersub entry via type/targ %d:%d β€” this one now has a panic prefix, which makes it consistent with all the other internal-consistency checks when compiling a subroutine. Consistency is the vibe. ✨
  • Useless use of sort in scalar context β€” is now living in a brand new category called scalar, bestie. When sort is used in scalar context it warns you that this isn't useful; that warning used to be in the void category. So now there's a whole new warning category for scalar-context warnings, named scalar. New home, same energy 🏠
  • Removed a number of diagnostics β€” a whole bunch of diagnostics that got removed from the perl core over the years have now also been removed from the documentation. Marie Kondo'd 😌

πŸ”§ Configuration and Compilation πŸ› οΈ

  • so the Perl C source code now uses some C99 features, and the good news is these have been verified as supported by all the compilers we target πŸ’š Which means Perl's headers now contain some code that's legal in C99 but not C89.

This can cause drama for some XS modules that unconditionally add -Werror=declaration-after-statement to their C compiler flags when compiling with gcc or clang. Earlier versions of Perl support long obsolete compilers that are super strict about rejecting certain C99 features β€” especially mixed declarations and code β€” so it made sense for XS module authors to audit that their code doesn't violate this. But doing this is now only possible on these earlier versions of Perl, so those modules need to be changed to only add this flag when $] < 5.035005. Noted. πŸ“

  • the makedepend step now runs in parallel by using make πŸƒβ€β™€οΈπŸ’¨ When you use MAKEFLAGS=-j8, this significantly cuts down the time needed for:
sh ./makedepend MAKE=make cflags
  • Configure now tests whether #include <xlocale.h> is required to use the POSIX 1003 thread-safe locale functions or some related extensions. This prevents problems where a non-public xlocale.h gets removed in a library update, or where xlocale.h isn't intended for public use. (github #18936) πŸ”

πŸ§ͺ Testing

Tests were added and changed to reflect all the other additions and changes in this release. Keeping it accountable, as we should πŸ’…


🌍 Platform Support

πŸͺŸ Windows

  • Support for old MSVC++ (pre-VC12) has been removed. These didn't support C99 and therefore can no longer be used to compile perl. Bye πŸ‘‹
  • Support for compiling perl on Windows using Microsoft Visual Studio 2022 (containing Visual C++ 14.3) has been added. Welcome to the party πŸŽ‰
  • The :win32 IO layer has been removed. This experimental replacement for the :unix layer never reached maturity in its nearly two decades of existence. Almost 20 years and it never got its life together... relatable honestly 😭

πŸ–₯️ VMS

keys %ENV on VMS returns consistent results

On VMS, entries in the %ENV hash get loaded from the OS environment on first access β€” which means the first iteration of %ENV requires scanning the entire environment to find all possible keys. This initialisation had always been done correctly for full iteration, but previously it wasn't happening for %ENV in scalar context. So scalar %ENV would return 0 if called before any other %ENV access, or would only return the count of keys accessed if there had been no iteration. Messy!

These bugs are now fixed β€” %ENV and keys %ENV in scalar context now return the correct result: the count of all keys in the environment. Fixed and flawless πŸ’–

πŸͺ¦ Discontinued Platforms

AT&T UWIN

UWIN is a UNIX compatibility layer for Windows. It was last released in 2012 and has been superseded by Cygwin these days. Rest in peace babe πŸ•ŠοΈ

DOS/DJGPP

DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS. The last known attempt to build Perl on it was on 5.20, which only got as far as building miniperl. So close yet so far πŸ˜”

NetWare

Support code for Novell NetWare has been removed. NetWare was a server operating system by Novell. The port was last updated in July 2002, and the platform itself in May 2009.

Unrelated changes accidentally broke the build for the NetWare port in September 2009, and in 12 years no-one has reported this. Twelve. Years. πŸ’€ Not a single soul noticed, that's genuinely iconic in the saddest way.

πŸ“ Platform-Specific Notes

z/OS

This update enables us to build EBCDIC static/dynamic and 31-bit/64-bit addressing mode Perl. The number of tests that pass is consistent with the baseline before these updates. βœ…

These changes also provide the base support to be able to provide ASCII static/dynamic and 31-bit/64-bit addressing mode Perl.

The z/OS (previously called OS/390) README was updated to describe ASCII and EBCDIC builds. Documentation staying fed πŸ“šβœ¨

πŸ› οΈ Internal Changes πŸ› οΈ

  • okay so</p> ever since PERL_OBJECT got yeeted back in Perl 5.8, PERL_IMPLICIT_CONTEXT and MULTIPLICITY have been literal synonyms β€” besties who finish each other's sentences, used interchangeably, no cap. To make the code less of a mess, every single instance of PERL_IMPLICIT_CONTEXT got swapped out for MULTIPLICITY.

PERL_IMPLICIT_CONTEXT will stay defined tho, for compatibility with XS modules. πŸ’…

  • The API constant that used to be called G_ARRAY (which means "list context") has been renamed to the way more accurate G_LIST. A compatibility macro G_ARRAY was added so existing code keeps working, untouched, unbothered. ✨ New code should use the new constant instead. This is supported by Devel::PPPort version 3.63.
  • Macros got added to perl.h to make version comparisons easier: PERL_GCC_VERSION_GE, PERL_GCC_VERSION_GT, PERL_GCC_VERSION_LE and PERL_GCC_VERSION_LT. πŸŽ€

Also, inline functions got added to embed.h to figure out where the least significant 1 bit lives in a word: lsbit_pos32 and lsbit_pos64.

  • Perl_ptr_table_clear has been deleted. πŸ’€ It's been marked deprecated since v5.14.0 (which dropped back in 2011), and literally no code on CPAN uses it.
  • Added new boolean macros and functions! See "Stable boolean tracking" for the related lore and perlapi for the docs. πŸ“š
    • sv_setbool
    • sv_setbool_mg
    • SvIsBOOL
  • Added 4 missing functions for dealing with RVs:
    • sv_setrv_noinc
    • sv_setrv_noinc_mg
    • sv_setrv_inc
    • sv_setrv_inc_mg
  • xs_handshake()'s two failure modes now give you distinct messages. No more playing detective. πŸ•΅οΈ
  • Memory for the hash iterator state (struct xpvhv_aux) is now allocated as part of the hash body itself, instead of being part of the block of memory allocated for the main hash array. glow up ✨
  • A brand new phase_name() interface gives you access to the name for each interpreter phase (i.e., the PL_phase value).
  • The pack behavior of U has changed for EBCDIC. πŸ‘€
  • New equality-test functions sv_numeq and sv_streq have arrived, plus ..._flags-suffixed variants. These give you a simple, consistent API for doing numerical or string comparison that knows about operator overloading. 🫢
  • Reading the string form of an integer value no longer sets the flag SVf_POK. The string form is still cached internally, and it's still re-read directly by the macros SvPV(sv) etc (inline, no C function call needed). XS code that already calls the APIs to get values won't be affected by this change. But XS code that pokes at flags directly instead of using API calls to express what it wants might break β€” tho ngl such code is probably already buggy if it's been passed certain other values, like floating point values or objects with string overloading.

This small change lets code (like JSON serializers) reliably tell the difference between…

  • a value that was initially written as an integer, but then read as a string
my $answer = 42;
print "The answer is $answer\n";
  • that same value that was initially written as a string, but then read as an integer
my $answer = "42";
print "That doesn't look right\n"
    unless $answer == 6 * 9;

For the first case (originally written as an integer), we now get:

use Devel::Peek;
my $answer = 42;
Dump ($answer);
my $void = "$answer";
print STDERR "\n";
Dump($answer)

SV = IV(0x562538925778) at 0x562538925788
  REFCNT = 1
  FLAGS = (IOK,pIOK)
  IV = 42

SV = PVIV(0x5625389263c0) at 0x562538925788
  REFCNT = 1
  FLAGS = (IOK,pIOK,pPOK)
  IV = 42
  PV = 0x562538919b50 "42"\0
  CUR = 2
  LEN = 10

For the second (originally written as a string), we now get:

use Devel::Peek;
my $answer = "42";
Dump ($answer);
my $void = $answer == 6 * 9;
print STDERR "\n";
Dump($answer)'

SV = PV(0x5586ffe9bfb0) at 0x5586ffec0788
  REFCNT = 1
  FLAGS = (POK,IsCOW,pPOK)
  PV = 0x5586ffee7fd0 "42"\0
  CUR = 2
  LEN = 10
  COW_REFCNT = 1

SV = PVIV(0x5586ffec13c0) at 0x5586ffec0788
  REFCNT = 1
  FLAGS = (IOK,POK,IsCOW,pIOK,pPOK)
  IV = 42
  PV = 0x5586ffee7fd0 "42"\0
  CUR = 2
  LEN = 10
  COW_REFCNT = 1
🚨 bestie listen β€” you can't rely on whether the flag SVf_IsCOW is there or not to figure out the history of operations on a scalar. fr fr.

Before this, both cases were straight up indistinguishable, with all 4 flags set:

SV = PVIV(0x55d4d62edaf0) at 0x55d4d62f0930
  REFCNT = 1
  FLAGS = (IOK,POK,pIOK,pPOK)
  IV = 42
  PV = 0x55d4d62e1740 "42"\0
  CUR = 2
  LEN = 10

(and possibly SVf_IsCOW, but not always)

So now: if XS code genuinely needs to know which form a value was first written as, it should implement logic roughly like this:

if (flags & SVf_IOK|SVf_NOK) && !(flags & SVf_POK)
    serialize as number
else if (flags & SVf_POK)
    serialize as string
else
    the existing guesswork ...

Heads up tho β€” this doesn't cover "dualvars", aka scalars that report different values depending on whether you ask for their string form or their number form (like $!). Most serialization formats can't represent that kind of duplicity anyway. πŸ’€

The existing guesswork stays because, as well as dualvars, values might be undef, references, overloaded references, typeglobs and other things that Perl itself can represent but that don't map one-to-one into external formats β€” so they need some amount of approximation or encapsulation.

  • sv_dump (and Devel::Peek's Dump function) now escapes high-bit octets in the PV as hex rather than octal. Since most folks get hex way faster than octal, this should make these dumps a bit more legible. πŸ‘‘ This does not affect any other diagnostic interfaces like pv_display.

πŸ› Selected Bug Fixes πŸ›

  • utime() now correctly sets errno/$! when it's called on a closed handle. πŸ’…
  • The flags on the OPTVAL parameter to setsockopt() used to get checked before magic was called β€” which could possibly treat a numeric value as a packed buffer, or vice versa πŸ™ˆ. It also ignored the UTF-8 flag, which could potentially treat the internal representation of an upgraded SV as the bytes to hand to the setsockopt() system call. (github #18660 <https://github.com/Perl/perl5/issues/18660>)
  • Only set IOKp now, not IOK, on $) and $(. This was issue #18955 <https://github.com/Perl/perl5/issues/18955>: it stops serializers from serializing these variables as numbers (which loses the additional groups 😭). This restores behaviour from 5.16.
  • Using the mktables debugging facility would make perl croak since v5.31.10 β€” that problem has now been fixed. ✨
  • makedepend logic is now compatible with BSD make (fixes GH #19046 <https://github.com/Perl/perl5/issues/19046>).
  • Calling untie on a tied hash that's partway through iteration now frees the iteration state immediately. πŸŽ€

Iterating a tied hash makes perl store a copy of the current hash key so it can track the iteration state, and that stored copy gets passed as the second parameter to NEXTKEY. This internal state is freed immediately when tied hash iteration completes, or if the hash is destroyed β€” but due to an implementation oversight, it was not freed if the hash was untied. In that case, the internal copy of the key would persist until the earliest of:

  1. tie was called again on the same hash
  2. the (now untied) hash was iterated (ie passed to any of keys, values or each)
  3. the hash was destroyed.

This inconsistency is now fixed β€” the internal state gets freed immediately by untie. πŸ’œ

Since the precise timing of this behaviour can be observed with pure Perl code (the timing of DESTROY on objects returned from FIRSTKEY and NEXTKEY), it's just possible that some code out there is sensitive to it. πŸ‘€

  • The Internals::getcwd() function added for bootstrapping miniperl in perl 5.30.0 is now only available in miniperl. [github #19122]
  • Setting a breakpoint on a BEGIN or equivalently a use statement could cause a memory write to a freed dbstate op. πŸ’€ [GH #19198 <https://github.com/Perl/perl5/issues/19198>]
  • When bareword filehandles are disabled, the parser was interpreting any bareword as a filehandle, even when it was immediately followed by parens. fixed bestie 🫢

πŸ“ Errata From Previous Releases πŸ“

  • perl5300delta mistakenly identified a CVE whose correct identification is CVE-2015-1592. oops 🫣

πŸ•ŠοΈ Obituaries πŸ•ŠοΈ

Raun "Spider" Boardman (SPIDB on CPAN), author of at least 66 commits to the Perl 5 core distribution between 1996 and 2002, passed away May 24, 2021 from complications of COVID. He will be missed. πŸ’”

David H. Adler (DHA) passed away on November 16, 2021. In 1997, David co-founded NY.pm, the first Perl user group, and in 1998 co-founded Perl Mongers to help establish other user groups across the globe. He was a frequent attendee at Perl conferences in both North America and Europe and well known for his role in organizing Bad Movie Night celebrations at those conferences. He also contributed to the work of the Perl Foundation, including administering the White Camel awards for community service. He will be missed. 🌸

πŸ’– ACKNOWLEDGEMENTS πŸ’–

okay so real talk, this release is a whole team effort and we GOTTA give credit where credit is due. πŸ’…

Perl 5.36.0 is roughly a year of development since Perl 5.34.0, and it's packing about 250,000 lines of changes across 2,000 files from 82 authors. iconic behavior, honestly.

And if we leave out the auto-generated files, the documentation and the release tools? That's still approximately 190,000 lines of changes to 1,300 .pm, .t, .c and .h files. no cap. 😭

Perl keeps on flourishing into its fourth decade thanks to a vibrant community of users and developers, and the following people are known to have contributed the improvements that became Perl 5.36.0:

  • Alyssa Ross, Andrew Fresh, Aristotle Pagaltzis, Asher Mancinelli, Atsushi Sugawara, Ben Cornett, Bernd, Biswapriyo Nath, Brad Barden, Bram
  • Branislav ZahradnΓ­k, brian d foy, Chad Granum, Chris 'BinGOs' Williams, Christian Walde (Mithaldu), Christopher Yeleighton, Craig A. Berry, cuishuang
  • Curtis Poe, Dagfinn Ilmari MannsΓ₯ker, Dan Book, Daniel LaΓΌgt, Dan Jacobson, Dan Kogai, Dave Cross, Dave Lambley, David Cantrell
  • David Golden, David Marshall, David Mitchell, E. Choroba, Eugen Konkov, Felipe Gasper, FranΓ§ois Perrad, Graham Knop, H.Merijn Brand
  • Hugo van der Sanden, Ilya Sashcheka, Ivan Panchenko, Jakub Wilk, James E Keenan, James Raspass, Karen Etheridge, Karl Williamson, Leam Hall
  • Leon Timmermans, Magnus Woldrich, Matthew Horsfall, Max Maischein, Michael G Schwern, Michiel Beijen, Mike Fulton, Neil Bowers
  • Nicholas Clark, Nicolas R, Niyas Sait, Olaf Alders, Paul Evans, Paul Marquess, Petar-Kaleychev, Pete Houston, Renee Baecker
  • Ricardo Signes, Richard Leach, Robert Rothenberg, Sawyer X, Scott Baker, Sergey Poznyakoff, Sergey Zhmylove, Sisyphus, Slaven Rezic
  • Steve Hay, Sven Kirmess, TAKAI Kousuke, Thibault Duponchelle, Todd Rinaldo, Tomasz Konojacki, Tomoyuki Sadahiro, Tony Cook
  • Unicode Consortium, Yves Orton, ΠœΠΈΡ…Π°ΠΈΠ» ΠšΠΎΠ·Π°Ρ‡ΠΊΠΎΠ²

bestie, heads up: that list is almost certainly incomplete, because it's automatically generated from version control history. specifically, it does not include the names of the (very much appreciated!!) contributors who reported issues to the Perl bug tracker. 🫢

Also, a bunch of the changes in this version started life in the CPAN modules that are included in Perl's core, so we're grateful to the entire CPAN community for helping Perl flourish. 🌸

And if you want the full encyclopedia of every historical contributor to Perl, go look at the AUTHORS file in the Perl source distribution. πŸ“š


πŸ› REPORTING BUGS πŸ›

Found something you think is a bug? first of all, thank you, and second of all, go check the perl bug database at <https://github.com/Perl/perl5/issues>. There might also be info waiting for you at <http://www.perl.org/>, the Perl Home Page. ✨

If you're pretty sure it's an unreported bug, please open an issue at <https://github.com/Perl/perl5/issues>. And PLEASE, bestie, trim your bug down to a tiny but sufficient test case. the way that a minimal repro makes everyone's life easier… 😭

If the bug you're reporting has security implications that make it inappropriate to send to a public issue tracker, then check out "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for the details on how to report it. do NOT just drop it in the public issues, okay? πŸ”’

🫢 GIVE THANKS 🫢

Feeling grateful?? Wanna thank the Perl 5 Porters for the work we did in Perl 5? you can literally just run the perlthanks program:

perlthanks

That's it. That's the whole vibe. It'll send an email to the Perl 5 Porters list with your show of thanks. πŸ’Œ


πŸ‘€ SEE ALSO πŸ‘€

  • The Changes file β€” for an explanation of how to view exhaustive details on what changed. it's giving receipts. 🧾
  • 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 Perl 5.36.0 delta, bestie!! πŸŽ€ this page is from perl v5.44.0, dated 2026-10-17, and it's PERL5360DELTA(1perl) β€” go forth, upgrade responsibly, and remember: minimal repro or it didn't happen. πŸ’–βœ¨πŸ¦‹

πŸ“¦ 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