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()andfchmodat()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::DebugLocale::Codesand its associatedCountry,CurrencyandLanguagemodules
โก 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
multiconcatopcode which combines multiple concatenations โ and optionally a=or.=โ into a single action. for example, apart from retrieving$s,$aand$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 likeFoo=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::Globhas been modified to remove unnecessary backtracking and recursion, thanks to Russ Cox. seehttps://research.swtch.com/globfor 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
requirefor 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 version2.24to2.30. โจ- This update also handled
CVE-2018-12015: directory traversal vulnerability.[cpan #125523]<https://rt.cpan.org/Ticket/Display.html?id=125523>
- This update also handled
arybaseโ upgraded from version0.12to0.15. ๐Attribute::Handlersโ upgraded from version0.99to1.01. ๐attributesโ upgraded from version0.29to0.33. ๐ฆBโ upgraded from version1.68to1.74. ๐ธB::Conciseโ upgraded from version0.999to1.003. ๐B::Debugโ upgraded from version1.24to1.26. ๐- NOTE:
B::Debugis deprecated and may be removed from a future version of Perl. ๐ญ
- NOTE:
B::Deparseโ upgraded from version1.40to1.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 version2.25to2.27. ๐bignumโ upgraded from version0.47to0.49. โญblibโ upgraded from version1.06to1.07. ๐ซถbytesโ upgraded from version1.05to1.06. ๐งCarpโ upgraded from version1.42to1.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 perl5.14and earlier) loadScalar::Utilat run time, which will fail if Carp has been invoked after a syntax error. ๐ญ
- If a package on the call stack contains a constant named
charnamesโ upgraded from version1.44to1.45. ๐Compress::Raw::Zlibโ upgraded from version2.074to2.076. ๐ฅ- This addresses a security vulnerability in older versions of the
'zlib'library (which is bundled withCompress-Raw-Zlib). ๐ก๏ธ
- This addresses a security vulnerability in older versions of the
Config::Extensionsโ upgraded from version0.01to0.02. โจConfig::Perl::Vโ upgraded from version0.28to0.29. ๐CPANโ upgraded from version2.18to2.20. ๐Data::Dumperโ upgraded from version2.167to2.170. ๐ฆ- Quoting of glob names now obeys the
Useqqoption[GH #13274]<https://github.com/Perl/perl5/issues/13274>. - Attempts to set an option to
"undef"through a combined getter/setter method are no longer mistaken for getter calls[GH #12135]<https://github.com/Perl/perl5/issues/12135>. ๐
- Quoting of glob names now obeys the
Devel::Peekโ upgraded from version1.26to1.27. ๐ธDevel::PPPortโ upgraded from version3.35to3.40. ๐- Devel::PPPort has moved from cpan-first to perl-first maintenance. โญ
- Primary responsibility for the code in
Devel::PPPorthas 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 version5.96to6.01. ๐DirHandleโ upgraded from version1.04to1.05. ๐ซถDynaLoaderโ upgraded from version1.42to1.45. ๐ง- Its documentation now shows the use of
"__PACKAGE__"and direct object syntax[GH #16190]<https://github.com/Perl/perl5/issues/16190>. ๐
- Its documentation now shows the use of
Encodeโ upgraded from version2.88to2.97. ๐ฅencodingโ upgraded from version2.19to2.22. โจErrnoโ upgraded from version1.28to1.29. ๐experimentalโ upgraded from version0.016to0.019. ๐Exporterโ upgraded from version5.72to5.73. ๐ฆExtUtils::CBuilderโ upgraded from version0.280225to0.280230. ๐ธExtUtils::Constantโ upgraded from version0.23to0.25. ๐ExtUtils::Embedโ upgraded from version1.34to1.35. ๐ExtUtils::Installโ upgraded from version2.04to2.14. โญExtUtils::MakeMakerโ upgraded from version7.24to7.34. ๐ExtUtils::Miniperlโ upgraded from version1.06to1.08. ๐ซถExtUtils::ParseXSโ upgraded from version3.34to3.39. ๐งExtUtils::Typemapsโ upgraded from version3.34to3.38. ๐ExtUtils::XSSymSetโ upgraded from version1.3to1.4. ๐ฅfeatureโ upgraded from version1.47to1.52. โจfieldsโ upgraded from version2.23to2.24. ๐File::Copyโ upgraded from version2.32to2.33. ๐- It will now use the sub-second precision variant of
utime()supplied byTime::HiReswhere available.[GH #16225]<https://github.com/Perl/perl5/issues/16225>. ๐ฆ
- It will now use the sub-second precision variant of
File::Fetchโ upgraded from version0.52to0.56. ๐ธFile::Globโ upgraded from version1.28to1.31. ๐File::Pathโ upgraded from version2.12_01to2.15. ๐File::SpecandCwdโ upgraded from version3.67to3.74. โญFile::statโ upgraded from version1.07to1.08. ๐FileCacheโ upgraded from version1.09to1.10. ๐ซถFilter::Simpleโ upgraded from version0.93to0.95. ๐งFilter::Util::Callโ upgraded from version1.55to1.58. ๐GDBM_Fileโ upgraded from version1.15to1.17. ๐ฅ- Its documentation now explains that
"each"and"delete"don't mix in hashes tied to this module[GH #12894]<https://github.com/Perl/perl5/issues/12894>. ๐ - It will now retry opening with an acceptable block size if asking gdbm to default the block size failed
[GH #13232]<https://github.com/Perl/perl5/issues/13232>. โจ
- Its documentation now explains that
Getopt::Longโ upgraded from version2.49to2.5. ๐Hash::Util::FieldHashโ upgraded from version1.19to1.20. ๐I18N::Langinfoโ upgraded from version0.13to0.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-8flag in its returned scalar if the string contains legal non-ASCIIUTF-8, and the locale isUTF-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. ๐
- This module is now available on all platforms, emulating the system
I18N::LangTagsโ upgraded from version0.42to0.43. ๐ifโ upgraded from version0.0606to0.0608. โญIOโ upgraded from version1.38to1.39. ๐IO::Socket::IPโ upgraded from version0.38to0.39. ๐ซถIPC::Cmdโ upgraded from version0.96to1.00. ๐งJSON::PPโ upgraded from version2.27400_02to2.97001. ๐- The
"libnet"distribution โ upgraded from version3.10to3.11. ๐ฅ List::Utilโ upgraded from version1.46_02to1.49. โจLocale::Codesโ upgraded from version3.42to3.56. ๐- NOTE:
Locale::Codesscheduled to be removed from core in Perl5.30. ๐ญ
- NOTE:
Locale::Maketextโ upgraded from version1.28to1.29. ๐Math::BigIntโ upgraded from version1.999806to1.999811. ๐ฆMath::BigInt::FastCalcโ upgraded from version0.5005to0.5006. ๐ธMath::BigRatโ upgraded from version0.2611to0.2613. ๐Module::CoreListโ upgraded from version5.20170530to5.20180622. ๐mroโ upgraded from version1.20to1.22. โญNet::Pingโ upgraded from version2.55to2.62. ๐NEXTโ upgraded from version0.67to0.67_01. ๐ซถODBM_Fileโ upgraded from version1.14to1.15. ๐งOpcodeโ upgraded from version1.39to1.43. ๐overloadโ upgraded from version1.28to1.30. ๐ฅPerlIO::encodingโ upgraded from version0.25to0.26. โจPerlIO::scalarโ upgraded from version0.26to0.29. ๐PerlIO::viaโ upgraded from version0.16to0.17. ๐Pod::Functionsโ upgraded from version1.11to1.13. ๐ฆPod::Htmlโ upgraded from version1.2202to1.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 usePod::Simple::XHTMLto do the core of its job[GH #11954]<https://github.com/Perl/perl5/issues/11954>. ๐
- A title for the HTML document will now be automatically generated by default from a
Pod::Perldocโ upgraded from version3.28to3.2801. ๐- The
"podlators"distribution โ upgraded from version4.09to4.10. โญ- Man page references and function names now follow the Linux man page formatting standards, instead of the Solaris standard. ๐
POSIXโ upgraded from version1.76to1.84. ๐- Some more cautions were added about using locale-specific functions in threaded applications. ๐ซถ
reโ upgraded from version0.34to0.36. ๐งScalar::Utilโ upgraded from version1.46_02to1.50. ๐SelfLoaderโ upgraded from version1.23to1.25. ๐ฅSocketโ upgraded from version2.020_03to2.027. โจsortโ upgraded from version2.02to2.04. ๐Storableโ upgraded from version2.62to3.08. ๐Sub::Utilโ upgraded from version1.48to1.49. ๐ฆsubsโ upgraded from version1.02to1.03. ๐ธSys::Hostnameโ upgraded from version1.20to1.22. ๐Term::ReadLineโ upgraded from version1.16to1.17. ๐Testโ upgraded from version1.30to1.31. โญTest::Harnessโ upgraded from version3.38to3.42. ๐Test::Simpleโ upgraded from version1.302073to1.302133. ๐ซถthreadsโ upgraded from version2.15to2.22. ๐ง- the docs now actually explain what goes sideways when you return values from threads, and they stopped nagging you about creating threads inside
BEGINblocks. [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
numnow takes an optional parameter, and that lil guy is there to help you figure out error returns. ๐ต๏ธ
- the function
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.- bestie it now ships new functions whose names end in
_at_level, so whoever's calling them can say exactly which call frame they mean. [GH #16257] <https://github.com/Perl/perl5/issues/16257>
- bestie it now ships new functions whose names end in
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 exampleDynaLoaderusage. [GH #16190] <https://github.com/Perl/perl5/issues/16190> - platforms that use
mod2fnameto 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. ๐
- the docs now show you how to use
๐๏ธ Removed Modules and Pragmata ๐๏ธ
- the
VMS::stdiocompatibility 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(), andperl_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()andnewCONSTSUB_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
- the description of the conditions under which
DB::sub()will be called has been clarified. [GH #16055] <https://github.com/Perl/perl5/issues/16055>
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
ERRSVas a format string when callingcroak(). if that string contains format codes such as%sthis 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
existsoperator 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
blessoperator have been clarified. [GH #14684] <https://github.com/Perl/perl5/issues/14684> - the description of
@INChooks in the documentation forrequirehas 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
refhas been rewritten for clarity. it's giving readable now. - the documentation of
usenow explains what syntactically qualifies as a version number for its module version checking feature. - the documentation of
warnhas been updated to reflect that since Perl 5.14 it has treated complex exception objects in a manner equivalent todie. [GH #13641] <https://github.com/Perl/perl5/issues/13641> - the documentation of
dieandwarnhas been revised for clarity. - the documentation of
eachhas 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
requirewas 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()andnewATTRSUB_x()are now documented. they're on the map now. ๐บ๏ธ
perlobj
- the documentation about
DESTROYmethods has been corrected, updated, and revised, especially in regard to how they interact with exceptions. [GH #14083] <https://github.com/Perl/perl5/issues/14083>
perlop
- the description of the
xoperator in perlop has been clarified. [GH #16253] <https://github.com/Perl/perl5/issues/16253> - perlop has been updated to note that
qw's whitespace rules differ from that ofsplit's in that only ASCII whitespace is used. - the general explanation of operator precedence and associativity has been corrected and clarified. [GH #15153] <https://github.com/Perl/perl5/issues/15153>
- the documentation for the
\referencing operator now explains the unusual context that it supplies to its operand. it's a weird context bestie, but it's the context. [GH #15932] <https://github.com/Perl/perl5/issues/15932>
perlrequick
- clarifications on metacharacters and character classes
perlretut
- clarify metacharacters.
perlrun
- clarify the differences between
-Mand-m. [GH #15998] <https://github.com/Perl/perl5/issues/15998>
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
sudoto 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-\xFFit 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
definedand 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"inperldiag
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 anourvariable has been redeclared, have moved to a new warnings category calledshadow. They used to live in categorymisc. 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
perldiagentry 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
--helpand--versionoptions 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-arithis 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
perlipcto the individual section documents are now correct. [GH #11941] <https://github.com/Perl/perl5/issues/11941> lib/unicore/mktablesnow 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-APItestdirectory is now done in parallel, where applicable. Multitasking icon behavior. ๐ - Perl now includes a default
.travis.ymlfile for Travis CI testing on GitHub mirrors. [GH #14558] <https://github.com/Perl/perl5/issues/14558> - The watchdog timer count in
re/pat_psycho.tcan 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.
harnessno longer waits for 30 seconds when runningt/io/openpid.t. The patience has left the chat. [GH #13535] <https://github.com/Perl/perl5/issues/13535> [GH #16420] <https://github.com/Perl/perl5/issues/16420>
๐ฆ 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๐ atoptimize_optree()time, a chain ofOP_CONCATandOP_CONSTops โ plus optionally anOP_STRINGIFYand/orOP_SASSIGNhanging out with them โ get smooshed together into one singleOP_MULTICONCATop. the op is of typeUNOP_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_pluginis NOT safe in the presence of multithreading ๐จ so there's a newwrap_keyword_pluginfunction, which lets XS modules safely define custom keywords even when loaded from a thread โ analogous toPL_check/wrap_op_checker. slay. - the
PL_statbufinterpreter 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 likeis_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 systemnl_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 uselocaleconv(3)(and get hit by those gotchas) just to find the decimal point, thousands separator, or currency symbol. see"Perl_langinfo" in perlapifor the deets ๐ - new API function
sv_rvunweaken()has been added, complementingsv_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_PARENTbuild define is no longer supported โ which means perl is now always built withPERL_OP_PARENTenabled. 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_pvfield ofOP_TRANS/OP_TRANSRops has changed. it's now astruct 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_setlocalein perlapi has been added ๐ sync_localein 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 meanssome_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 aNULLpointer 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 functionPerl_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-fpbuilds.pp.cdefined"_LIB_VERSION"which-lieeealready 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$nullis an empty string, it's no longer treated as if the/oflag was present just because the previous matching match operator included the/oflag. 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 LISTwith an empty"LIST"has been fixed. this should callexecvp()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_svC 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$^Vandx@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 splicenow 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 whatpushandunshiftalready do, so it's giving consistency. [GH #15923] https://github.com/Perl/perl5/issues/15923stat(),lstat(), and the file test operators now fail if you hand them a filename containing a nul character โ same wayopen()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 $pathon 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
doblocks โ likedo { 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 packandunpackcan 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
importorunimportmethod, but now it's treated like any other string 1. [GH #14902] https://github.com/Perl/perl5/issues/14902 systemnow 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 sortnow does correct reference counting when aliasing$aand$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/11422reversewith 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/16291exec,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
mallocno 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 *orFILE *). [GH #12593] https://github.com/Perl/perl5/issues/12593 - Creating a
BEGINblock as an XS subroutine with a prototype no longer crashes because of the early freeing of the subroutine. - The
printfformat specifier%.0fno 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 $arraynamewould give an errorCannot printf Inf with 'c'when arrayname starts withInf. [GH #16335] https://github.com/Perl/perl5/issues/16335 - The Perl implementation of
getcwd()inCwdin 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/ccould give the wrong results when the length of the replacement character list was greater than0x7fff.tr/non_utf8/non_utf8/cdfailed to add the implied\x{100}-\x{7fffffff}to the search character list.- Compilation failures within
perl-within-perlconstructs โ like with string interpolation and the right part ofs///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"inperlsecfor 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
Changesfile โ for an explanation of how to view exhaustive details on what changed. - The
INSTALLfile โ for how to build Perl. - The
READMEfile โ for general stuff. - The
ArtisticandCopyingfiles โ 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
- fedora 43: perl-doc 5.42.3-524.fc43 ยท (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- fedora 44: perl-doc 5.42.3-525.fc44 ยท (GPL-1.0-or-later OR Artistic-1.0-Perl) AND Unicode-3.0 AND LicenseRef-Fedora-UltraPermissive
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms