PERL5240DELTA(1perl)

๐Ÿ“ฆ
version 5.44.0 ยท 2 versions
, in arch rolling

okay bestie, welcome to PERL5240DELTA(1perl) from the Perl Programmers Reference Guide โ€” aka perl5240delta. this is the part 1 tea, so grab a boba ๐Ÿง‹ and let's get into it.

๐Ÿ“› NAME ๐Ÿ“›

perl5240delta - what is new for perl v5.24.0

๐Ÿ“ DESCRIPTION ๐Ÿ“

bestie, this doc describes the differences between the 5.22.0 release and the 5.24.0 release. periodt.

โœจ Core Enhancements โœจ

โœจ Postfix dereferencing is no longer experimental โœจ

Using the postderef and postderef_qq features no longer emits a warning. existing code that disables the experimental::postderef warning category โ€” the one they previously used โ€” will continue to work. the postderef feature has no effect; all Perl code can use postfix dereferencing, regardless of what feature declarations are in scope. and the 5.24 feature bundle? it now includes the postderef_qq feature. slay. ๐Ÿ’…

๐ŸŒˆ Unicode 8.0 is now supported ๐ŸŒˆ

Unicode 8.0 is supported now. for the deets on what's in this release, see <http://www.unicode.org/versions/Unicode8.0.0/>. โœจ

๐Ÿ˜ญ perl will now croak when closing an in-place output file fails ๐Ÿ˜ญ

until now, failure to close the output file for an in-place edit was not detected โ€” which meant the input file could be clobbered without the edit being successfully completed. that's giving chaos. now, when the output file cannot be closed successfully, an exception is raised. croak, bestie. ๐Ÿ’€

๐ŸŽ€ New \b{lb} boundary in regular expressions ๐ŸŽ€

lb stands for Line Break. it's a Unicode property that determines where a line of text is suitable to break โ€” typically so it can be output without overflowing the available horizontal space. this capability has long been furnished by the Unicode::LineBreak module, but now a light-weight, non-customizable version that is suitable for many purposes is in core Perl. obsessed. ๐Ÿ‘‘

๐Ÿฆ‹ qr/(?[ ])/ now works in UTF-8 locales ๐Ÿฆ‹

Extended Bracketed Character Classes now will successfully compile when use locale is in effect. the compiled pattern will use standard Unicode rules. if the runtime locale is not a UTF-8 one, a warning is raised and standard Unicode rules are used anyway. no tainting is done, since the outcome does not actually depend on the locale. periodt.

๐Ÿ”ฅ Integer shift (<< and >>) now more explicitly defined ๐Ÿ”ฅ

negative shifts are reverse shifts: left shift becomes right shift, and right shift becomes left shift. ๐Ÿ”

shifting by the number of bits in a native integer โ€” or more โ€” is zero, except when the "overshift" is right shifting a negative value under use integer, in which case the result is -1 (arithmetic shift).

until now, negative shifting and overshifting have been undefined because they relied on whatever the C implementation happens to do. for example, a common C behavior for the overshift is "modulo shift":

1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1  # Common C behavior.

# And the same for <<, while Perl now produces 0 for both.

now these behaviors are well-defined under Perl, regardless of what the underlying C implementation does. note, however, that you're still constrained by the native integer width: you need to know how far left you can go. you can use, for example:

use Config;
my $wordbits = $Config{uvsize} * 8;  # Or $Config{uvsize} << 3.

if you need a more bits on the left shift, you can use for example the bigint pragma, or the Bit::Vector module from CPAN. ๐Ÿ’…

๐Ÿ’– printf and sprintf now allow reordered precision arguments ๐Ÿ’–

that is, sprintf '|%.*2$d|', 2, 3 now returns |002|. this extends the existing reordering mechanism โ€” which allows reordering for arguments that are used as format fields, widths, and vector separators. iconic. โœจ

๐Ÿซถ More fields provided to sigaction callback with SA_SIGINFO ๐Ÿซถ

when passing the SA_SIGINFO flag to sigaction, the errno, status, uid, pid, addr and band fields are now included in the hash passed to the handler, if supported by the platform. more data for your signal handler, no cap. ๐Ÿ’œ

๐Ÿช Hashbang redirection to Perl 6 ๐Ÿช

previously, perl would redirect to another interpreter if it found a hashbang path unless the path contains perl (see perlrun). to improve compatibility with Perl 6, this behavior has been extended to also redirect if perl is followed by 6. iykyk.

๐Ÿ”’ Security ๐Ÿ”’

๐Ÿ”’ Set proper umask before calling mkstemp(3) ๐Ÿ”’

in 5.22, perl started setting umask to 0600 before calling mkstemp(3) and restoring it afterwards. this wrongfully tells open(2) to strip the owner read and write bits from the given mode before applying it, rather than the intended negation of leaving only those bits in place. not it. ๐Ÿ˜ฌ

systems that use mode 0666 in mkstemp(3) โ€” like old versions of glibc โ€” create a file with permissions 0066, leaving world read and write permissions regardless of current umask. yikes.

