PERL5280DELTA(1)

โœจ perl5280delta โœจ

what is new for perl v5.28.0 โ€” and bestie, this is the Perl Programmers Reference Guide entry for it, so you know it's the official tea ๐Ÿ’…


NAME

perl5280delta โ€” what is new for perl v5.28.0 ๐ŸŽ€


DESCRIPTION

okay so this doc is literally the rundown of every difference between the 5.26.0 release and the 5.28.0 release. it's giving glow-up, it's giving receipts ๐Ÿ“‹

and if you're upgrading from something even older, like 5.24.0, no worries bestie โ€” but you gotta read perl5260delta first, because that one covers the differences between 5.24.0 and 5.26.0. do it in order, don't skip steps, iykyk ๐Ÿฆ‹


Core Enhancements ๐Ÿ‘‘

Unicode 10.0 is supported ๐ŸŒˆ

there's a whole list of changes over at <http://www.unicode.org/versions/Unicode10.0.0>. slay.

delete on key/value hash slices ๐Ÿ—๏ธ

delete can now be used on key/value hash slices, and it returns the keys along with the deleted values. iconic. [GH #15982] <https://github.com/Perl/perl5/issues/15982>

Experimentally, there are now alphabetic synonyms for some regular expression assertions ๐Ÿ”ค

if you find it difficult to remember how to write certain of the pattern assertions โ€” and honestly, valid, who doesn't โ€” there are now alphabetic synonyms. no cap.

CURRENT                NEW SYNONYMS
------                 ------------
(?=...)        (*pla:...) or (*positive_lookahead:...)
(?!...)        (*nla:...) or (*negative_lookahead:...)
(?<=...)       (*plb:...) or (*positive_lookbehind:...)
(?<!...)       (*nlb:...) or (*negative_lookbehind:...)
(?>...)        (*atomic:...)
โš ๏ธ these are considered experimental, so using any of these will raise (unless turned off) a warning in the experimental::alpha_assertions category. bestie, heed the warning ๐Ÿ’€

Mixed Unicode scripts are now detectable ๐Ÿ•ต๏ธโ™€๏ธ

a mixture of scripts โ€” like Cyrillic and Latin chilling in the same string โ€” is often the sign of a spoofing attack. ๐Ÿ˜ญ a new regular expression construct now allows for easy detection of these. for example, you can say

qr/(*script_run: \d+ \b )/x

and the digits matched will all be from the same set of 10. you won't get a look-alike digit from a different script that has a different value than what it appears to be. main character energy: verified โœ…

or:

qr/(*sr: \b \w+ \b )/x

which makes sure that all the characters come from the same script.

you can also combine script runs with (?>...) (or *atomic:...)).

instead of writing:

(*sr:(?<...))

you can now run:

(*asr:...)
# or
(*atomic_script_run:...)
โš ๏ธ this is considered experimental, so using it will raise (unless turned off) a warning in the experimental::script_run category.

see "Script Runs" in perlre. ๐Ÿงš

In-place editing with perl -i is now safer ๐Ÿ›Ÿ

previously in-place editing (perl -i) would delete or rename the input file as soon as you started working on a new file. ๐Ÿ˜ฌ

without backups this would result in loss of data if there was an error โ€” like, say, a full disk โ€” when writing to the output file. not the vibe.

this has changed so that the input file isn't replaced until the output file has been completely written and successfully closed. obsessed with the caution tbh ๐Ÿซถ

this works by creating a work file in the same directory, which is renamed over the input file once the output file is complete.

incompatibilities, bestie, listen up:

  • since this renaming needs to only happen once, if you create a thread or child process, that renaming will only happen in the original thread or process.
  • if you change directories while processing a file, and your operating system doesn't provide the unlinkat(), renameat() and fchmodat() functions, the final rename step may fail. ๐Ÿ’€

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

Initialisation of aggregate state variables ๐ŸŒฑ

a persistent lexical array or hash variable can now be initialized, by an expression such as state @a = qw(x y z). initialization of a list of persistent lexical variables is still not possible though. one step at a time ig ๐Ÿ™ˆ

Full-size inode numbers ๐Ÿ”ข

on platforms where inode numbers are of a type larger than perl's native integer numerical types, stat will preserve the full content of large inode numbers by returning them in the form of strings of decimal digits. exact comparison of inode numbers can thus be achieved by comparing with eq rather than ==. comparison with ==, and other numerical operations (which are usually meaningless on inode numbers), work as well as they did before โ€” which is to say they fall back to floating point, and ultimately operate on a fairly useless rounded inode number if the real inode number is too big for the floating point format. ๐Ÿซ 

The sprintf %j format size modifier is now available with pre-C99 compilers ๐Ÿงฎ

the actual size used depends on the platform, so it remains unportable. periodt.

Close-on-exec flag set atomically ๐Ÿ”

when opening a file descriptor, perl now generally opens it with its close-on-exec flag already set, on platforms that support doing so. this improves thread safety, because it means that an exec initiated by one thread can no longer cause a file descriptor in the process of being opened by another thread to be accidentally passed to the executed program. we love a race-condition fix ๐Ÿ’…

additionally, perl now sets the close-on-exec flag more reliably, whether it does so atomically or not. most file descriptors were getting the flag set, but some were being missed. not anymore, bestie โœจ

String- and number-specific bitwise ops are no longer experimental โšก

the new string-specific (&. |. ^. ~.) and number-specific (& | ^ ~) bitwise operators introduced in Perl 5.22 that are available within the scope of use feature 'bitwise' are no longer experimental. glow-up confirmed ๐ŸŒŸ

because the number-specific ops are spelled the same way as the existing operators that choose their behaviour based on their operands, these operators must still be enabled via the bitwise feature, in either of these two ways:

use feature "bitwise";

use v5.28; # "bitwise" now included

they are also now enabled by the -E command-line switch.

the bitwise feature no longer emits a warning. existing code that disables the experimental::bitwise warning category that the feature previously used will continue to work. ๐ŸŽ€

โš ๏ธ one caveat that module authors ought to be aware of: the numeric operators now pass a fifth TRUE argument to overload methods. any methods that check the number of operands may croak if they do not expect so many. XS authors in particular should be aware that this:
SV *
bitop_handler (lobj, robj, swap)

may need to be changed to this:

SV *
bitop_handler (lobj, robj, swap, ...)

Locales are now thread-safe on systems that support them ๐Ÿงต

these systems include Windows starting with Visual Studio 2005, and in POSIX 2008 systems.

the implication is that you are now free to use locales and change them in a threaded environment. your changes affect only your thread. see "Multi-threaded operation" in perllocale. ๐ŸŒธ

New read-only predefined variable ${^SAFE_LOCALES} ๐Ÿงฟ

this variable is 1 if the Perl interpreter is operating in an environment where it is safe to use and change locales (see perllocale.) this variable is true when the perl is unthreaded, or compiled in a platform that supports thread-safe locale operation (see previous item). cute and informative, we stan ๐Ÿ’œ


Security ๐Ÿ›ก๏ธ

[CVE-2017-12837] Heap buffer overflow in regular expression compiler ๐Ÿ’ฅ