this has been fixed by using umask 0177 instead. [perl #127322] ๐Ÿ’…

๐Ÿ”ฅ Fix out of boundary access in Win32 path handling ๐Ÿ”ฅ

this is CVE-2015-8608. for more information see [GH #15067] <https://github.com/Perl/perl5/issues/15067>. ๐Ÿ›ก๏ธ

๐Ÿ›ก๏ธ Fix loss of taint in canonpath ๐Ÿ›ก๏ธ

this is CVE-2015-8607. for more information see [GH #15084] <https://github.com/Perl/perl5/issues/15084>. ๐Ÿ’–

๐Ÿ’€ Avoid accessing uninitialized memory in win32 crypt() ๐Ÿ’€

added validation that will detect both a short salt and invalid characters in the salt. [GH #15091] <https://github.com/Perl/perl5/issues/15091> ๐Ÿ”ฅ

๐Ÿ‘‘ Remove duplicate environment variables from environ ๐Ÿ‘‘

previously, if an environment variable appeared more than once in environ[], %ENV would contain the last entry for that name, while a typical getenv() would return the first entry. we now make sure %ENV contains the same as what getenv returns. periodt.

second, we remove duplicates from environ[], so if a setting with that name is set in %ENV, we won't pass an unsafe value to a child process. safety first, bestie.

[CVE-2016-2381] ๐Ÿ’…

๐Ÿšซ Incompatible Changes ๐Ÿšซ

๐Ÿ˜ญ The autoderef feature has been removed ๐Ÿ˜ญ

the experimental autoderef feature โ€” which allowed calling push, pop, shift, unshift, splice, keys, values, and each on a scalar argument โ€” has been deemed unsuccessful. it has now been removed; trying to use the feature (or to disable the experimental::autoderef warning it previously triggered) now yields an exception. rip. ๐Ÿ’€

๐Ÿ’€ Lexical $_ has been removed ๐Ÿ’€

my $_ was introduced in Perl 5.10, and subsequently caused much confusion with no obvious solution. in Perl 5.18.0, it was made experimental on the theory that it would either be removed or redesigned in a less confusing โ€” but backward-incompatible โ€” way. over the following years, no alternatives were proposed. the feature has now been removed and will fail to compile. it's giving closure. ๐Ÿ˜ญ

๐ŸŒธ qr/\b{wb}/ is now tailored to Perl expectations ๐ŸŒธ

this is now more suited to be a drop-in replacement for plain \b, but giving better results for parsing natural language. previously it strictly followed the current Unicode rules, which calls for it to match between each white space character. now it doesn't generally match within spans of white space, behaving like \b does. see \b{wb} in perlrebackslash. โœจ

๐Ÿ˜ณ Regular expression compilation errors ๐Ÿ˜ณ

some regular expression patterns that had runtime errors now don't compile at all.

almost all Unicode properties using the \p{} and \P{} regular expression pattern constructs are now checked for validity at pattern compilation time, and invalid ones will cause the program to not compile. in earlier releases, this check was often deferred until run time. whenever an error check is moved from run- to compile time, erroneous code is caught 100% of the time โ€” whereas before it would only get caught if and when the offending portion actually gets executed, which for unreachable code might be never. periodt.

๐Ÿ’… qr/\N{}/ now disallowed under use re "strict" ๐Ÿ’…

an empty \N{} makes no sense, but for backwards compatibility is accepted as doing nothing, though a deprecation warning is raised by default. but now this is a fatal error under the experimental feature 'strict' mode in re. ๐Ÿ’…

๐Ÿ”ฅ Nested declarations are now disallowed ๐Ÿ”ฅ

a my, our, or state declaration is no longer allowed inside of another my, our, or state declaration. for example, these are now fatal:

my ($x, my($y));
our (my $x);

[GH #14799] <https://github.com/Perl/perl5/issues/14799>

[GH #13548] <https://github.com/Perl/perl5/issues/13548> ๐Ÿ”ฅ

๐Ÿ‘‹ The /\C/ character class has been removed ๐Ÿ‘‹

this regular expression character class was deprecated in v5.20.0 and has produced a deprecation warning since v5.22.0. it is now a compile-time error. if you need to examine the individual bytes that make up a UTF8-encoded character, then use utf8::encode() on the string (or a copy) first. bye bestie. ๐Ÿ’…

๐Ÿ’… chdir('') no longer chdirs home ๐Ÿ’…

using chdir('') or chdir(undef) to chdir home has been deprecated since perl v5.8, and will now fail. use chdir() instead. got it? ๐Ÿ’…

๐Ÿ™ˆ ASCII characters in variable names must now be all visible ๐Ÿ™ˆ

it was legal until now on ASCII platforms for variable names to contain non-graphical ASCII control characters (ordinals 0 through 31, and 127, which are the C0 controls and DELETE). this usage has been deprecated since v5.20, and as of now causes a syntax error. the variables these names referred to are special, reserved by Perl for whatever use it may choose, now, or in the future. each such variable has an alternative way of spelling it. instead of the single non-graphic control character, a two character sequence beginning with a caret is used, like $^] and ${^GLOBAL_PHASE}. details are at perlvar. it remains legal, though unwise and deprecated (raising a deprecation warning), to use certain non-graphic non-ASCII characters in variables names when not under use utf8. no code should do this, as all such variables are reserved by Perl, and Perl doesn't currently define any of them (but could at any time, without notice). ๐Ÿ‘‘

๐Ÿ˜ญ An off by one issue in $Carp::MaxArgNums has been fixed ๐Ÿ˜ญ

$Carp::MaxArgNums is supposed to be the number of arguments to display. prior to this version, it was instead showing $Carp::MaxArgNums + 1 arguments, contrary to the documentation. math was not mathing. ๐Ÿ’€

โœจ Only blanks and tabs are now allowed within [...] within (?[...]) โœจ

the experimental Extended Bracketed Character Classes can contain regular bracketed character classes within them. these differ from regular ones in that white space is generally ignored, unless escaped by preceding it with a backslash. the white space that is ignored is now limited to just tab \t and SPACE characters. previously, it was any white space. see "Extended Bracketed Character Classes" in perlrecharclass. ๐ŸŒธ

๐Ÿ’… DEPRECATIONS ๐Ÿ’…

โš ๏ธ Using code points above the platform's IV_MAX is now deprecated โš ๏ธ

okay so real talk: Unicode defines code points in the range 0..0x10FFFF. Some standards at one time defined them up to 2**31 - 1, but Perl has allowed them to be as high as anything that will fit in a word on the platform being used. that era is ending bestie ๐Ÿ’”

However โ€” using code points above the platform's IV_MAX is broken in some constructs, notably tr///, regular expression patterns involving quantifiers, and in some arithmetic and comparison operations, such as being the upper limit of a loop. So now the use of such code points raises a deprecation warning, unless that warning category is turned off.

For reference: IV_MAX is typically 231 -1 on 32-bit platforms, and 263-1 on 64-bit ones. โœจ


๐Ÿ”ข Doing bitwise operations on strings containing code points above 0xFF is deprecated ๐Ÿ”ข

The string bitwise operators treat their operands as strings of bytes, and values beyond 0xFF are nonsensical in this context. it's giving nonsense fr ๐Ÿ˜ญ

So if you wanna operate on encoded bytes, first encode the strings. And if you wanna operate on code points' numeric values, use split and map ord. Periodt.

Heads up: in the future, this warning will be replaced by an exception. so, like, don't build anything on top of it ๐Ÿซถ

๐Ÿ’€ sysread(), syswrite(), recv() and send() are deprecated on :utf8 handles ๐Ÿ’€

The sysread(), recv(), syswrite() and send() operators are deprecated on handles that have the :utf8 layer โ€” either explicitly, or implicitly, eg., with the :encoding(UTF-16LE) layer. no cap.

Here's the tea โ˜•:

  • Both sysread() and recv() currently use only the :utf8 flag for the stream, ignoring the actual layers. Since sysread() and recv() do no UTF-8 validation they can end up creating invalidly encoded scalars. not the vibe.
  • Similarly, syswrite() and send() use only the :utf8 flag, otherwise ignoring any layers. If the flag is set, both write the value UTF-8 encoded, even if the layer is some different encoding, such as the example above. ๐Ÿฅด

Ideally, all of these operators would completely ignore the :utf8 state, working only with bytes โ€” but that would result in silently breaking existing code. To avoid this, a future version of perl will throw an exception when any of sysread(), recv(), syswrite() or send() are called on a handle with the :utf8 layer.

so likeโ€ฆ start migrating your handles now, bestie. future you says thank you ๐Ÿ’–

โšก PERFORMANCE ENHANCEMENTS โšก

  • The overhead of scope entry and exit has been considerably reduced, so for example subroutine calls, loops and basic blocks are all faster now. This empty function call now takes about a third less time to execute:
sub f{} f();
  • Many languages, such as Chinese, are caseless. ๐ŸŒธ Perl now knows about most common ones, and skips much of the work when a program tries to change case in them (like ucfirst()) or match caselessly (qr//i). This will speed up a program, such as a web server, that can operate on multiple languages, while it is operating on a caseless one. slay.
  • /fixed-substr/ has been made much faster. ๐Ÿš€

On platforms with a libc memchr() implementation which makes good use of underlying hardware support, patterns which include fixed substrings will now often be much faster; for example with glibc on a recent x86_64 CPU, this:

$s = "a" x 1000 . "wxyz";
$s =~ /wxyz/ for 1..30000

is now about 7 times faster. On systems with slow memchr(), e.g. 32-bit ARM Raspberry Pi, there will be a small or little speedup.

Conversely, some pathological cases, such as "ab" x 1000 =~ /aa/ will be slower now; up to 3 times slower on the rPi, 1.5x slower on x86_64. ๐Ÿ™ˆ

  • Faster addition, subtraction and multiplication. โž•โž–โœ–๏ธ

Since 5.8.0, arithmetic became slower due to the need to support 64-bit integers. To deal with 64-bit integers, a lot more corner cases need to be checked, which adds time. We now detect common cases where there is no need to check for those corner cases, and special-case them. iconic behavior tbh.

  • Preincrement, predecrement, postincrement, and postdecrement have been made faster by internally splitting the functions which handled multiple cases into different functions. ๐ŸŽ€
  • Creating Perl debugger data structures (see "Debugger Internals" in perldebguts) for XSUBs and const subs has been removed. This removed one glob/scalar combo for each unique .c file that XSUBs and const subs came from. On startup (perl -e"0") about half a dozen glob/scalar debugger combos were created. Loading XS modules created more glob/scalar combos. These things were being created regardless of whether the perl debugger was being used, and despite the fact that it can't debug C code anyway ๐Ÿ’€
  • On Win32, stating or -Xing a path, if the file or directory does not exist, is now 3.5x faster than before. ๐ŸชŸโœจ
  • Single arguments in list assign are now slightly faster: ๐Ÿค
($x) = (...);
(...) = ($x);
  • Less peak memory is now used when compiling regular expression patterns. ๐Ÿง ๐Ÿ’š

โœจ Modules and Pragmata โœจ

okay bestie, this is the section where Perl 5.24.0 is basically doing a massive closet cleanout and every module gets a lil glow-up. no cap. ๐Ÿ’…

๐Ÿฆ‹ Updated Modules and Pragmata ๐Ÿฆ‹

  • arybase โ€” upgraded from version 0.10 to 0.11 ๐ŸŽ€
  • Attribute::Handlers โ€” upgraded from version 0.97 to 0.99 โœจ
  • autodie โ€” upgraded from version 2.26 to 2.29 ๐Ÿ’–
  • autouse โ€” upgraded from version 1.08 to 1.11 ๐Ÿฆ‹
  • B โ€” upgraded from version 1.58 to 1.62 ๐Ÿ’…
  • B::Deparse โ€” upgraded from version 1.35 to 1.37 ๐ŸŒธ
  • base โ€” upgraded from version 2.22 to 2.23 ๐Ÿซถ
  • Benchmark โ€” upgraded from version 1.2 to 1.22 โฑ๏ธ
  • bignum โ€” upgraded from version 0.39 to 0.42 ๐Ÿ”ข
  • bytes โ€” upgraded from version 1.04 to 1.05 ๐Ÿงš
  • Carp โ€” upgraded from version 1.36 to 1.40 ๐Ÿ˜ญ
  • Compress::Raw::Bzip2 โ€” upgraded from version 2.068 to 2.069 ๐Ÿ—œ๏ธ
  • Compress::Raw::Zlib โ€” upgraded from version 2.068 to 2.069 ๐Ÿ—œ๏ธ
  • Config::Perl::V โ€” upgraded from version 0.24 to 0.25 โš™๏ธ
  • CPAN::Meta โ€” upgraded from version 2.150001 to 2.150005 ๐Ÿ“ฆ
  • CPAN::Meta::Requirements โ€” upgraded from version 2.132 to 2.140 ๐Ÿ“‹
  • CPAN::Meta::YAML โ€” upgraded from version 0.012 to 0.018 ๐Ÿ“„
  • Data::Dumper โ€” upgraded from version 2.158 to 2.160 ๐Ÿ—‘๏ธ
  • Devel::Peek โ€” upgraded from version 1.22 to 1.23 ๐Ÿ‘€
  • Devel::PPPort โ€” upgraded from version 3.31 to 3.32 ๐Ÿงฐ
  • Dumpvalue โ€” upgraded from version 1.17 to 1.18 ๐Ÿ—ƒ๏ธ
  • DynaLoader โ€” upgraded from version 1.32 to 1.38 ๐Ÿšš
  • Encode โ€” upgraded from version 2.72 to 2.80 ๐Ÿ”ค
  • encoding โ€” upgraded from version 2.14 to 2.17 ๐Ÿ”ก
  • encoding::warnings โ€” upgraded from version 0.11 to 0.12 โš ๏ธ
  • English โ€” upgraded from version 1.09 to 1.10 ๐Ÿ‡ฌ๐Ÿ‡ง
  • Errno โ€” upgraded from version 1.23 to 1.25 โŒ
  • experimental โ€” upgraded from version 0.013 to 0.016 ๐Ÿงช
  • ExtUtils::CBuilder โ€” upgraded from version 0.280221 to 0.280225 ๐Ÿ› ๏ธ
  • ExtUtils::Embed โ€” upgraded from version 1.32 to 1.33 ๐Ÿงฉ
  • ExtUtils::MakeMaker โ€” upgraded from version 7.04_01 to 7.10_01 ๐Ÿ—๏ธ
  • ExtUtils::ParseXS โ€” upgraded from version 3.28 to 3.31 ๐Ÿ“œ
  • ExtUtils::Typemaps โ€” upgraded from version 3.28 to 3.31 ๐Ÿ—บ๏ธ
  • feature โ€” upgraded from version 1.40 to 1.42 ๐ŸŒŸ
  • fields โ€” upgraded from version 2.17 to 2.23 ๐ŸŒพ
  • File::Find โ€” upgraded from version 1.29 to 1.34 ๐Ÿ”
  • File::Glob โ€” upgraded from version 1.24 to 1.26 ๐ŸŒ
  • File::Path โ€” upgraded from version 2.09 to 2.12_01 ๐Ÿ›ค๏ธ
  • File::Spec โ€” upgraded from version 3.56 to 3.63 ๐Ÿ“
  • Filter::Util::Call โ€” upgraded from version 1.54 to 1.55 ๐Ÿ“ž
  • Getopt::Long โ€” upgraded from version 2.45 to 2.48 ๐ŸŽ›๏ธ
  • Hash::Util โ€” upgraded from version 0.18 to 0.19 #๏ธโƒฃ
  • Hash::Util::FieldHash โ€” upgraded from version 1.15 to 1.19 ๐Ÿ”‘
  • HTTP::Tiny โ€” upgraded from version 0.054 to 0.056 ๐ŸŒ
  • I18N::Langinfo โ€” upgraded from version 0.12 to 0.13 ๐Ÿ—ฃ๏ธ
  • if โ€” upgraded from version 0.0604 to 0.0606 โ“
  • IO โ€” upgraded from version 1.35 to 1.36 ๐Ÿ“ฅ
  • IO-Compress โ€” upgraded from version 2.068 to 2.069 ๐Ÿ—œ๏ธ
  • IPC::Open3 โ€” upgraded from version 1.18 to 1.20 ๐Ÿšฐ
  • IPC::SysV โ€” upgraded from version 2.04 to 2.06_01 ๐Ÿงต
  • List::Util โ€” upgraded from version 1.41 to 1.42_02 ๐Ÿ“
  • locale โ€” upgraded from version 1.06 to 1.08 ๐Ÿ—บ๏ธ
  • Locale::Codes โ€” upgraded from version 3.34 to 3.37 ๐Ÿท๏ธ
  • Math::BigInt โ€” upgraded from version 1.9997 to 1.999715 ๐Ÿ”ข
  • Math::BigInt::FastCalc โ€” upgraded from version 0.31 to 0.40 โšก
  • Math::BigRat โ€” upgraded from version 0.2608 to 0.260802 ๐Ÿ€
  • Module::CoreList โ€” upgraded from version 5.20150520 to 5.20160320 ๐Ÿ“…
  • Module::Metadata โ€” upgraded from version 1.000026 to 1.000031 ๐Ÿท๏ธ
  • mro โ€” upgraded from version 1.17 to 1.18 ๐Ÿงฌ
  • ODBM_File โ€” upgraded from version 1.12 to 1.14 ๐Ÿ—„๏ธ
  • Opcode โ€” upgraded from version 1.32 to 1.34 ๐Ÿงฎ
  • parent โ€” upgraded from version 0.232 to 0.234 ๐Ÿ‘ช
  • Parse::CPAN::Meta โ€” upgraded from version 1.4414 to 1.4417 ๐Ÿ“ฆ
  • Perl::OSType โ€” upgraded from version 1.008 to 1.009 ๐Ÿ’ป
  • perlfaq โ€” upgraded from version 5.021009 to 5.021010 โ“
  • PerlIO::encoding โ€” upgraded from version 0.21 to 0.24 ๐Ÿ”ค
  • PerlIO::mmap โ€” upgraded from version 0.014 to 0.016 ๐Ÿ—บ๏ธ
  • PerlIO::scalar โ€” upgraded from version 0.22 to 0.24 ๐Ÿ“œ
  • PerlIO::via โ€” upgraded from version 0.15 to 0.16 ๐Ÿ›ฃ๏ธ
  • Pod::Functions โ€” upgraded from version 1.09 to 1.10 ๐Ÿ“š
  • Pod::Perldoc โ€” upgraded from version 3.25 to 3.25_02 ๐Ÿ“–
  • Pod::Simple โ€” upgraded from version 3.29 to 3.32 ๐Ÿงพ
  • Pod::Usage โ€” upgraded from version 1.64 to 1.68 ๐Ÿ“‹
  • POSIX โ€” upgraded from version 1.53 to 1.65 ๐Ÿง
  • Scalar::Util โ€” upgraded from version 1.41 to 1.42_02 ๐Ÿ“
  • SDBM_File โ€” upgraded from version 1.13 to 1.14 ๐Ÿ—ƒ๏ธ
  • SelfLoader โ€” upgraded from version 1.22 to 1.23 ๐Ÿ“ฆ
  • Socket โ€” upgraded from version 2.018 to 2.020_03 ๐Ÿ”Œ
  • Storable โ€” upgraded from version 2.53 to 2.56 ๐Ÿ’พ
  • strict โ€” upgraded from version 1.09 to 1.11 ๐Ÿšฆ
  • Term::ANSIColor โ€” upgraded from version 4.03 to 4.04 ๐ŸŒˆ
  • Term::Cap โ€” upgraded from version 1.15 to 1.17 ๐Ÿงข
  • Test โ€” upgraded from version 1.26 to 1.28 ๐Ÿงช
  • Test::Harness โ€” upgraded from version 3.35 to 3.36 ๐Ÿ‡
  • Thread::Queue โ€” upgraded from version 3.05 to 3.08 ๐Ÿงต
  • threads โ€” upgraded from version 2.01 to 2.06 ๐Ÿงต
  • threads::shared โ€” upgraded from version 1.48 to 1.50 ๐Ÿค
  • Tie::File โ€” upgraded from version 1.01 to 1.02 ๐ŸŽ—๏ธ
  • Tie::Scalar โ€” upgraded from version 1.03 to 1.04 ๐ŸŽ€
  • Time::HiRes โ€” upgraded from version 1.9726 to 1.9732 โฑ๏ธ
  • Time::Piece โ€” upgraded from version 1.29 to 1.31 ๐Ÿ•ฐ๏ธ
  • Unicode::Collate โ€” upgraded from version 1.12 to 1.14 ๐Ÿ”ค
  • Unicode::Normalize โ€” upgraded from version 1.18 to 1.25 ๐Ÿ”ก
  • Unicode::UCD โ€” upgraded from version 0.61 to 0.64 ๐Ÿ“Š
  • UNIVERSAL โ€” upgraded from version 1.12 to 1.13 ๐ŸŒŒ
  • utf8 โ€” upgraded from version 1.17 to 1.19 ๐ŸŒ
  • version โ€” upgraded from version 0.9909 to 0.9916 ๐Ÿท๏ธ
  • warnings โ€” upgraded from version 1.32 to 1.36 โš ๏ธ
  • Win32 โ€” upgraded from version 0.51 to 0.52 ๐ŸชŸ
  • Win32API::File โ€” upgraded from version 0.1202 to 0.1203 ๐ŸชŸ
  • XS::Typemap โ€” upgraded from version 0.13 to 0.14 ๐Ÿ—บ๏ธ
  • XSLoader โ€” upgraded from version 0.20 to 0.21 ๐Ÿš€

๐Ÿ“š Documentation ๐Ÿ“š

now for the docs, bestie โ€” the receipts, the lore, the explanations. ๐Ÿ’…

๐Ÿ’… Changes to Existing Documentation ๐Ÿ’…

perlapi

  • The process of using undocumented globals has been documented, namely, that one should send email to perl5-porters@perl.org (that's the mailto:perl5-porters@perl.org link, btw) first to get the go-ahead for documenting and using an undocumented function or global variable. ๐Ÿ“ง

perlcall

A number of cleanups have been made to perlcall, including:

  • use "EXTEND(SP, n)" and PUSHs() instead of XPUSHs() where applicable and update prose to match โœจ
  • add POPu, POPul and POPpbytex to the "complete list of POP macros" and clarify the documentation for some of the existing entries, and a note about side-effects ๐Ÿ“
  • add API documentation for POPu and POPul ๐Ÿ“˜
  • use ERRSV more efficiently โšก
  • approaches to thread-safety storage of SVs. ๐Ÿงต

perlfunc

  • The documentation of "hex" has been revised to clarify valid inputs. ๐Ÿ”ข
  • Better explain meaning of negative PIDs in "waitpid". [GH #15108] โ€” https://github.com/Perl/perl5/issues/15108 ๐Ÿ›
  • General cleanup: there's more consistency now (in POD usage, grammar, code examples), better practices in code examples (use of "my", removal of bareword filehandles, dropped usage of "&" when calling subroutines, ...), etc. ๐Ÿงน

perlguts

  • A new section has been added, "Dynamic Scope and the Context Stack" in perlguts, which explains how the perl context stack works. ๐Ÿง 

perllocale

  • A stronger caution about using locales in threaded applications is given. Locales are not thread-safe, and you can get wrong results or even segfaults if you use them there. ๐Ÿ’€

perlmodlib

  • We now recommend contacting the module-authors list or PAUSE in seeking guidance on the naming of modules. ๐Ÿ“

perlop

  • The documentation of "qx//" now describes how $? is affected. ๐Ÿ’ฏ

perlpolicy

  • This note has been added to perlpolicy:
While civility is required, kindness is encouraged; if you have any doubt about whether you are being civil, simply ask yourself, "Am I being kind?" and aspire to that.

perlreftut

  • Fix some examples to be strict clean. โœจ

perlrebackslash

  • Clarify that in languages like Japanese and Thai, dictionary lookup is required to determine word boundaries. ๐Ÿ—พ

perlsub

  • Updated to note that anonymous subroutines can have signatures. ๐Ÿ’ซ

perlsyn

  • Fixed a broken example where "=" was used instead of "==" in conditional in do/while example. ๐Ÿฉน

perltie

  • The usage of "FIRSTKEY" and "NEXTKEY" has been clarified. ๐Ÿ”‘

perlunicode

  • Discourage use of 'In' as a prefix signifying the Unicode Block property. ๐Ÿšซ

perlvar

  • The documentation of $@ was reworded to clarify that it is not just for syntax errors in "eval". [GH #14572] โ€” https://github.com/Perl/perl5/issues/14572 ๐Ÿ›
  • The specific true value of $!{E...} is now documented, noting that it is subject to change and not guaranteed. โš ๏ธ
  • Use of $OLD_PERL_VERSION is now discouraged. ๐Ÿ™…

perlxs

  • The documentation of "PROTOTYPES" has been corrected; they are disabled by default, not enabled. โœ…

๐Ÿฉบ Diagnostics ๐Ÿฉบ

okay so the following additions and changes have been made to diagnostic output, bestie โ€” and that means warnings and fatal error messages, the whole glow-up. for the complete list of diagnostic messages, go check perldiag. no skimming. ๐Ÿ’–


โœจ New Diagnostics โœจ

๐Ÿ’€ New Errors ๐Ÿ’€

like, brand new ways to get yelled at:

  • %s must not be a named sequence in transliteration operator
  • Can't find Unicode property definition "%s" in regex;
  • Can't redeclare "%s" in "%s"
  • Character following \p must be '{' or a single-character Unicode property name in regex;
  • Empty \%c in regex; marked by <-- HERE in m/%s/
  • Illegal user-defined property name
  • Invalid number '%s' for -C option.
  • Sequence (?... not terminated in regex; marked by <-- HERE in m/%s/
  • Sequence (?P<... not terminated in regex; marked by <-- HERE in m/%s/
  • Sequence (?P>... not terminated in regex; marked by <-- HERE in m/%s/

๐Ÿ™ˆ New Warnings ๐Ÿ™ˆ

these ones are just, like, a gentle scream:

  • Assuming NOT a POSIX class since %s in regex; marked by <-- HERE in m/%s/
  • %s() is deprecated on :utf8 handles

๐Ÿ”„ Changes to Existing Diagnostics ๐Ÿ”„

the OGs got a lil makeover:

  • accessing the "IO" part of a glob as "FILEHANDLE" instead of "IO" is no longer deprecated, bestie! it is discouraged, purely to encourage uniformity (so that, for example, one can grep more easily ๐Ÿซถ), but it will not be removed. periodt. (GH #15105 โ€” https://github.com/Perl/perl5/issues/15105)
  • the diagnostic Hexadecimal float: internal error has been changed to Hexadecimal float: internal error (%s) so it can spill more tea โ€” i.e. include more info. ๐Ÿ’…
  • Can't modify non-lvalue subroutine call of &%s

this error now reports the name of the non-lvalue subroutine you tried to use as an lvalue. iconic of it, honestly.

  • when you run out of memory while attempting to increase the stack size, perl used to die with this cryptic little jumpscare: panic: av_extend_guts() negative count (-9223372036854775681). that's been fixed, and now you get the much prettier: Out of memory during stack extend โœจ

โš™๏ธ Configuration and Compilation โš™๏ธ

the build system said "let me cook":

  • Configure now acts as if the -O option is always passed, which lets command line options override saved configuration. the goal is to eliminate that confusion when command line options get ignored for no obvious reason (so rude). -O is now permitted, but ignored.
  • Bison 3.0 is now supported ๐Ÿ’–
  • Configure no longer probes for libnm by default. originally this was the "New Math" library, but the name got re-used by the GNOME NetworkManager. name theft fr. (GH #15115 โ€” https://github.com/Perl/perl5/issues/15115)
  • added Configure probes for newlocale, freelocale, and uselocale โœจ
  • PPPort.so/PPPort.dll no longer get installed, because they're not used by PPPort.pm โ€” only by its test files. nobody was using them, so they had to go ๐Ÿซถ
  • it's now possible to specify which compilation date shows up on perl -V output, by setting the macro PERL_BUILD_DATE. cute, custom, yours.
  • using the NO_HASH_SEED define in combination with the default hash algorithm PERL_HASH_FUNC_ONE_AT_A_TIME_HARD caused a fatal error while compiling the interpreter โ€” ever since Perl 5.17.10 ๐Ÿ˜ญ. this has been fixed.
  • Configure should handle spaces in paths a little better now. paths with spaces, we see you ๐Ÿ‘€
  • no longer generating EBCDIC POSIX-BC tables. the team doesn't believe anyone is using Perl and POSIX-BC at this time, and by not generating these tables it saves time during development and makes the resulting tar ball smaller. slay, less bytes. ๐ŸŒธ
  • the GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
  • you can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
  • the Win32 miniperl now has a real getcwd, which increases build performance โ€” resulting in getcwd() being 605x faster in Win32 miniperl. 605x. no cap. ๐Ÿ”ฅ
  • Configure now takes -Dusequadmath into account when calculating the alignbytes configuration variable. previously the mis-calculated alignbytes could cause alignment errors on debugging builds ๐Ÿ˜ฌ [perl #127894]

๐Ÿงช Testing ๐Ÿงช

  • a new test (t/op/aassign.t) has been added to test the list assignment operator OP_AASSIGN. new test just dropped โœจ
  • parallel building has been added to the dmake makefile.mk makefile. all Win32 compilers are supported ๐Ÿ’…

๐ŸŒˆ Platform Support ๐ŸŒˆ

Okay bestie, this is the part where literally every platform gets its moment in the spotlight, so grab a snack ๐Ÿ“


๐Ÿ—บ๏ธ Platform-Specific Notes ๐Ÿ—บ๏ธ

๐ŸŽ€ AmigaOS ๐ŸŽ€

  • The AmigaOS port has been reintegrated into the main tree, based off of Perl 5.22.1. Welcome home queen ๐Ÿ‘‘

๐Ÿฆ‹ Cygwin ๐Ÿฆ‹

  • Tests are more robust against unusual cygdrive prefixes. [GH #15076]

โญ EBCDIC โญ

  • UTF-EBCDIC extended โ€” so UTF-EBCDIC is like UTF-8 but for EBCDIC platforms, right? Well, it's now been extended so it can represent code points up to 2 ** 64 - 1 on platforms with 64-bit words. That brings it into parity with UTF-8, we love to see it ๐Ÿ’…

โš ๏ธ BUT: this enhancement requires an incompatible change to the representation of code points in the range 2 ** 30 to 2 ** 31 -1 (that upper one was the previous maximum representable code point). Which means a file that contains one of these code points, written out with previous versions of perl, cannot be read in, without conversion, by a perl containing this change. We do not believe any such files are in existence, but if you do have one, submit a ticket at perlbug@perl.org, and a conversion script will be written for you. ๐Ÿซถ

  • EBCDIC cmp() and sort() fixed for UTF-EBCDIC strings โ€” comparing two strings that were both encoded in UTF-8 (or more precisely, UTF-EBCDIC) did not work properly until now ๐Ÿ˜ญ. And since sort() uses cmp(), this fixes that as well. Two birds, one commit.
  • EBCDIC tr/// and y/// fixed for \N{}, and use utf8 ranges โ€” Perl v5.22 introduced the concept of portable ranges to regular expression patterns: a portable range matches the same set of characters no matter what platform is being run on. That concept is now extended to tr///. See tr/// for the deets. There were also some problems with these operations under use utf8, which are now fixed โœ…

๐Ÿ”ฅ FreeBSD ๐Ÿ”ฅ

  • It uses the fdclose() function from FreeBSD if it is available. [GH #15082]

๐Ÿ’œ IRIX ๐Ÿ’œ

  • Under some circumstances IRIX stdio fgetc() and fread() set the errno to ENOENT, which made no sense according to either IRIX or POSIX docs. Errno is now cleared in such cases. [GH #14557]
  • Problems when multiplying long doubles by infinity have been fixed. [GH #14993]

๐ŸŒธ MacOS X ๐ŸŒธ

  • Until now, OS X builds of perl have specified a link target of 10.3 (Panther, 2003) but have not specified a compiler target. From now on, builds of perl on OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X version and specify that as the explicit build target in both compiler and linker flags. That preserves binary compatibility for extensions built later, regardless of changes in OS X, SDK, or compiler and linker versions. Locked in ๐Ÿ”’

Want to override the default value used in the build and preserved in the flags? Just specify export MACOSX_DEPLOYMENT_TARGET=10.N before configuring and building perl, where 10.N is the version of OS X you wish to target. And in OS X 10.5 or earlier, there's no change to the behavior present when those systems were current โ€” the link target is still OS X 10.3, and there is no explicit compiler target.

  • Builds with both -DDEBUGGING and threading enabled would fail with a panic: free from wrong pool error when built or tested from Terminal on OS X ๐Ÿ’€. This was caused by perl's internal management of the environment conflicting with an atfork handler using the libc setenv() function to update the environment.

Perl now uses setenv()/unsetenv() to update the environment on OS X. [GH #14955]

โ˜€๏ธ Solaris โ˜€๏ธ

  • All Solaris variants now build a shared libperl

Solaris and variants like OpenIndiana now always build with the shared Perl library (Configure -Duseshrplib). This was required for the OpenIndiana builds, but it has also been the setting for Oracle/Sun Perl builds for several years. Consistency is the vibe โœจ

๐Ÿงš Tru64 ๐Ÿงš

  • Workaround where Tru64 balks when prototypes are listed as PERL_STATIC_INLINE, but where the test is built with -DPERL_NO_INLINE_FUNCTIONS.

๐ŸŒˆ VMS ๐ŸŒˆ

  • On VMS, the math function prototypes in math.h are now visible under C++. So building the POSIX extension with C++ will no longer crash ๐ŸŽ‰
  • VMS has had setenv/unsetenv since v7.0 (released in 1996), and Perl_vmssetenv now always uses setenv/unsetenv.
  • Perl now implements its own killpg by scanning for processes in the specified process group. That group may not mean exactly the same thing as a Unix process group, but it allows us to send a signal to a parent (or master) process and all of its sub-processes. At the perl level, this means we can now send a negative pid like so:
kill SIGKILL, -$pid;

to signal all processes in the same group as $pid. Main character energy, honestly ๐Ÿ‘‘

  • For those %ENV elements based on the CRTL environ array, case has always been preserved when setting them, but look-ups happened only after upcasing the key first โ€” which made lower- or mixed-case entries go missing ๐Ÿ™ˆ. This problem has been corrected by making %ENV elements derived from the environ array case-sensitive on look-up as well as case-preserving on store.
  • Environment look-ups for PERL5LIB and PERLLIB previously only considered logical names, but now consider all sources of %ENV as determined by PERL_ENV_TABLES and as documented in %ENV in perlvms.
  • The minimum supported version of VMS is now v7.3-2, released in 2003. As a side effect of this change, VAX is no longer supported โ€” the terminal release of OpenVMS VAX was v7.3 in 2001. RIP to a real one ๐Ÿชฆ

๐Ÿ’… Win32 ๐Ÿ’…

  • A new build option USE_NO_REGISTRY has been added to the makefiles. This option is off by default, meaning the default is to do Windows registry lookups. This option stops Perl from looking inside the registry for anything. For what values are looked up in the registry, see perlwin32. Internally, in C, the name of this option is WIN32_NO_REGISTRY.
  • The behavior of Perl using HKEY_CURRENT_USER\Software\Perl and HKEY_LOCAL_MACHINE\Software\Perl to look up certain values โ€” including %ENV vars starting with PERL โ€” has changed. Previously, the 2 keys were checked for entries at all times through the perl process's life time, even if they did not exist. For performance reasons, now, if the root key (i.e. HKEY_CURRENT_USER\Software\Perl or HKEY_LOCAL_MACHINE\Software\Perl) does not exist at process start time, it will not be checked again for %ENV override entries for the remainder of the perl process's life. This more closely matches Unix behavior, in that the environment is copied or inherited on startup, and changing the variable in the parent process or another process or editing .bashrc will not change the environmental variable in other existing, running, processes.
  • One glob fetch was removed for each -X or stat call, whether done from Perl code or internally from Perl's C code. The glob being looked up was ${^WIN32_SLOPPY_STAT}, which is a special variable. This makes -X and stat slightly faster โšก
  • During miniperl's process startup, during the build process, 4 to 8 IO calls related to the process starting .pl and the buildcustomize.pl file were removed from the code opening and executing the first 1 or 2 .pl files.
  • Builds using Microsoft Visual C++ 2003 and earlier no longer produce an INTERNAL COMPILER ERROR message. [perl #126045]
  • Visual C++ 2013 builds will now execute on XP and higher. Previously they would only execute on Vista and higher.
  • You can now build perl with GNU Make and GCC. [perl #123440]
  • truncate($filename, $size) now works for files over 4GB in size. [perl #125347]
  • Parallel building has been added to the dmake makefile.mk makefile. All Win32 compilers are supported.
  • Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would result in an invalid $Config{archname} for the resulting perl. [perl #127584]
  • Errors set by Winsock functions are now put directly into $^E, and the relevant WSAE* error codes are now exported from the Errno and POSIX modules for testing this against.
    • The previous behavior of putting the errors (converted to POSIX-style E* error codes since Perl 5.20.0) into $! was buggy, due to the non-equivalence of like-named Winsock and POSIX error constants โ€” a relationship between which has unfortunately been established in one way or another since Perl 5.8.0.
    • The new behavior provides a much more robust solution for checking Winsock errors in portable software, without accidentally matching POSIX tests that were intended for other OSes and may have different meanings for Winsock.
    • The old behavior is currently retained, warts and all, for backwards compatibility, but users are encouraged to change any code that tests $! against E* constants for Winsock errors to instead test $^E against WSAE* constants. After a suitable deprecation period, the old behavior may be removed, leaving $! unchanged after Winsock function calls, to avoid any possible confusion over which error variable to check.

๐Ÿ“ ppc64el ๐Ÿ“

  • floating point โ€” The floating point format of ppc64el (Debian naming for little-endian PowerPC) is now detected correctly. Periodt ๐Ÿ’ฏ

โœจ INTERNAL CHANGES โœจ (the plumbing got a glow-up)

okay so this whole section is under-the-hood stuff, but bestie, the hood is glittering now ๐Ÿ’…

  • The whole implementation of perl's context stack system, and its internal API, got heavily reworked. Note that no significant changes were made to any external APIs, but XS code that relies on these internal details may need to be fixed. The main changes are:
    • PUSHBLOCK(), POPSUB() and the other macros like them got replaced with static inline functions such as cx_pushblock(), cx_popsub() and friends. These take function args instead of implicitly leaning on local vars like gimme and newsp just vibing in scope. Their functionality changed too: especially, cx_popblock() no longer decrements cxstack_ix. And the ordering of the steps in the pp_leave* functions involving cx_popblock(), cx_popsub() etc. has changed. Go read the new docs, "Dynamic Scope and the Context Stack" in perlguts, for how to use them ๐Ÿ’–
    • Various macros, which now consistently have a CX_ prefix, have been added:
CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()

or renamed:

CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
  • cx_pushblock() now saves PL_savestack_ix and PL_tmps_floor, so pp_enter* and pp_leave* no longer do
ENTER; SAVETMPS; ....; LEAVE
  • cx_popblock() now also restores PL_curpm.
  • In dounwind() for every context type, the current savestack frame is now processed before each context is popped; formerly this was only done for sub-like context frames. This action has been removed from cx_popsub() and placed into its own macro, CX_LEAVE_SCOPE(cx), which must be called before cx_popsub() etc.

dounwind() now also does a cx_popblock() on the last popped frame (formerly it only did the cx_popsub() etc. actions on each frame).

  • The temps stack is now freed on scope exit; previously, temps created during the last statement of a block wouldn't be freed until the next nextstate following the block (apart from an existing hack that did this for recursive subs in scalar context); and in something like f(g()), the temps created by the last statement in g() would formerly not be freed until the statement following the return from f(). no cap ๐Ÿงš
  • Most values that were saved on the savestack on scope entry are now saved in suitable new fields in the context struct, and saved and restored directly by cx_pushfoo() and cx_popfoo(), which is so much faster โšก
  • Various context struct fields have been added, removed or modified.
  • The handling of @_ in cx_pushsub() and cx_popsub() has been considerably tidied up, including removing the argarray field from the context struct, and extracting out some common (but rarely used) code into a separate function, clear_defarray(). Also, useful subsets of cx_popsub() which had been unrolled in places like pp_goto have been gathered into the new functions cx_popsub_args() and cx_popsub_common().
  • pp_leavesub and pp_leavesublv now use the same function as the rest of the pp_leave*'s to process return args.
  • CXp_FOR_PAD and CXp_FOR_GV flags have been added, and CXt_LOOP_FOR has been split into CXt_LOOP_LIST, CXt_LOOP_ARY. she's fragmented, periodt ๐ŸŒธ
  • Some variables formerly declared by dMULTICALL (but not documented) have been removed.
  • The obscure PL_timesbuf variable, effectively a vestige of Perl 1, has been removed. It was documented as deprecated in Perl 5.20, with a statement that it would be removed early in the 5.21.x series; that has now finally happened ๐Ÿ’€ (sayonara, bestie) [GH #13632] <https://github.com/Perl/perl5/issues/13632>
  • An unwarranted assertion in Perl_newATTRSUB_x() has been removed. If a stub subroutine definition with a prototype has been seen, then any subsequent stub (or definition) of the same subroutine with an attribute was causing an assertion failure because of a null pointer. [GH #15081] <https://github.com/Perl/perl5/issues/15081>
  • "::" has been replaced by "__" in ExtUtils::ParseXS, like it's done for parameters/return values. This is more consistent, and simplifies writing XS code wrapping C++ classes into a nested Perl namespace (it requires only a typedef for "Foo__Bar" rather than two, one for "Foo_Bar" and the other for "Foo::Bar"). lowkey genius ๐Ÿซถ
  • The to_utf8_case() function is now deprecated. Instead use "toUPPER_utf8", "toTITLE_utf8", "toLOWER_utf8", and "toFOLD_utf8". (See <http://nntp.perl.org/group/perl.perl5.porters/233287>.)
  • Perl core code and the threads extension have been annotated so that, if Perl is configured to use threads, then during compile-time clang (3.6 or later) will warn about suspicious uses of mutexes. See <http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more information.
  • The signbit() emulation has been enhanced. This will help older and/or more exotic platforms or configurations. we love an accessible upgrade ๐Ÿ‘‘
  • Most EBCDIC-specific code in the core has been unified with non-EBCDIC code, to avoid repetition and make maintenance easier.
  • MSWin32 code for $^X has been moved out of the win32 directory to caretx.c, where other operating systems set that variable.
  • sv_ref() is now part of the API. โœจ
  • "sv_backoff" in perlapi had its return type changed from "int" to "void". It previously has always returned 0 since Perl 5.000 stable but that was undocumented. Although "sv_backoff" is marked as public API, XS code is not expected to be impacted since the proper API call would be through public API "sv_setsv(sv, &PL_sv_undef)", or quasi-public "SvOOK_off", or non-public "SvOK_off" calls, and the return value of "sv_backoff" was previously a meaningless constant that can be rewritten as "(sv_backoff(sv),0)".
  • The "EXTEND" and "MEXTEND" macros have been improved to avoid various issues with integer truncation and wrapping. In particular, some casts formerly used within the macros have been removed. This means for example that passing an unsigned "nitems" argument is likely to raise a compiler warning now (it's always been documented to require a signed value; formerly int, lately SSize_t). consider this your warning, bestie ๐Ÿ™ˆ
  • "PL_sawalias" and "GPf_ALIASED_SV" have been removed.
  • "GvASSIGN_GENERATION" and "GvASSIGN_GENERATION_set" have been removed.

๐Ÿ› SELECTED BUG FIXES ๐Ÿ› (the glow-up receipts)

  • It now works properly to specify a user-defined property, such as
qr/\p{mypkg1::IsMyProperty}/i

with "/i" caseless matching, an explicit package name, and IsMyProperty not defined at the time of the pattern compilation. iconic behavior honestly ๐Ÿ’…

  • Perl's memcpy(), memmove(), memset() and memcmp() fallbacks are now more compatible with the originals. [perl #127619]
  • Fixed the issue where a "s///r") with -DPERL_NO_COW attempts to modify the source SV, resulting in the program dying. [perl #127635]
  • Fixed an EBCDIC-platform-only case where a pattern could fail to match. This occurred when matching characters from the set of C1 controls when the target matched string was in UTF-8.
  • Narrow the filename check in strict.pm and warnings.pm. Previously, it assumed that if the filename (without the .pmc? extension) differed from the package name, if was a misspelled use statement (i.e. "use Strict" instead of "use strict"). We now check whether there's really a miscapitalization happening, and not some other issue. no more false accusations fr fr ๐Ÿ˜ค
  • Turn an assertion into a more user friendly failure when parsing regexes. [perl #127599]
  • Correctly raise an error when trying to compile patterns with unterminated character classes while there are trailing backslashes. [perl #126141].
  • Line numbers larger than 231-1 but less than 232 are no longer returned by caller() as negative numbers. [perl #126991]
  • "unless ( assignment )" now properly warns when syntax warnings are enabled. [perl #127122]
  • Setting an "ISA" glob to an array reference now properly adds "isaelem" magic to any existing elements. Previously modifying such an element would not update the ISA cache, so method calls would call the wrong function. Perl would also crash if the "ISA" glob was destroyed, since new code added in 5.23.7 would try to release the "isaelem" magic from the elements. [perl #127351] ๐Ÿ’€๐Ÿ’€
  • If a here-doc was found while parsing another operator, the parser had already read end of file, and the here-doc was not terminated, perl could produce an assertion or a segmentation fault. This now reliably complains about the unterminated here-doc. [perl #125540]
  • untie() would sometimes return the last value returned by the UNTIE() handler as well as its normal value, messing up the stack. [perl #126621] rude tbh ๐Ÿ“
  • Fixed an operator precedence problem when " castflags & 2" is true. [perl #127474]
  • Caching of DESTROY methods could result in a non-pointer or a non-STASH stored in the SvSTASH() slot of a stash, breaking the B STASH() method. The DESTROY method is now cached in the MRO metadata for the stash. [perl #126410]
  • The AUTOLOAD method is now called when searching for a DESTROY method, and correctly sets $AUTOLOAD too. [perl #124387] [perl #127494]
  • Avoid parsing beyond the end of the buffer when processing a "#line" directive with no filename. [perl #127334]
  • Perl now raises a warning when a regular expression pattern looks like it was supposed to contain a POSIX class, like "qr/[[:alpha:]]/", but there was some slight defect in its specification which causes it to instead be treated as a regular bracketed character class. An example would be missing the second colon in the above like this: "qr/[[:alpha]]/". This compiles to match a sequence of two characters. The second is "]", and the first is any of: "[", ":", "a", "h", "l", or "p". This is unlikely to be the intended meaning, and now a warning is raised. No warning is raised unless the specification is very close to one of the 14 legal POSIX classes. (See "POSIX Character Classes" in perlrecharclass.) [perl #8904] the way it catches your typo before you do ๐Ÿงš
  • Certain regex patterns involving a complemented POSIX class in an inverted bracketed character class, and matching something else optionally would improperly fail to match. An example of one that could fail is "qr/_?[^\Wbar]\x{100}/". This has been fixed. [perl #127537] slay ๐Ÿ”ฅ
  • Perl 5.22 added support for the C99 hexadecimal floating point notation, which was very "look at me being fancy" of it, but sometimes it misparsed hex floats. That? Fixed. [perl #127183]
  • A regression was out here letting undeclared barewords in hash keys work anyway, despite strictures ๐Ÿ’€ like the strictness was not strict-ing at all. Fixed now. [GH #15099] https://github.com/Perl/perl5/issues/15099
  • When an import() or unimport() method isn't found, perl makes calls to the internal placeholder &PL_sv_yes. Those calls now correctly handle scalar context, as they should. [GH #14902] https://github.com/Perl/perl5/issues/14902
  • Now we report more context when we see an array where we expected to see an operator, and we avoid an assertion failure. Two-for-one, lowkey iconic. [GH #14472] https://github.com/Perl/perl5/issues/14472
  • Modifying an array that used to be a package @ISA no longer causes assertion failures or crashes. [GH #14492] https://github.com/Perl/perl5/issues/14492
  • Binary compatibility is retained across plain and DEBUGGING perl builds. [GH #15122] https://github.com/Perl/perl5/issues/15122
  • Setting $ENV{foo} on darwin no longer leaks memory, bestie, we fixed the drips ๐Ÿšฐ [GH #14955] https://github.com/Perl/perl5/issues/14955
  • /...\G/ no longer crashes on utf8 strings. Okay so here's the tea: when \G is a fixed number of characters from the start of the regex, perl needs to count back that many characters from the current pos() position and start matching from there. But it was counting back bytes instead of characters, which could lead to panics on utf8 strings. Rude behavior, now corrected.
  • In some cases, operators that return integers were returning negative integers as large positive integers ๐Ÿ˜ญ [GH #15049] https://github.com/Perl/perl5/issues/15049
  • The pipe() operator would assert for DEBUGGING builds instead of producing the correct error message. The condition it asserted on is detected and reported on correctly without the assertions, so โ€” plot twist โ€” the assertions got removed. [GH #15015] https://github.com/Perl/perl5/issues/15015
  • In some cases, failing to parse a here-doc would try to use freed memory. The culprit? A pointer that wasn't restored correctly ๐Ÿ™ˆ [GH #15009] https://github.com/Perl/perl5/issues/15009
  • @x = sort { *a = 0; $a <=> $b } 0 .. 1 no longer frees the GP for *a before restoring its SV slot. [GH #14595] https://github.com/Perl/perl5/issues/14595
  • Multiple problems with the new hexadecimal floating point printf format %a got fixed: [GH #15032] https://github.com/Perl/perl5/issues/15032, [GH #15033] https://github.com/Perl/perl5/issues/15033, [GH #15074] https://github.com/Perl/perl5/issues/15074
  • Calling mg_set() in leave_scope() no longer leaks. โœจ
  • A regression from Perl v5.20 got fixed where the debugging output of regular expression compilation was wrong. To be clear: the pattern was correctly compiled, but what got displayed for it was wrong. So the regex was fine, it was just lying to you about itself.
  • \b{sb} works much better. In Perl v5.22.0, this brand new construct didn't seem to give the expected results, yet it passed all the tests in the extensive suite furnished by Unicode ๐Ÿ‘€ It turns out that was because those were short input strings, and the failures had to do with longer inputs. Sneaky little guy.
  • Certain syntax errors in "Extended Bracketed Character Classes" in perlrecharclass caused panics instead of the proper error message. This has now been fixed. [perl #126481]
  • Perl 5.20 added a message for when a quantifier in a regular expression was useless โ€” and then caused the parser to skip it, which meant the surplus quantifier got silently ignored instead of throwing an error. That's now fixed. [perl #126253]
  • The switch to building non-XS modules last in win32/makefile.mk (introduced by design as part of the changes to enable parallel building) caused the build of POSIX to break, due to problems with the version module. This is now fixed.
  • Improved parsing of hex float constants. โœจ slay.
  • Fixed an issue with pack where pack "H" (and pack "h") could read past the source when given a non-utf8 source, and a utf8 target. [perl #126325]
  • Fixed several cases where perl would abort due to a segmentation fault, or a C-level assert. [perl #126615], [perl #126602], [perl #126193].
  • There were places in regular expression patterns where comments ((?#...)) weren't allowed but should have been. This is now fixed. [GH #12755] https://github.com/Perl/perl5/issues/12755
  • Some regressions from Perl 5.20 have been fixed, where some syntax errors in (?[...]) constructs within regular expression patterns could cause a segfault instead of a proper error message. [GH #14933] https://github.com/Perl/perl5/issues/14933 [GH #14996] https://github.com/Perl/perl5/issues/14996
  • Another problem with (?[...]) constructs is fixed, wherein things like \c] could cause panics. [GH #14934] https://github.com/Perl/perl5/issues/14934
  • Some problems with attempting to extend the perl stack to around 2G or 4G entries have been fixed. This was particularly an issue on 32-bit perls built to use 64-bit integers, and it was super easy to notice with the list repetition operator, e.g.
@a = (1) x $big_number

Formerly perl may have crashed, depending on the exact value of $big_number; now it will typically raise an exception instead. [GH #14880] https://github.com/Perl/perl5/issues/14880

  • In a regex conditional expression (?(condition)yes-pattern|no-pattern), if the condition is (?!) then perl failed the match outright instead of matching the no-pattern. This has been fixed. [GH #14947] https://github.com/Perl/perl5/issues/14947
  • The special backtracking control verbs (*VERB:ARG) now all allow an optional argument, and they set REGERROR/REGMARK appropriately as well. [GH #14937] https://github.com/Perl/perl5/issues/14937
  • Several bugs โ€” including a segmentation fault โ€” have been fixed with the boundary checking constructs (introduced in Perl 5.22): \b{gcb}, \b{sb}, \b{wb}, \B{gcb}, \B{sb}, and \B{wb}. All the \B{} ones now match an empty string; none of the \b{} ones do. [GH #14976] https://github.com/Perl/perl5/issues/14976
  • Duplicating a closed file handle for write no longer creates a filename of the form GLOB(0xXXXXXXXX). [perl #125115]
  • Warning fatality is now ignored when rewinding the stack. This prevents infinite recursion when the now fatal error also causes rewinding of the stack. [perl #123398]
  • In perl v5.22.0, the logic changed when parsing a numeric parameter to the -C option, such that the successfully parsed number was not saved as the option value if it parsed to the end of the argument. [perl #125381]
  • The PadlistNAMES macro is an lvalue again. ๐Ÿ‘‘
  • Zero -DPERL_TRACE_OPS memory for sub-threads.

perl_clone_using() was missing Zero init of PL_op_exec_cnt[]. This caused sub-threads in threaded -DPERL_TRACE_OPS builds to spew exceedingly large op-counts at destruct. Those counts would print %x as ABABABAB, clearly a mem-poison value. ๐Ÿ’€

  • A leak in the XS typemap caused one scalar to be leaked each time a FILE * or a PerlIO * was OUTPUT:ed or imported to Perl, and this has been going on since perl 5.000 ๐Ÿ˜ญ These particular typemap entries are thought to be extremely rarely used by XS modules. [perl #124181]
  • alarm() and sleep() will now warn if the argument is a negative number and return undef. Previously they would pass the negative value on to the underlying C function, which may have set up a timer with a surprising value. ๐Ÿ™ˆ no thank you.
  • Perl can again be compiled with any Unicode version. This used to (mostly) work, but it got lost in v5.18 through v5.20. The property Name_Alias did not exist prior to Unicode 5.0 โ€” but Unicode::UCD incorrectly said it did. This has been fixed.
  • Very large code-points (beyond Unicode) in regular expressions no longer cause a buffer overflow in some cases when converted to UTF-8. [GH #14858] https://github.com/Perl/perl5/issues/14858
  • The integer overflow check for the range operator (...) in list context now correctly handles the case where the size of the range is larger than the address space. This could happen on 32-bits with -Duse64bitint. [GH #14843] https://github.com/Perl/perl5/issues/14843
  • A crash with %::=(); J->${\"::"} has been fixed. [GH #14790] https://github.com/Perl/perl5/issues/14790
  • qr/(?[ () ])/ no longer segfaults โ€” it gives a syntax error message instead. Much more polite, honestly. [perl #125805]
  • The regular expression possessive quantifier v5.20 regression is now fixed. qr/"PAT"{"min,max"}+"/ is supposed to behave identically to qr/(?>"PAT"{"min,max"})/. Since v5.20, this didn't work if min and max were equal. [perl #125825]
  • BEGIN <> no longer segfaults and properly produces an error message. [perl #125341]
  • In tr///, an illegal backwards range like tr/\x{101}-\x{100}// was not always detected, which gave incorrect results. This is now fixed. โœ…

๐Ÿ’– Acknowledgements ๐Ÿ’–

okay so bestie, gather round, because this is the part where we scream about the girlies (and dudes, and everyone) who made this happen. ๐ŸŽ€

Perl 5.24.0 represents approximately 11 months of development since Perl 5.24.0 and contains approximately 360,000 lines of changes across 1,800 files from 75 authors. yes you read that right. 360,000. lines. iconic behavior ๐Ÿ’…

Excluding auto-generated files, documentation and release tools, there were approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h files. genuinely no cap, that's a LOT.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.24.0:

  • Aaron Crane, Aaron Priven, Abigail, Achim Gratz, Alexander D'Archangel, Alex Vandiver, Andreas Kรถnig, Andy Broad, Andy Dougherty, Aristotle Pagaltzis, Chase Whitener, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsรฅker, Dan Collins, Daniel Dragan, David Golden, David Mitchell, Doug Bell, Dr.Ruud, Ed Avis, Ed J, Father Chrysostomos, Herbert Breunung, H.Merijn Brand, Hugo van der Sanden, Ivan Pozdeev, James E Keenan, Jan Dubois, Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, John Peacock, John SJ Anderson, Karen Etheridge, Karl Williamson, kmx, Leon Timmermans, Ludovic E. R. Tolhurst-Cleaver, Lukas Mai, Martijn Lievaart, Matthew Horsfall, Mattia Barbon, Max Maischein, Mohammed El-Afifi, Nicholas Clark, Nicolas R., Niko Tyni, Peter John Acklam, Peter Martini, Peter Rabbitson, Pip Cet, Rafael Garcia-Suarez, Reini Urban, Ricardo Signes, Sawyer X, Shlomi Fish, Sisyphus, Stanislaw Pusep, Steffen Mรผller, Stevan Little, Steve Hay, Sullivan Beck, Thomas Sibley, Todd Rinaldo, Tom Hukins, Tony Cook, Unicode Consortium, Victor Adam, Vincent Pit, Vladimir Timofeev, Yves Orton, Zachary Storer, Zefram.

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. ๐Ÿ˜ญ they deserve their flowers too fr fr.

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 https://rt.perl.org/ . There may also be information at http://www.perl.org/ , the Perl Home Page.

If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. 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. (the perl -V thing is important bestie, it's like a vibe check for your build ๐Ÿ’…)

โš ๏ธ okay so this one matters: If the bug you are reporting has security implications which make it inappropriate to send to a publicly archived mailing list, then see "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of how to report the issue. do NOT just yeet a security bug into a public list, that's the one thing you should not do ๐Ÿ™ˆ

๐Ÿ‘€ 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.

okay bestie that's the whole page, we made it to the end ๐Ÿ’– thanks for reading the entire 5.24.0 delta with me, we literally ate. this was perl v5.44.0, dated 2026-10-17, and it belongs to PERL5240DELTA(1perl). periodt. ๐ŸŒˆ๐Ÿ’…๐Ÿซถ

๐Ÿ“ฆ 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