compiling certain regular expression patterns with the case-insensitive modifier could cause a heap buffer overflow and crash perl. this has now been fixed. [GH #16021] <https://github.com/Perl/perl5/issues/16021>

[CVE-2017-12883] Buffer over-read in regular expression parser ๐Ÿ’ฅ

for certain types of syntax error in a regular expression pattern, the error message could either contain the contents of a random, possibly large, chunk of memory, or could crash perl. this has now been fixed. [GH #16025] <https://github.com/Perl/perl5/issues/16025>

[CVE-2017-12814] $ENV{$key} stack buffer overflow on Windows ๐Ÿ’ฅ

a possible stack buffer overflow in the %ENV code on Windows has been fixed by removing the buffer completely since it was superfluous anyway. bye buffer ๐Ÿ‘‹ [GH #16051] <https://github.com/Perl/perl5/issues/16051>

Default Hash Function Change ๐Ÿ”€

Perl 5.28.0 retires various older hash functions which are not viewed as sufficiently secure for use in Perl. we now support four general purpose hash functions, Siphash (2-4 and 1-3 variants), and Zaphod32, and StadtX hash. in addition we support SBOX32 (a form of tabular hashing) for hashing short strings, in conjunction with any of the other hash functions provided.

by default Perl is configured to support SBOX hashing of strings up to 24 characters, in conjunction with StadtX hashing on 64 bit builds, and Zaphod32 hashing for 32 bit builds.

you may control these settings with the following options to Configure:

-DPERL_HASH_FUNC_SIPHASH
-DPERL_HASH_FUNC_SIPHASH13
-DPERL_HASH_FUNC_STADTX
-DPERL_HASH_FUNC_ZAPHOD32

to disable SBOX hashing you can use

-DPERL_HASH_USE_SBOX32_ALSO=0

and to set the maximum length to use SBOX32 hashing on with:

-DSBOX32_MAX_LEN=16

the maximum length allowed is 256. there probably isn't much point in setting it higher than the default. fr fr. ๐Ÿ“


more parts incoming bestie, don't go anywhere ๐Ÿ’–

๐Ÿ’” Incompatible Changes ๐Ÿ’”

okay bestie, deep breath, because this is the part where perl said "we're changing things and your old code might yell at you" ๐Ÿ˜ญ every single one of these is a real break, so read them, don't skim them, i'm serious.


๐ŸŒธ Subroutine attribute and signature order ๐ŸŒธ

the experimental subroutine signatures feature got flipped. subroutine attributes now have to come before the signature, not after it. why? because attributes like :lvalue can literally affect how the code inside the signature compiles. like, look:

sub f :lvalue ($a = do { $x = "abc"; return substr($x,0,1)}) { ...}

and ngl bestie, this is the second time these two have been flipped, so:

sub f :lvalue ($a, $b) { ... }; # 5.20; 5.28 onwards
sub f ($a, $b) :lvalue { ... }; # 5.22 - 5.26

๐Ÿšซ Comma-less variable lists in formats are no longer allowed ๐Ÿšซ

skipping the commas between the variables you pass to formats? no longer allowed. not even a little. this has been deprecated since Perl 5.000, so honestly it had it coming.

โœ‚๏ธ The :locked and :unique attributes have been removed โœ‚๏ธ

gone. deleted. they've been no-ops and deprecated since Perl 5.12 and 5.10, respectively.

๐Ÿซฅ \N{} with nothing between the braces is now illegal ๐Ÿซฅ

empty braces, empty vibes, illegal now. this has been deprecated since Perl 5.24.

๐Ÿ—‚๏ธ Opening the same symbol as both a file and directory handle is no longer allowed ๐Ÿ—‚๏ธ

using open() and opendir() to hook both a filehandle and a dirhandle onto the same symbol (glob or scalar)? nope. deprecated since Perl 5.10.

๐Ÿ‘ป Use of bare << to mean <<"" is no longer allowed ๐Ÿ‘ป

the bare terminator era is over. deprecated since Perl 5.000.

๐Ÿ’€ Setting $/ to a reference to a non-positive integer no longer allowed ๐Ÿ’€

this used to act like you'd set it to undef, but that's been deprecated since Perl 5.20. now it's just not a thing.

๐Ÿ”ฅ Unicode code points with values exceeding IV_MAX are now fatal ๐Ÿ”ฅ

fatal, bestie. deprecated since Perl 5.24, now it will end you.

๐Ÿชฆ The B::OP::terse method has been removed ๐Ÿชฆ

use B::Concise::b_terse instead. that's the whole note. periodt.

๐Ÿ™… Use of inherited AUTOLOAD for non-methods is no longer allowed ๐Ÿ™…

deprecated back in Perl 5.004. it's been waiting SO long for this.

๐ŸŒˆ Use of strings with code points over 0xFF is not allowed for bitwise string operators ๐ŸŒˆ

code points over 0xFF just don't make sense for bitwise operators, so such an operation will now croak โ€” except for a few remaining cases. see perldeprecation.

this was deprecated in Perl 5.24.

๐ŸงŠ Setting ${^ENCODING} to a defined value is now illegal ๐ŸงŠ

deprecated since Perl 5.22, and a no-op since Perl 5.26. it's giving ghost.

๐Ÿ›ฃ๏ธ Backslash no longer escapes colon in PATH for the -S switch ๐Ÿ›ฃ๏ธ

previously the -S switch incorrectly treated backslash (\) as an escape for colon while walking the PATH environment variable. not anymore. [GH #15584] https://github.com/Perl/perl5/issues/15584

๐Ÿ•ณ๏ธ the -DH (DEBUG_H) misfeature has been removed ๐Ÿ•ณ๏ธ

on a perl built with debugging support, the H flag to the -D debugging option is gone. it was supposed to dump hash values, but it's been broken for many years. rip bozo ๐Ÿ’€

๐ŸŽญ Yada-yada is now strictly a statement ๐ŸŽญ

by the time of its initial stable release in Perl 5.12, the ... (yada-yada) operator was explicitly intended to serve as a statement, not an expression. but the original implementation was confused on this point, which led to inconsistent parsing. the operator was accidentally accepted in a few situations where it didn't serve as a complete statement, like:

... . "foo";
... if $a < $b;

the parsing has now been made consistent, permitting yada-yada only as a statement. affected code can use do{...} to put a yada-yada into an arbitrary expression context. ๐Ÿซถ

๐Ÿงฎ Sort algorithm can no longer be specified ๐Ÿงฎ

since Perl 5.8, the sort pragma has had subpragmata _mergesort, _quicksort, and _qsort that let you pick which algorithm perl uses to implement the sort builtin. this was always considered a dubious feature that might not last โ€” hence the underscore spellings โ€” and they were documented as not being portable beyond Perl 5.8. these subpragmata have now been deleted, and any attempt to use them is an error. the sort pragma otherwise remains, and the algorithm-neutral stable subpragma can be used to control sorting behaviour. [GH #13234] https://github.com/Perl/perl5/issues/13234

๐Ÿ”ข Over-radix digits in floating point literals ๐Ÿ”ข

octal and binary floating point literals used to permit any hexadecimal digit to appear after the radix point. the digits are now restricted to those appropriate for the radix โ€” exactly like the digits before the radix point always were.

๐Ÿ“ฆ Return type of unpackstring() ๐Ÿ“ฆ

the return types of the C API functions unpackstring() and unpack_str() have changed from I32 to SSize_t, so they can handle datasets of more than two billion items. iconic capacity upgrade honestly.


โš ๏ธ Deprecations โš ๏ธ

these aren't gone yet, but they're on the clock and the clock is loud. ๐Ÿ‘€

๐Ÿšซ Use of vec on strings with code points above 0xFF is deprecated ๐Ÿšซ

such strings are represented internally in UTF-8, and vec is a bit-oriented operation that will likely give you unexpected results on those strings. so likeโ€ฆ don't.

๐ŸŽ Some uses of unescaped { in regexes are no longer fatal ๐ŸŽ

Perl 5.26.0 fatalized some uses of an unescaped left brace, but an exception was made at the last minute โ€” specifically crafted to be a minimal change to allow GNU Autoconf to work. that tool is heavily depended upon, and it continues to use the deprecated usage. its use of an unescaped left brace is one where we have no intention of repurposing { to be something other than itself.

that exception is now generalized to include various other such cases where the { will not be repurposed.

note that these uses continue to raise a deprecation message. ๐Ÿ“ข

๐Ÿฅบ Use of unescaped { immediately after a ( in regular expression patterns is deprecated ๐Ÿฅบ

using unescaped left braces is officially deprecated everywhere, but it's not enforced in contexts where their use doesn't interfere with expected extensions to the language. a deprecation is added in this release when the brace appears immediately after an opening parenthesis. before this, even if the brace was part of a legal quantifier, it was not interpreted as such โ€” it was read as the literal characters, unlike other quantifiers that follow a ( which are considered errors. now, their use will raise a deprecation message, unless turned off.

โณ Assignment to $[ will be fatal in Perl 5.30 โณ

assigning a non-zero value to $[ has been deprecated since Perl 5.12, but was never given a deadline for removal. that's now been scheduled for Perl 5.30. mark your calendars bestie ๐Ÿ“…

๐Ÿ“ž hostname() won't accept arguments in Perl 5.32 ๐Ÿ“ž

passing arguments to Sys::Hostname::hostname() was already deprecated, but it didn't have a removal date. that's now been scheduled for Perl 5.32. [GH #14662] https://github.com/Perl/perl5/issues/14662

๐Ÿ“ค Module removals ๐Ÿ“ค

the following modules will be removed from the core distribution in a future release, and will at that time need to be installed from CPAN. distributions on CPAN which require these modules will need to list them as prerequisites.

the core versions of these modules will now issue deprecated-category warnings to alert you to this fact. to silence these deprecation warnings, install the modules in question from CPAN.

note that these are (with rare exceptions) fine modules that you're encouraged to continue to use. their disinclusion from core primarily hinges on their necessity to bootstrapping a fully functional, CPAN-capable Perl installation โ€” not usually on concerns over their design. ๐Ÿซถ

  • B::Debug
  • Locale::Codes and its associated Country, Currency and Language modules

โšก Performance Enhancements โšก

this is the section where perl just shows off. ๐Ÿ’…

  • the start up overhead for creating regular expression patterns with Unicode properties (\p{...}) has been greatly reduced in most cases. โœจ
  • many string concatenation expressions are now considerably faster, thanks to the internal introduction of a multiconcat opcode which combines multiple concatenations โ€” and optionally a = or .= โ€” into a single action. for example, apart from retrieving $s, $a and $b, this whole expression is now handled as a single op:
$s .= "a=$a b=$b\n"

as a special case, if the LHS of an assignment is a lexical variable or my $s, the op itself handles retrieving the lexical variable, which is faster.

in general, the more the expression includes a mix of constant strings and variable expressions, the longer the expression, and the more it mixes together non-utf8 and utf8 strings, the more marked the performance improvement. for example on a x86_64 system, this code has been benchmarked running four times faster:

my $s;
my $a = "ab\x{100}cde";
my $b = "fghij";
my $c = "\x{101}klmn";

for my $i (1..10_000_000) {
    $s = "\x{100}wxyz";
    $s .= "foo=$a bar=$b baz=$c";
}

in addition, sprintf expressions which have a constant format containing only %s and %% format elements, and which have a fixed number of arguments, are now also optimised into a multiconcat op. ๐Ÿ”ฅ

  • the ref() builtin is now much faster in boolean context, since it no longer bothers to construct a temporary string like Foo=ARRAY(0x134af48). bye girl ๐Ÿ‘‹
  • keys() in void and scalar contexts is now more efficient.
  • the common idiom of comparing the result of index() with -1 is now specifically optimised, e.g.
if (index(...) != -1) { ... }
  • for() loops and similar constructs are now more efficient in most cases.
  • File::Glob has been modified to remove unnecessary backtracking and recursion, thanks to Russ Cox. see https://research.swtch.com/glob for more details.
  • the XS-level SvTRUE() API function is now more efficient.
  • various integer-returning ops are now more efficient in scalar/boolean context.
  • slightly improved performance when parsing stash names. [GH #15689] https://github.com/Perl/perl5/issues/15689
  • calls to require for an already loaded module are now slightly faster. [GH #16175] https://github.com/Perl/perl5/issues/16175
  • the performance of pattern matching [[:ascii:]] and [[:^ascii:]] has been improved significantly โ€” except on EBCDIC platforms.
  • various optimizations have been applied to matching regular expression patterns, so under the right circumstances, significant performance gains may be noticed. but in an application with many varied patterns, little overall improvement likely will be seen. (honesty, we love to see it.)
  • other optimizations have been applied to UTF-8 handling, but these are not typically a major factor in most applications.

๐Ÿงฉ Modules and Pragmata ๐Ÿงฉ

key highlights in this release across several modules:

๐Ÿ—‘๏ธ Removal of use vars ๐Ÿ—‘๏ธ

the usage of use vars has been discouraged since the introduction of our in Perl 5.6.0. where possible the usage of this pragma has now been removed from the Perl source code.

this had a slight effect (for the better) on the output of WARNING_BITS in B::Deparse. glow-up fr fr ๐Ÿ’…

๐Ÿฆ‹ Use of DynaLoader changed to XSLoader in many modules ๐Ÿฆ‹

Okay so bestie, real talk: XSLoader is giving modern main-character energy, and most modules already require perl 5.6 or greater, so switching from DynaLoader to XSLoader means literally no functionality is lost. Periodt. ๐Ÿ’… In some cases, we've also made changes to the local implementation that may not be reflected in the version on CPAN, because we wanted to keep more backwards compatibility. No cap.

๐Ÿ’– Updated Modules and Pragmata ๐Ÿ’–

  • Archive::Tar โ€” upgraded from version 2.24 to 2.30. โœจ
  • arybase โ€” upgraded from version 0.12 to 0.15. ๐Ÿ’–
  • Attribute::Handlers โ€” upgraded from version 0.99 to 1.01. ๐ŸŽ€
  • attributes โ€” upgraded from version 0.29 to 0.33. ๐Ÿฆ‹
  • B โ€” upgraded from version 1.68 to 1.74. ๐ŸŒธ
  • B::Concise โ€” upgraded from version 0.999 to 1.003. ๐Ÿ’…
  • B::Debug โ€” upgraded from version 1.24 to 1.26. ๐Ÿ’€
    • NOTE: B::Debug is deprecated and may be removed from a future version of Perl. ๐Ÿ˜ญ
  • B::Deparse โ€” upgraded from version 1.40 to 1.48. ๐Ÿ”ฅ
    • It includes many bug fixes, and in particular, it now deparses variable attributes correctly:
my $x :foo;  # used to deparse as
             # 'attributes'->import('main', \$x, 'foo'), my $x;
  • base โ€” upgraded from version 2.25 to 2.27. ๐ŸŒˆ
  • bignum โ€” upgraded from version 0.47 to 0.49. โญ
  • blib โ€” upgraded from version 1.06 to 1.07. ๐Ÿซถ
  • bytes โ€” upgraded from version 1.05 to 1.06. ๐Ÿงš
  • Carp โ€” upgraded from version 1.42 to 1.50. ๐Ÿ’œ
    • If a package on the call stack contains a constant named "ISA", Carp no longer throws a "Not a GLOB reference" error. ๐Ÿ‘‘
    • Carp, when generating stack traces, now attempts to work around longstanding bugs resulting from Perl's non-reference-counted stack. [GH #9282] <https://github.com/Perl/perl5/issues/9282>
    • Carp has been modified to avoid assuming that objects cannot be overloaded without the overload module loaded (this can happen with objects created by XS modules). Previously, infinite recursion would result if an XS-defined overload method itself called Carp. [GH #16407] <https://github.com/Perl/perl5/issues/16407>
    • Carp now avoids using "overload::StrVal", partly because older versions of overload (included with perl 5.14 and earlier) load Scalar::Util at run time, which will fail if Carp has been invoked after a syntax error. ๐Ÿ˜ญ
  • charnames โ€” upgraded from version 1.44 to 1.45. ๐Ÿ“
  • Compress::Raw::Zlib โ€” upgraded from version 2.074 to 2.076. ๐Ÿ”ฅ
    • This addresses a security vulnerability in older versions of the 'zlib' library (which is bundled with Compress-Raw-Zlib). ๐Ÿ›ก๏ธ
  • Config::Extensions โ€” upgraded from version 0.01 to 0.02. โœจ
  • Config::Perl::V โ€” upgraded from version 0.28 to 0.29. ๐Ÿ’–
  • CPAN โ€” upgraded from version 2.18 to 2.20. ๐ŸŽ€
  • Data::Dumper โ€” upgraded from version 2.167 to 2.170. ๐Ÿฆ‹
  • Devel::Peek โ€” upgraded from version 1.26 to 1.27. ๐ŸŒธ
  • Devel::PPPort โ€” upgraded from version 3.35 to 3.40. ๐ŸŒˆ
    • Devel::PPPort has moved from cpan-first to perl-first maintenance. โญ
    • Primary responsibility for the code in Devel::PPPort has moved into core perl. In a practical sense there should be no change except that hopefully it will stay more up to date with changes made to symbols in perl, rather than needing to be updated after the fact. ๐Ÿ‘‘
  • Digest::SHA โ€” upgraded from version 5.96 to 6.01. ๐Ÿ’œ
  • DirHandle โ€” upgraded from version 1.04 to 1.05. ๐Ÿซถ
  • DynaLoader โ€” upgraded from version 1.42 to 1.45. ๐Ÿงš
  • Encode โ€” upgraded from version 2.88 to 2.97. ๐Ÿ”ฅ
  • encoding โ€” upgraded from version 2.19 to 2.22. โœจ
  • Errno โ€” upgraded from version 1.28 to 1.29. ๐Ÿ’–
  • experimental โ€” upgraded from version 0.016 to 0.019. ๐ŸŽ€
  • Exporter โ€” upgraded from version 5.72 to 5.73. ๐Ÿฆ‹
  • ExtUtils::CBuilder โ€” upgraded from version 0.280225 to 0.280230. ๐ŸŒธ
  • ExtUtils::Constant โ€” upgraded from version 0.23 to 0.25. ๐Ÿ’…
  • ExtUtils::Embed โ€” upgraded from version 1.34 to 1.35. ๐ŸŒˆ
  • ExtUtils::Install โ€” upgraded from version 2.04 to 2.14. โญ
  • ExtUtils::MakeMaker โ€” upgraded from version 7.24 to 7.34. ๐Ÿ’œ
  • ExtUtils::Miniperl โ€” upgraded from version 1.06 to 1.08. ๐Ÿซถ
  • ExtUtils::ParseXS โ€” upgraded from version 3.34 to 3.39. ๐Ÿงš
  • ExtUtils::Typemaps โ€” upgraded from version 3.34 to 3.38. ๐Ÿ“
  • ExtUtils::XSSymSet โ€” upgraded from version 1.3 to 1.4. ๐Ÿ”ฅ
  • feature โ€” upgraded from version 1.47 to 1.52. โœจ
  • fields โ€” upgraded from version 2.23 to 2.24. ๐Ÿ’–
  • File::Copy โ€” upgraded from version 2.32 to 2.33. ๐ŸŽ€
  • File::Fetch โ€” upgraded from version 0.52 to 0.56. ๐ŸŒธ
  • File::Glob โ€” upgraded from version 1.28 to 1.31. ๐Ÿ’…
  • File::Path โ€” upgraded from version 2.12_01 to 2.15. ๐ŸŒˆ
  • File::Spec and Cwd โ€” upgraded from version 3.67 to 3.74. โญ
  • File::stat โ€” upgraded from version 1.07 to 1.08. ๐Ÿ’œ
  • FileCache โ€” upgraded from version 1.09 to 1.10. ๐Ÿซถ
  • Filter::Simple โ€” upgraded from version 0.93 to 0.95. ๐Ÿงš
  • Filter::Util::Call โ€” upgraded from version 1.55 to 1.58. ๐Ÿ“
  • GDBM_File โ€” upgraded from version 1.15 to 1.17. ๐Ÿ”ฅ
  • Getopt::Long โ€” upgraded from version 2.49 to 2.5. ๐Ÿ’–
  • Hash::Util::FieldHash โ€” upgraded from version 1.19 to 1.20. ๐ŸŽ€
  • I18N::Langinfo โ€” upgraded from version 0.13 to 0.17. ๐Ÿฆ‹
    • This module is now available on all platforms, emulating the system nl_langinfo(3) on systems that lack it. Some caveats apply, as detailed in its documentation, the most severe being that, except for MS Windows, the "CODESET" item is not implemented on those systems, always returning "". ๐Ÿ˜ญ
    • It now sets the UTF-8 flag in its returned scalar if the string contains legal non-ASCII UTF-8, and the locale is UTF-8 [GH #15131] <https://github.com/Perl/perl5/issues/15131>. ๐ŸŒธ
    • This update also fixes a bug in which the underlying locale was ignored for the "RADIXCHAR" (always was returned as a dot) and the "THOUSEP" (always empty). Now the locale-appropriate values are returned. ๐Ÿ’…
  • I18N::LangTags โ€” upgraded from version 0.42 to 0.43. ๐ŸŒˆ
  • if โ€” upgraded from version 0.0606 to 0.0608. โญ
  • IO โ€” upgraded from version 1.38 to 1.39. ๐Ÿ’œ
  • IO::Socket::IP โ€” upgraded from version 0.38 to 0.39. ๐Ÿซถ
  • IPC::Cmd โ€” upgraded from version 0.96 to 1.00. ๐Ÿงš
  • JSON::PP โ€” upgraded from version 2.27400_02 to 2.97001. ๐Ÿ“
  • The "libnet" distribution โ€” upgraded from version 3.10 to 3.11. ๐Ÿ”ฅ
  • List::Util โ€” upgraded from version 1.46_02 to 1.49. โœจ
  • Locale::Codes โ€” upgraded from version 3.42 to 3.56. ๐Ÿ’–
    • NOTE: Locale::Codes scheduled to be removed from core in Perl 5.30. ๐Ÿ˜ญ
  • Locale::Maketext โ€” upgraded from version 1.28 to 1.29. ๐ŸŽ€
  • Math::BigInt โ€” upgraded from version 1.999806 to 1.999811. ๐Ÿฆ‹
  • Math::BigInt::FastCalc โ€” upgraded from version 0.5005 to 0.5006. ๐ŸŒธ
  • Math::BigRat โ€” upgraded from version 0.2611 to 0.2613. ๐Ÿ’…
  • Module::CoreList โ€” upgraded from version 5.20170530 to 5.20180622. ๐ŸŒˆ
  • mro โ€” upgraded from version 1.20 to 1.22. โญ
  • Net::Ping โ€” upgraded from version 2.55 to 2.62. ๐Ÿ’œ
  • NEXT โ€” upgraded from version 0.67 to 0.67_01. ๐Ÿซถ
  • ODBM_File โ€” upgraded from version 1.14 to 1.15. ๐Ÿงš
  • Opcode โ€” upgraded from version 1.39 to 1.43. ๐Ÿ“
  • overload โ€” upgraded from version 1.28 to 1.30. ๐Ÿ”ฅ
  • PerlIO::encoding โ€” upgraded from version 0.25 to 0.26. โœจ
  • PerlIO::scalar โ€” upgraded from version 0.26 to 0.29. ๐Ÿ’–
  • PerlIO::via โ€” upgraded from version 0.16 to 0.17. ๐ŸŽ€
  • Pod::Functions โ€” upgraded from version 1.11 to 1.13. ๐Ÿฆ‹
  • Pod::Html โ€” upgraded from version 1.2202 to 1.24. ๐ŸŒธ
    • A title for the HTML document will now be automatically generated by default from a "NAME" section in the POD document, as it used to be before the module was rewritten to use Pod::Simple::XHTML to do the core of its job [GH #11954] <https://github.com/Perl/perl5/issues/11954>. ๐Ÿ’…
  • Pod::Perldoc โ€” upgraded from version 3.28 to 3.2801. ๐ŸŒˆ
  • The "podlators" distribution โ€” upgraded from version 4.09 to 4.10. โญ
    • Man page references and function names now follow the Linux man page formatting standards, instead of the Solaris standard. ๐Ÿ‘‘
  • POSIX โ€” upgraded from version 1.76 to 1.84. ๐Ÿ’œ
    • Some more cautions were added about using locale-specific functions in threaded applications. ๐Ÿซถ
  • re โ€” upgraded from version 0.34 to 0.36. ๐Ÿงš
  • Scalar::Util โ€” upgraded from version 1.46_02 to 1.50. ๐Ÿ“
  • SelfLoader โ€” upgraded from version 1.23 to 1.25. ๐Ÿ”ฅ
  • Socket โ€” upgraded from version 2.020_03 to 2.027. โœจ
  • sort โ€” upgraded from version 2.02 to 2.04. ๐Ÿ’–
  • Storable โ€” upgraded from version 2.62 to 3.08. ๐ŸŽ€
  • Sub::Util โ€” upgraded from version 1.48 to 1.49. ๐Ÿฆ‹
  • subs โ€” upgraded from version 1.02 to 1.03. ๐ŸŒธ
  • Sys::Hostname โ€” upgraded from version 1.20 to 1.22. ๐Ÿ’…
  • Term::ReadLine โ€” upgraded from version 1.16 to 1.17. ๐ŸŒˆ
  • Test โ€” upgraded from version 1.30 to 1.31. โญ
  • Test::Harness โ€” upgraded from version 3.38 to 3.42. ๐Ÿ’œ
  • Test::Simple โ€” upgraded from version 1.302073 to 1.302133. ๐Ÿซถ
  • threads โ€” upgraded from version 2.15 to 2.22. ๐Ÿงš
  • the docs now actually explain what goes sideways when you return values from threads, and they stopped nagging you about creating threads inside BEGIN blocks. [GH #11563] <https://github.com/Perl/perl5/issues/11563>
  • threads::shared โ€” glow-up from version 1.56 to 1.58. โœจ
  • Tie::Array โ€” glow-up from version 1.06 to 1.07.
  • Tie::StdHandle โ€” glow-up from version 4.4 to 4.5.
  • Time::gmtime โ€” glow-up from version 1.03 to 1.04.
  • Time::HiRes โ€” glow-up from version 1.9741 to 1.9759.
  • Time::localtime โ€” glow-up from version 1.02 to 1.03.
  • Time::Piece โ€” glow-up from version 1.31 to 1.3204.
  • Unicode::Collate โ€” glow-up from version 1.19 to 1.25.
  • Unicode::Normalize โ€” glow-up from version 1.25 to 1.26.
  • Unicode::UCD โ€” glow-up from version 0.68 to 0.70.
    • the function num now takes an optional parameter, and that lil guy is there to help you figure out error returns. ๐Ÿ•ต๏ธ
  • User::grent โ€” glow-up from version 1.01 to 1.02.
  • User::pwent โ€” glow-up from version 1.00 to 1.01.
  • utf8 โ€” glow-up from version 1.19 to 1.21.
  • vars โ€” glow-up from version 1.03 to 1.04.
  • version โ€” glow-up from version 0.9917 to 0.9923.
  • VMS::DCLsym โ€” glow-up from version 1.08 to 1.09.
  • VMS::Stdio โ€” glow-up from version 2.41 to 2.44.
  • warnings โ€” glow-up from version 1.37 to 1.42.
  • XS::Typemap โ€” glow-up from version 0.15 to 0.16.
  • XSLoader โ€” glow-up from version 0.27 to 0.30.
    • the docs now show you how to use __PACKAGE__, plus the direct object syntax for example DynaLoader usage. [GH #16190] <https://github.com/Perl/perl5/issues/16190>
    • platforms that use mod2fname to edit the names of loadable libraries now go looking for bootstrap (.bs) files under the correct, non-edited name. so like, the right one. finally. ๐Ÿ’…

๐Ÿ—‘๏ธ Removed Modules and Pragmata ๐Ÿ—‘๏ธ

  • the VMS::stdio compatibility shim has been removed. gone. bye bestie. ๐Ÿ‘‹

๐Ÿ“š Documentation ๐Ÿ“š

โœจ Changes to Existing Documentation โœจ

we tried our best to update the docs so they match all the changes listed in this document. if you spot one we missed, send an email to perlbug@perl.org <mailto:perlbug@perl.org> โ€” we're literally begging you, it's giving community service. ๐Ÿซถ

and also, these selected changes happened too:

perlapi

  • the API functions perl_parse(), perl_run(), and perl_destruct() are now documented comprehensively, whereas before the only "documentation" was a reference pointing you at the perlembed tutorial. glow up. โœจ
  • the documentation of newGIVENOP() got belatedly updated to account for the removal of lexical $_.
  • the API functions newCONSTSUB() and newCONSTSUB_flags() are documented much more comprehensively than before.

perldata

  • the section "Truth and Falsehood" in perlsyn has been moved into perldata. it found its real home. ๐Ÿก

perldebguts

perldiag

  • "Variable length lookbehind not implemented in regex m/%s/" in perldiag

this now gives you more ideas for workarounds around the issue introduced back in Perl 5.18 (which, btw, was never documented explicitly in its perldelta) โ€” the whole thing where some Unicode /i rules cause a few sequences such as

(?<!st)

to be considered variable length, and hence disallowed. ๐Ÿ˜ญ

  • "Use of state $_ is experimental" in perldiag

this entry has been removed, because the experimental support for this construct was removed in perl 5.24.0. rip to that era.

  • the diagnostic "Initialization of state variables in list context currently forbidden" has changed to "Initialization of state variables in list currently forbidden", because list-context initialization of single aggregate state variables is now permitted. see how one lil word makes everything legal. ๐Ÿ‘‘

perlembed

  • the examples in perlembed have been made more portable in the way they exit, and the example that gets an exit code from the embedded Perl interpreter now gets it from the right place. also, the examples that pass a constructed argv to Perl now show the mandatory null argv[argc].
  • an example in perlembed used the string value of ERRSV as a format string when calling croak(). if that string contains format codes such as %s this could crash the program. ๐Ÿ’€

this has been changed to a call to croak_sv().

an alternative could have been to supply a trivial format string:

croak("%s", SvPV_nolen(ERRSV));

or as a special case for ERRSV simply:

croak(NULL);

perlfunc

  • there's now a note that warnings generated by built-in functions are documented in perldiag and warnings. [GH #12642] <https://github.com/Perl/perl5/issues/12642>
  • the documentation for the exists operator no longer says that autovivification behaviour "may be fixed in a future release". we've decided we're not going to change the default behaviour. that's the vibe, permanently. [GH #15231] <https://github.com/Perl/perl5/issues/15231>
  • a couple of small details in the documentation for the bless operator have been clarified. [GH #14684] <https://github.com/Perl/perl5/issues/14684>
  • the description of @INC hooks in the documentation for require has been corrected to say that filter subroutines receive a useless first argument. yeah it's useless, but it's there, so deal. [GH #12569] <https://github.com/Perl/perl5/issues/12569>
  • the documentation of ref has been rewritten for clarity. it's giving readable now.
  • the documentation of use now explains what syntactically qualifies as a version number for its module version checking feature.
  • the documentation of warn has been updated to reflect that since Perl 5.14 it has treated complex exception objects in a manner equivalent to die. [GH #13641] <https://github.com/Perl/perl5/issues/13641>
  • the documentation of die and warn has been revised for clarity.
  • the documentation of each has been improved, with a slightly more explicit description of the sharing of iterator state, and with caveats regarding the fragility of while-each loops. bestie those loops are fragile. [GH #16334] <https://github.com/Perl/perl5/issues/16334>
  • clarification to require was added to explain the differences between
require Foo::Bar;
require "Foo/Bar.pm";

perlgit

  • the precise rules for identifying "smoke-me" branches are now stated. no more guessing, iykyk. ๐Ÿ”ฅ

perlguts

  • the section on reference counting in perlguts has been heavily revised, to describe references in the way a programmer needs to think about them rather than in terms of the physical data structures. main character reframing. ๐Ÿ‘‘
  • improved documentation related to UTF-8 multibytes.

perlintern

  • the internal functions newXS_len_flags() and newATTRSUB_x() are now documented. they're on the map now. ๐Ÿ—บ๏ธ

perlobj

perlop

perlrequick

  • clarifications on metacharacters and character classes

perlretut

  • clarify metacharacters.

perlrun

perlsec

  • the documentation about set-id scripts has been updated and revised. [GH #10289] <https://github.com/Perl/perl5/issues/10289>
  • a section about using sudo to run Perl scripts has been added. yes queen, sudo. ๐Ÿ’…

perlsyn

  • the section "Truth and Falsehood" in perlsyn has been removed from that document, where it didn't belong, and merged into the existing paragraph on the same topic in perldata. it was in the wrong house fr fr. ๐Ÿ 
  • the means to disambiguate between code blocks and hash constructors, already documented in perlref, are now documented in perlsyn too. [GH #15918] <https://github.com/Perl/perl5/issues/15918>

perluniprops

  • perluniprops has been updated to note that \p{Word} now includes code points matching the \p{Join_Control} property. the change to the property was made in Perl 5.18, but not documented until now. there are currently only two code points that match this property: U+200C (ZERO WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER). just two lil guys. ๐Ÿฅน
  • for each binary table or property, the documentation now includes which characters in the range \x00-\xFF it matches, as well as a list of the first few ranges of code points matched above that.

perlvar

  • the entry for $+ in perlvar has been expanded upon to describe handling of multiply-named capturing groups. โœจ

perlfunc, perlop, perlsyn

  • in various places, improved the documentation of the special cases in the condition expression of a while loop, such as implicit defined and assignment to $_. [GH #16334] <https://github.com/Perl/perl5/issues/16334>

โœจ Diagnostics โœจ

Okay bestie, this is the part where Perl gets โœจopinionatedโœจ about what it yells at you. Below are the additions and changes to diagnostic output โ€” warnings, fatal errors, all of it. For the full tea on every single diagnostic message, go check perldiag. ๐Ÿซถ


๐Ÿ’– New Diagnostics ๐Ÿ’–

๐Ÿšจ New Errors ๐Ÿšจ

  • Can't "goto" into a "given" block

(F) Somebody ran a goto statement trying to jump into the middle of a given block. Bestie. No. You literally can't get there from here. See "goto" in perlfunc.

  • Can't "goto" into a binary or list expression

Using goto to jump into the parameter of a binary or list operator is now banned, because it was causing crashes and stack corruption. Not cute, not slay. [GH #15914] <https://github.com/Perl/perl5/issues/15914>

The one exception that's still allowed: you may only enter the first argument of an operator that takes a fixed number of arguments, since that's the one case that won't cause stack corruption. [GH #16415] <https://github.com/Perl/perl5/issues/16415>

โš ๏ธ New Warnings โš ๏ธ

  • Old package separator used in string

(W syntax) You used the old package separator, ', inside a variable name in a double-quoted string; e.g. "In $name's house". This is equivalent to "In $name::s house". If you meant the former, put a backslash before the apostrophe: "In $name\'s house".

  • "Locale '%s' contains (at least) the following characters which have unexpected meanings: %s The Perl program will use the expected meanings" in perldiag

Yeah, that whole thing. It's a diagnostic, it exists, go read it in perldiag. ๐Ÿ’…


๐Ÿ› ๏ธ Changes to Existing Diagnostics ๐Ÿ› ๏ธ

  • A false-positive warning that used to pop off whenever you used a numerically-quantified sub-pattern in a recursive regex? Silenced. No more lying to you. [GH #16106] <https://github.com/Perl/perl5/issues/16106>
  • The warning about a useless use of a concatenation operator in void context is now generated for expressions with multiple concatenations, like "$a.$b.$c". It used to mistakenly not warn about those, which was lowkey a bug. [GH #3990] <https://github.com/Perl/perl5/issues/3990>
  • Warnings that a variable or subroutine "masks earlier declaration in same ...", or that an our variable has been redeclared, have moved to a new warnings category called shadow. They used to live in category misc. New home, same energy. ๐Ÿก
  • The deprecation warning from Sys::Hostname::hostname() saying it doesn't accept arguments now also tells you the Perl version in which the warning will get upgraded to an error. So you know exactly when the vibes change. [GH #14662] <https://github.com/Perl/perl5/issues/14662>
  • The perldiag entry for the error about a set-id script has been expanded to make it crystal clear that the error is reporting a specific security vulnerability, and to advise how to fix it. ๐Ÿšจ
  • The "Unable to flush stdout" error message was missing a trailing newline. Fixed. [debian #875361]

๐Ÿ”ง Utility Changes ๐Ÿ”ง

๐Ÿž perlbug

  • --help and --version options have been added. Finally. ๐Ÿ‘‘

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

  • C89 requirement

Perl has been documented as requiring a C89 compiler to build since October 1998. A bunch of simplifications have now been made to Perl's internals so it relies on the features specified by the C89 standard. We believe this internal change hasn't altered the set of platforms that Perl builds on, but please report a bug if Perl now has new problems building on your platform. ๐Ÿ™

  • On GCC, -Werror=pointer-arith is now enabled by default, which disallows arithmetic on void and function pointers.
  • Where an HTML version of the documentation is installed, the HTML documents now use relative links to refer to each other. Links from the index page of perlipc to the individual section documents are now correct. [GH #11941] <https://github.com/Perl/perl5/issues/11941>
  • lib/unicore/mktables now correctly canonicalizes the names of the dependencies stored in the files it generates.

regen/mk_invlists.pl, unlike the other regen/*.pl scripts, used $0 to name itself in the dependencies stored in the files it generates. It now uses a literal so that the path stored in the generated files doesn't depend on how regen/mk_invlists.pl is invoked.

This lack of canonical names could cause test failures in t/porting/regen.t. [GH #16446] <https://github.com/Perl/perl5/issues/16446>

  • New probes
HAS_BUILTIN_ADD_OVERFLOW
HAS_BUILTIN_MUL_OVERFLOW
HAS_BUILTIN_SUB_OVERFLOW
HAS_THREAD_SAFE_NL_LANGINFO_L
HAS_LOCALECONV_L
HAS_MBRLEN
HAS_MBRTOWC
HAS_MEMRCHR
HAS_NANOSLEEP
HAS_STRNLEN
HAS_STRTOLD_L
I_WCHAR

๐Ÿงช Testing ๐Ÿงช

  • Testing of the XS-APItest directory is now done in parallel, where applicable. Multitasking icon behavior. ๐Ÿ’…
  • Perl now includes a default .travis.yml file for Travis CI testing on GitHub mirrors. [GH #14558] <https://github.com/Perl/perl5/issues/14558>
  • The watchdog timer count in re/pat_psycho.t can now be overridden.

This test can take a long time to run, so there's a timer keeping it in check (currently, 5 minutes). This commit adds checking the environment variable PERL_TEST_TIME_OUT_FACTOR; if set, the timeout setting is multiplied by its value.


๐Ÿ“ฆ Packaging ๐Ÿ“ฆ

For the past few years we've been releasing perl using three different archive formats: bzip (.bz2), LZMA2 (.xz) and gzip (.gz). Since xz compresses better and decompresses faster, and gzip is more compatible and uses less memory, we have dropped the .bz2 archive format with this release. ๐Ÿซก

If this poses a problem, do let us know; see "Reporting Bugs", below.

๐ŸŒ Platform Support ๐ŸŒ

๐Ÿชฆ Discontinued Platforms ๐Ÿชฆ

PowerUX / Power MAX OS

Compiler hints and other support for these apparently long-defunct platforms has been removed. RIP bozo. ๐Ÿชฆ

๐Ÿ“ Platform-Specific Notes ๐Ÿ“

CentOS

Compilation on CentOS 5 is now fixed. ๐Ÿฉน

Cygwin

A build with the quadmath library can now be done on Cygwin.

Darwin

Perl now correctly uses reentrant functions, like "asctime_r", on versions of Darwin that have support for them.

FreeBSD

FreeBSD's /usr/share/mk/sys.mk specifies -O2 for architectures other than ARM and MIPS. By default, perl is now compiled with the same optimization levels. Matching energy. โœจ

VMS

Several fix-ups for configure.com, marking function VMS has (or doesn't have).

CRTL features can now be set by embedders before invoking Perl by using the "decc$feature_set" and "decc$feature_set_value" functions. Previously any attempt to set features after image initialization were ignored. ๐Ÿ’€

Windows

  • Support for compiling perl on Windows using Microsoft Visual Studio 2017 (containing Visual C++ 14.1) has been added. ๐ŸŽ‰
  • Visual C++ compiler version detection has been improved to work on non-English language systems.
  • We now set $Config{libpth} correctly for 64-bit builds using Visual C++ versions earlier than 14.1.

โœจ INTERNAL CHANGES โœจ

okay bestie, this is the backstage tour ๐Ÿ’… nobody claps for this part but it's literally where the whole show happens.

  • the compiler got a whole new optimisation phase, it's called optimize_optree(), and what it does is a top-down scan of a complete optree right before the peephole optimiser does its thing. heads up though: this phase is not currently hookable. no sneaking in, sorry ๐Ÿซถ
  • there's a new op in town: OP_MULTICONCAT ๐ŸŽ€ at optimize_optree() time, a chain of OP_CONCAT and OP_CONST ops โ€” plus optionally an OP_STRINGIFY and/or OP_SASSIGN hanging out with them โ€” get smooshed together into one single OP_MULTICONCAT op. the op is of type UNOP_AUX, and the aux array holds the argument count, plus a pointer to a constant string and a set of segment lengths. for example with:
my $x = "foo=$foo, bar=$bar\n";

the constant string would be "foo=, bar=\n" and the segment lengths would be (4,6,1). and if the string contains characters such as "\x80", whose representation changes under utf8, then two sets of strings plus lengths get precomputed and stored. icon behaviour honestly โœจ

  • direct access to PL_keyword_plugin is NOT safe in the presence of multithreading ๐Ÿšจ so there's a new wrap_keyword_plugin function, which lets XS modules safely define custom keywords even when loaded from a thread โ€” analogous to PL_check / wrap_op_checker. slay.
  • the PL_statbuf interpreter variable? removed. gone. bye ๐Ÿ’€
  • the deprecated function to_utf8_case(), which you could reach from XS code, has also been removed. rip bozo ๐Ÿชฆ
  • new function alert ๐Ÿšจ is_utf8_invariant_string_loc() is here! it's like is_utf8_invariant_string() but it takes an extra pointer parameter, and into that pointer gets stored the location of the first variant character โ€” if any are found, that is.
  • say hi to Perl_langinfo() ๐Ÿซถ it's an (almost) drop-in replacement for the system nl_langinfo(3), except it works on platforms that lack that function entirely, it's more thread-safe, and it hides some gotchas with locale handling from whoever's calling it. code that uses this needn't use localeconv(3) (and get hit by those gotchas) just to find the decimal point, thousands separator, or currency symbol. see "Perl_langinfo" in perlapi for the deets ๐Ÿ“–
  • new API function sv_rvunweaken() has been added, complementing sv_rvweaken(). the implementation was taken from "unweaken" in Scalar::Util. cute crossover episode ๐Ÿ’–
  • there's a new flag, SORTf_UNSTABLE, and the tea is: this will allow a future commit to make mergesort unstable when the user specifies 'no sort stable', because it's been decided that mergesort should remain stable by default. periodt.
  • ๐ŸŽ‰ XS modules can now automatically get reentrant versions of system functions on threaded perls. by adding
#define PERL_REENTRANT

near the beginning of an XS file, it'll be compiled so that whatever reentrant functions perl knows about on that system will automatically and invisibly be used instead of the plain, non-reentrant versions. for example, if you write getpwnam() in your code, on a system that has getpwnam_r(), all calls to the former get translated invisibly into the latter. this does not happen except on threaded perls, because they aren't needed otherwise. and be aware bestie: which functions have reentrant versions varies from system to system ๐Ÿ™ˆ

  • the PERL_NO_OP_PARENT build define is no longer supported โ€” which means perl is now always built with PERL_OP_PARENT enabled. no more choosing. it's giving "one true path" energy ๐Ÿ’…
  • the format and the content of the non-utf8 transliteration table attached to the op_pv field of OP_TRANS/OP_TRANSR ops has changed. it's now a struct OPtrans_map. glow-up โœจ
  • a new compiler #define, dTHX_DEBUGGING. has been added. (yes that period is in the original, we don't ask questions ๐Ÿ˜ญ) it's useful for XS or C code that only needs the thread context because their debugging statements โ€” the ones that get compiled only under -DDEBUGGING โ€” need one.
  • new API function Perl_setlocale in perlapi has been added ๐Ÿ‘‘
  • sync_locale in perlapi has been revised so it now returns a boolean telling you whether the system was using the global locale or not.
  • ooh this one's fun: a new kind of magic scalar called a "nonelem" scalar has been introduced ๐ŸŒˆ it's stored in an array to denote a non-existent element, whenever such an element is accessed in a potential lvalue context. it replaces the existing "defelem" (deferred element) magic wherever this is possible, and it's significantly more efficient. which means some_sub($sparse_array[$nonelem]) no longer has to create a new magic defelem scalar every single time, as long as the element is within the array. it partially fixes the rare bug of deferred elements getting out of synch with their arrays when the array is shifted or unshifted. [GH #16364] <https://github.com/Perl/perl5/issues/16364>

๐Ÿ› SELECTED BUG FIXES ๐Ÿ›

bestie, this is the "we fixed it" section and honestly? healing era ๐Ÿซถ

  • list assignment (aassign) could, in some rare cases, allocate an entry on the mortals stack and leave that entry uninitialized โ€” which could lead to possible crashes ๐Ÿ˜ญ fixed now. [GH #16017] <https://github.com/Perl/perl5/issues/16017>
  • trying to apply an attribute to an "our" variable where a function of that name already exists could result in a NULL pointer being supplied where an SV was expected, and crash perl ๐Ÿ’€ fixed. [perl #131597] <https://rt.perl.org/Ticket/Display.html?id=131597>
  • "split ' '" now correctly handles the argument being split when it's in the scope of the "unicode_strings" feature โœจ previously, when a string using the single-byte internal representation contained characters that are whitespace by Unicode rules but not by ASCII rules, it treated those characters as part of fields rather than as field separators. rude. [GH #15904] <https://github.com/Perl/perl5/issues/15904>
  • several built-in functions previously had bugs that could cause them to write to the internal stack without allocating room for the item being written. in rare situations, this could have led to a crash. all fixed now, and if any similar bugs get introduced in future, they'll be detected automatically in debugging builds ๐Ÿ‘€

these internal stack usage checks are also done by the "entersub" operator when calling XSUBs. which means we can now report which XSUB failed to allocate enough stack space. accountability era ๐Ÿ’… [GH #16126] <https://github.com/Perl/perl5/issues/16126>

  • using a symbolic ref with postderef syntax as the key in a hash lookup was yielding an assertion failure on debugging builds. [GH #16029] <https://github.com/Perl/perl5/issues/16029>
  • array and hash variables whose names begin with a caret now admit indexing inside their curlies when interpolated into strings โ€” as in "${^CAPTURE[0]}" to index "@{^CAPTURE}". yes queen, indexing works now ๐Ÿ‘‘ [GH #16050] <https://github.com/Perl/perl5/issues/16050>
  • fetching the name of a glob that was previously UTF-8 but wasn't any longer would return that name flagged as UTF-8. not anymore. [GH #15971] <https://github.com/Perl/perl5/issues/15971>
  • the perl sprintf() function (via the underlying C function Perl_sv_vcatpvfn_flags()) has been heavily reworked to fix many minor bugs ๐Ÿ”ฅ including the integer wrapping of large width and precision specifiers, and potential buffer overruns. it's also been made faster in many cases. ate and left no crumbs.
  • exiting from an "eval", whether normally or via an exception, now always frees temporary values (possibly calling destructors) before setting $@. for example:
sub DESTROY { eval { die "died in DESTROY"; } }
eval { bless []; };
# $@ used to be equal to "died in DESTROY" here; it's now "".

so if you were relying on that old behaviour... you weren't, bestie. nobody was ๐Ÿซถ

  • fixed a duplicate symbol failure with -flto -mieee-fp builds. pp.c defined "_LIB_VERSION" which -lieee already defines. [GH #16086] <https://github.com/Perl/perl5/issues/16086>
  • the tokenizer no longer consumes the exponent part of a floating point number if it's incomplete ๐Ÿ’… [GH #16073] <https://github.com/Perl/perl5/issues/16073>
  • on non-threaded builds, for "m/$null/" where $null is an empty string, it's no longer treated as if the /o flag was present just because the previous matching match operator included the /o flag. the rewriting used to implement this behavior could confuse the interpreter ๐Ÿ™ˆ this now matches the behaviour of threaded builds. [GH #14668] <https://github.com/Perl/perl5/issues/14668>
  • parsing a "sub" definition could cause a use after free if the "sub" keyword was followed by whitespace including newlines (and comments.) yikes. fixed. [GH #16097] <https://github.com/Perl/perl5/issues/16097>
  • the tokenizer now correctly adjusts a parse pointer when skipping whitespace in a "${identifier}" construct. [perl #131949] <https://rt.perl.org/Public/Bug/Display.html?id=131949>
  • accesses to "${^LAST_FH}" no longer assert after using any of a whole variety of I/O operations on a non-glob. [GH #15372] <https://github.com/Perl/perl5/issues/15372>
  • the XS-level Copy(), Move(), Zero() macros and their variants now assert if the pointers supplied are "NULL" ๐Ÿšจ ISO C considers supplying NULL pointers to the functions these macros are built upon as undefined behaviour โ€” even when their count parameters are zero. based on these assertions and the original bug report, three macro calls were made conditional. [GH #16079] <https://github.com/Perl/perl5/issues/16079> [GH #16112] <https://github.com/Perl/perl5/issues/16112>
  • only the "=" operator is permitted for defining defaults for parameters in subroutine signatures ๐ŸŽ€ previously, other assignment operators โ€” e.g. "+=" โ€” were also accidentally permitted. accidental slay, but still a bug. [GH #16084] <https://github.com/Perl/perl5/issues/16084>
  • package names are now always included in ":prototype" warnings ๐Ÿ‘‘ [perl #131833] <https://rt.perl.org/Public/Bug/Display.html?id=131833>
  • the "je_old_stack_hwm" field โ€” previously only found in the "jmpenv" structure on debugging builds โ€” has been added to non-debug builds as well. this fixes an issue with some CPAN modules caused by the size of this structure varying between debugging and non-debugging builds. [GH #16122] <https://github.com/Perl/perl5/issues/16122>
  • the arguments to the ninstr() macro are now correctly parenthesized. small thing. huge thing. ๐Ÿ’…
  • a NULL pointer dereference in the S_regmatch() function has been fixed. [perl #132017] <https://rt.perl.org/Public/Bug/Display.html?id=132017>
  • calling exec PROGRAM LIST with an empty "LIST" has been fixed. this should call execvp() with an empty "argv" array (containing only the terminating "NULL" pointer), but instead it was just returning false โ€” and not even setting $! ๐Ÿ˜ญ the audacity. [GH #16075] <https://github.com/Perl/perl5/issues/16075>
  • The gv_fetchmeth_sv C function was being a whole mess starting in Perl 5.22 โ€” when it tried to fetch a constant with a UTF-8 name and that constant sub was sitting in the stash as just a plain scalar reference instead of a full typeglob, it just... didn't work. That's fixed now. ๐Ÿ’…
  • Single-letter debugger commands followed by an argument that starts with punctuation โ€” think p$^V and x@ARGV โ€” work again bestie. They had been wrongly demanding a space between the command and the argument and honestly? rude. [GH #13342] https://github.com/Perl/perl5/issues/13342
  • splice now throws an exception (Modification of a read-only value attempted) when you try to modify a read-only array. Before, it was silently modifying it like a lil sneaky snake ๐Ÿ. The new behaviour matches what push and unshift already do, so it's giving consistency. [GH #15923] https://github.com/Perl/perl5/issues/15923
  • stat(), lstat(), and the file test operators now fail if you hand them a filename containing a nul character โ€” same way open() already fails. No more pretending, periodt.
  • stat(), lstat(), and file test operators now reliably set $! when they fail because you applied them to a closed or otherwise invalid file handle. You get the info you deserve. โœจ
  • File test operators for Unix permission bits that don't even exist on a given platform โ€” like -k (the sticky bit) on Windows โ€” now check that the file actually exists before handing back the blanket false result, and they yield the appropriate errors if the argument isn't referring to a file at all.
  • Fixed a 'read before buffer' overrun that happened when parsing a range starting with \N{} at the very beginning of the character set for the transliteration operator. [GH #16189] https://github.com/Perl/perl5/issues/16189
  • Fixed a leaked scalar when parsing an empty \N{} at compile-time. [GH #16189] https://github.com/Perl/perl5/issues/16189
  • Calling do $path on a directory or a block device now gives you a meaningful error code in $! instead of leaving you guessing. [GH #14841] https://github.com/Perl/perl5/issues/14841
  • Regexp substitution using an overloaded replacement value that provides a tainted stringification now correctly taints the resulting string. [GH #12495] https://github.com/Perl/perl5/issues/12495
  • Lexical sub declarations inside do blocks โ€” like do { my sub lex; 123 } โ€” could straight up corrupt the stack, erasing items that were already on the stack in the enclosing statement. Fixed, bestie. [GH #16243] https://github.com/Perl/perl5/issues/16243
  • pack and unpack can now handle repeat counts and lengths that go past two billion. Big numbers, big slay. [GH #13179] https://github.com/Perl/perl5/issues/13179
  • Digits past the radix point in octal and binary floating point literals now have the correct weight on platforms where a floating point significand doesn't fit into an integer type.
  • The canonical truth value no longer has a spurious special meaning as a callable subroutine. It used to be a magic placeholder for a missing import or unimport method, but now it's treated like any other string 1. [GH #14902] https://github.com/Perl/perl5/issues/14902
  • system now reduces its arguments to strings in the parent process, so any effects of stringifying them โ€” overload methods getting called, warnings getting emitted โ€” are visible in the way the program expects. [GH #13561] https://github.com/Perl/perl5/issues/13561
  • The readpipe() built-in function now checks at compile time that it has only one parameter expression, and puts it in scalar context โ€” which means it can't corrupt the stack at runtime anymore. [GH #2793] https://github.com/Perl/perl5/issues/2793
  • sort now does correct reference counting when aliasing $a and $b, so no more premature destruction and leakage of scalars if they get re-aliased during execution of the sort comparator. [GH #11422] https://github.com/Perl/perl5/issues/11422
  • reverse with no operand โ€” the one that reverses $_ by default โ€” is no longer in danger of corrupting the stack. [GH #16291] https://github.com/Perl/perl5/issues/16291
  • exec, system, et al are no longer liable to have their argument lists corrupted by reentrant calls or by magic such as tied scalars. [GH #15660] https://github.com/Perl/perl5/issues/15660
  • Perl's own malloc no longer gets confused by attempts to allocate more than a gigabyte on a 64-bit platform. [GH #13273] https://github.com/Perl/perl5/issues/13273
  • Stacked file test operators inside a sort comparator expression no longer cause a crash. [GH #15626] https://github.com/Perl/perl5/issues/15626
  • An identity tr/// transformation on a reference is no longer mistaken for that reference when deciding whether it can be assigned to. [GH #15812] https://github.com/Perl/perl5/issues/15812
  • Lengthy hexadecimal, octal, or binary floating point literals no longer cause undefined behaviour when parsing digits that are of such low significance they can't affect the floating point value anyway. [GH #16114] https://github.com/Perl/perl5/issues/16114
  • open $$scalarref... and similar invocations no longer leak the file handle. [GH #12593] https://github.com/Perl/perl5/issues/12593
  • Some convoluted kinds of regexp no longer cause an arithmetic overflow when compiled. [GH #16113] https://github.com/Perl/perl5/issues/16113
  • The default typemap, by avoiding newGVgen, no longer leaks when XSUBs return file handles (PerlIO * or FILE *). [GH #12593] https://github.com/Perl/perl5/issues/12593
  • Creating a BEGIN block as an XS subroutine with a prototype no longer crashes because of the early freeing of the subroutine.
  • The printf format specifier %.0f no longer rounds incorrectly [GH #9125] https://github.com/Perl/perl5/issues/9125, and now shows the correct sign for a negative zero. โœจ
  • Fixed an issue where the error Scalar value @arrayname[0] better written as $arrayname would give an error Cannot printf Inf with 'c' when arrayname starts with Inf. [GH #16335] https://github.com/Perl/perl5/issues/16335
  • The Perl implementation of getcwd() in Cwd in the PathTools distribution now behaves the same as the XS implementation on errors: it returns an error, and sets $!. [GH #16338] https://github.com/Perl/perl5/issues/16338
  • Vivify array elements when putting them on the stack. Fixes [GH #5310] https://github.com/Perl/perl5/issues/5310 (reported in April 2002 โ€” yes, that 2002 ๐Ÿซถ).
  • Fixed parsing of braced subscript after parens. Fixes [GH #4688] https://github.com/Perl/perl5/issues/4688 (reported in December 2001).
  • tr/non_utf8/long_non_utf8/c could give the wrong results when the length of the replacement character list was greater than 0x7fff.
  • tr/non_utf8/non_utf8/cd failed to add the implied \x{100}-\x{7fffffff} to the search character list.
  • Compilation failures within perl-within-perl constructs โ€” like with string interpolation and the right part of s///e โ€” now cause compilation to abort earlier.

Previously compilation could keep going in order to report other errors, but the failed sub-parse could leave partly parsed constructs sitting on the parser shift-reduce stack, confusing the parser and leading to perl crashes. [GH #14739] https://github.com/Perl/perl5/issues/14739

  • On threaded perls where the decimal point (radix) character isn't a dot, a race could occur between threads when one of them needs to use the real radix character (such as with sprintf). This is now fixed by use of a mutex on systems without thread-safe locales โ€” and on systems with thread-safe locales, the problem just doesn't come up at all. ๐Ÿ’…
  • Errors while compiling a regex character class could sometimes trigger an assertion failure. [GH #16172] https://github.com/Perl/perl5/issues/16172

๐ŸŒˆ Acknowledgements ๐ŸŒˆ

Perl 5.28.0 represents approximately 13 months of development since Perl 5.26.0, and it contains approximately 730,000 lines of changes across 2,200 files from 77 authors. That's not a glow-up, that's a glow-up. ๐Ÿ‘‘

Excluding auto-generated files, documentation and release tools, there were approximately 580,000 lines of changes to 1,300 .pm, .t, .c and .h files.

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

Aaron Crane, Abigail, ร†var Arnfjรถrรฐ Bjarmason, Alberto Simรตes, Alexandr Savca, Andrew Fresh, Andy Dougherty, Andy Lester, Aristotle Pagaltzis, Ask Bjรธrn Hansen, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsรฅker, Dan Collins, Daniel Dragan, David Cantrell, David Mitchell, Dmitry Ulanov, Dominic Hargreaves, E. Choroba, Eric Herman, Eugen Konkov, Father Chrysostomos, Gene Sullivan, George Hartzell, Graham Knop, Harald Jรถrg, H.Merijn Brand, Hugo van der Sanden, Jacques Germishuys, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, J. Nick Koston, John Lightsey, John Peacock, John P. Linderman, John SJ Anderson, Karen Etheridge, Karl Williamson, Ken Brown, Ken Cotterill, Leon Timmermans, Lukas Mai, Marco Fontani, Marc-Philip Werner, Matthew Horsfall, Neil Bowers, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Paul Marquess, Peter John Acklam, Reini Urban, Renee Baecker, Ricardo Signes, Robin Barker, Sawyer X, Scott Lanning, Sergey Aleynikov, Shirakata Kentaro, Shoichi Kaji, Slaven Rezic, Smylers, Steffen Mรผller, Steve Hay, Sullivan Beck, Thomas Sibley, Todd Rinaldo, Tomasz Konojacki, Tom Hukins, Tom Wyant, Tony Cook, Vitali Peil, Yves Orton, Zefram.

The list above is almost certainly incomplete since it's automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker. ๐Ÿซถ

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 (yes bestie, we want your bug reports) ๐Ÿ›

If you find what you think is a bug, first stop and check the perl bug database at <https://rt.perl.org/>. There might also be info waiting for you at <http://www.perl.org/> โ€” that's the Perl Home Page, iconic as always. ๐Ÿ’–

If you truly believe you've got an unreported bug, pls run the perlbug program that ships with your release. And listen โ€” trim that bug down to a tiny but sufficient test case. Tiny! Sufficient! Both! Your bug report, along with the output of perl -V, gets sent off to perlbug@perl.org so the Perl porting team can analyse it. ๐Ÿซถ

โš ๏ธ If the bug you're reporting has security implications that make it inappropriate to send to a publicly archived mailing list, then go read "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for the details on how to report the issue. Do not just yolo it onto the public list, bestie. ๐Ÿšจ

๐Ÿ’ Give Thanks ๐Ÿ’

Wanna thank the Perl 5 Porters for all the work we did in Perl 5? Obsessed with that energy. Just run the perlthanks program:

perlthanks

That sends an email to the Perl 5 Porters list with your show of thanks. Slay. ๐ŸŒธ


๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

  • The Changes file โ€” for an explanation of how to view exhaustive details on what changed.
  • The INSTALL file โ€” for how to build Perl.
  • The README file โ€” for general stuff.
  • The Artistic and Copying files โ€” for copyright information.

And that's a wrap on the whole delta, bestie!! This was perl v5.42.3, dated 2026-08-03, page PERL5280DELTA(1), and you read every single crumb of it. Main character energy fr fr. ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from