PERL5160DELTA(1perl)

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

๐ŸŒˆ NAME ๐ŸŒˆ

perl5160delta โ€” the tea on what's new for perl v5.16.0 ๐Ÿ’…

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

Okay so this doc spills the differences between the 5.14.0 release and the 5.16.0 release.

If you're upgrading from something even older, like 5.12.0, bestie, first go read perl5140delta, which covers the glow-up from 5.12.0 to 5.14.0.

Some bug fixes in this release got backported to later releases of 5.14.x. Those are marked with the 5.14.x version in parentheses.

โœจ Notice โœจ

With the release of Perl 5.16.0, the 5.12.x series of releases is now out of its support period. There may be future 5.12.x releases, but only if there's a critical security issue. Users of Perl 5.12 or earlier should consider upgrading to a more recent release of Perl.

This policy is described in greater detail in perlpolicy.

๐Ÿ‘‘ Core Enhancements ๐Ÿ‘‘

๐Ÿ’– use VERSION ๐Ÿ’–

As of this release, version declarations like use v5.16 now disable all features before enabling the new feature bundle. This means that the following holds true:

use 5.016;
# only 5.16 features enabled here
use 5.014;
# only 5.14 features enabled here (not 5.16)

use v5.12 and higher continue to enable strict, but explicit use strict and no strict now override the version declaration, even when they come first:

no strict;
use 5.012;
# no strict here

There is a new :default feature bundle that represents the set of features enabled before any version declaration or use feature has been seen. Version declarations below 5.10 now enable the :default feature set. This does not actually change the behavior of use v5.8, because features added to the :default set are those that were traditionally enabled by default, before they could be turned off.

no feature now resets to the default feature set. To disable all features (which is likely to be a pretty special-purpose request, since it presumably won't match any named set of semantics) you can now write no feature ':all'.

$[ is now disabled under use v5.16. It is part of the default feature set and can be turned on or off explicitly with use feature 'array_base'.

๐Ÿ’ซ __SUB__ ๐Ÿ’ซ

The new __SUB__ token, available under the current_sub feature (see feature) or use v5.16, returns a reference to the current subroutine, making it easier to write recursive closures.

๐Ÿ› ๏ธ New and Improved Built-ins ๐Ÿ› ๏ธ

More consistent eval

The eval operator sometimes treats a string argument as a sequence of characters and sometimes as a sequence of bytes, depending on the internal encoding. The internal encoding is not supposed to make any difference, but there is code that relies on this inconsistency.

The new unicode_eval and evalbytes features (enabled under use 5.16.0) resolve this. The unicode_eval feature causes eval $string to treat the string always as Unicode. The evalbytes features provides a function, itself called evalbytes, which evaluates its argument always as a string of bytes.

These features also fix oddities with source filters leaking to outer dynamic scopes.

See feature for more detail.

substr lvalue revamp

When substr is called in lvalue or potential lvalue context with two or three arguments, a special lvalue scalar is returned that modifies the original string (the first argument) when assigned to.

Previously, the offsets (the second and third arguments) passed to substr would be converted immediately to match the string, negative offsets being translated to positive and offsets beyond the end of the string being truncated.

Now, the offsets are recorded without modification in the special lvalue scalar that is returned, and the original string is not even looked at by substr itself, but only when the returned lvalue is read or modified.

These changes result in an incompatible change:

If the original string changes length after the call to substr but before assignment to its return value, negative offsets will remember their position from the end of the string, affecting code like this:

my $string = "string";
my $lvalue = \substr $string, -4, 2;
print $$lvalue, "\n"; # prints "ri"
$string = "bailing twine";
print $$lvalue, "\n"; # prints "wi"; used to print "il"

The same thing happens with an omitted third argument. The returned lvalue will always extend to the end of the string, even if the string becomes longer.

Since this change also allowed many bugs to be fixed (see "The substr operator"), and since the behavior of negative offsets has never been specified, the change was deemed acceptable.

Return value of tied

The value returned by tied on a tied variable is now the actual scalar that holds the object to which the variable is tied. This lets ties be weakened with Scalar::Util::weaken(tied $tied_variable).

๐ŸŒ Unicode Support ๐ŸŒ

Supports (almost) Unicode 6.1

Besides the addition of whole new scripts, and new characters in existing scripts, this new version of Unicode, as always, makes some changes to existing characters. One change that may trip up some applications is that the General Category of two characters in the Latin-1 range, PILCROW SIGN and SECTION SIGN, has been changed from Other_Symbol to Other_Punctuation. The same change has been made for a character in each of Tibetan, Ethiopic, and Aegean. The code points U+3248..U+324F (CIRCLED NUMBER TEN ON BLACK SQUARE through CIRCLED NUMBER EIGHTY ON BLACK SQUARE) have had their General Category changed from Other_Symbol to Other_Numeric. The Line Break property has changes for Hebrew and Japanese; and because of other changes in 6.1, the Perl regular expression construct \X now works differently for some characters in Thai and Lao.

New aliases (synonyms) have been defined for many property values; these, along with the previously existing ones, are all cross-indexed in perluniprops.

The return value of charnames::viacode() is affected by other changes:

 Code point      Old Name             New Name
   U+000A    LINE FEED (LF)        LINE FEED
   U+000C    FORM FEED (FF)        FORM FEED
   U+000D    CARRIAGE RETURN (CR)  CARRIAGE RETURN
   U+0085    NEXT LINE (NEL)       NEXT LINE
   U+008E    SINGLE-SHIFT 2        SINGLE-SHIFT-2
   U+008F    SINGLE-SHIFT 3        SINGLE-SHIFT-3
   U+0091    PRIVATE USE 1         PRIVATE USE-1
   U+0092    PRIVATE USE 2         PRIVATE USE-2
   U+2118    SCRIPT CAPITAL P      WEIERSTRASS ELLIPTIC FUNCTION

Perl will accept any of these names as input, but charnames::viacode() now returns the new name of each pair. The change for U+2118 is considered by Unicode to be a correction, that is the original name was a mistake (but again, it will remain forever valid to use it to refer to U+2118). But most of these changes are the fallout of the mistake Unicode 6.0 made in naming a character used in Japanese cell phones to be "BELL", which conflicts with the longstanding industry use of (and Unicode's recommendation to use) that name to mean the ASCII control character at U+0007. Therefore, that name has been deprecated in Perl since v5.14, and any use of it will raise a warning message (unless turned off). The name "ALERT" is now the preferred name for this code point, with "BEL" an acceptable short form. The name for the new cell phone character, at code point U+1F514, remains undefined in this version of Perl (hence we don't implement quite all of Unicode 6.1), but starting in v5.18, BELL will mean this character, and not U+0007.

Unicode has taken steps to make sure that this sort of mistake does not happen again. The Standard now includes all generally accepted names and abbreviations for control characters, whereas previously it didn't (though there were recommended names for most of them, which Perl used). This means that most of those recommended names are now officially in the Standard. Unicode did not recommend names for the four code points listed above between U+008E and U+008F, and in standardizing them Unicode subtly changed the names that Perl had previously given them, by replacing the final blank in each name by a hyphen. Unicode also officially accepts names that Perl had deprecated, such as FILE SEPARATOR. Now the only deprecated name is BELL. Finally, Perl now uses the new official names instead of the old (now considered obsolete) names for the first four code points in the list above (the ones which have the parentheses in them).

Now that the names have been placed in the Unicode standard, these kinds of changes should not happen again, though corrections, such as to U+2118, are still possible.

Unicode also added some name abbreviations, which Perl now accepts: SP for SPACE; TAB for CHARACTER TABULATION; NEW LINE, END OF LINE, NL, and EOL for LINE FEED; LOCKING-SHIFT ONE for SHIFT OUT; LOCKING-SHIFT ZERO for SHIFT IN; and ZWNBSP for ZERO WIDTH NO-BREAK SPACE.

More details on this version of Unicode are provided in <http://www.unicode.org/versions/Unicode6.1.0/>.

use charnames is no longer needed for \N{name}

When \N{name} is encountered, the charnames module is now automatically loaded when needed as if the :full and :short options had been specified. See charnames for more information.

\N{...} can now have Unicode loose name matching

This is described in the charnames item in "Updated Modules and Pragmata" below.

Unicode Symbol Names

Perl now has proper support for Unicode in symbol names. It used to be that *{$foo} would ignore the internal UTF8 flag and use the bytes of the underlying representation to look up the symbol. That meant that *{"\x{100}"} and *{"\xc4\x80"} would return the same thing. All these parts of Perl have been fixed to account for Unicode:

  • Method names (including those passed to use overload)
  • Typeglob names (including names of variables, subroutines, and filehandles)
  • Package names
  • goto
  • Symbolic dereferencing
  • Second argument to bless() and tie()
  • Return value of ref()
  • Subroutine prototypes
  • Attributes
  • Various warnings and error messages that mention variable names or values, methods, etc.

In addition, a parsing bug has been fixed that prevented *{รฉ} from implicitly quoting the name, but instead interpreted it as *{+รฉ}, which would cause a strict violation.

*{"*a::b"} automatically strips off the * if it is followed by an ASCII letter. That has been extended to all Unicode identifier characters.

One-character non-ASCII non-punctuation variables (like $รฉ) are now subject to "Used only once" warnings. They used to be exempt, as they were treated as punctuation variables.

Also, single-character Unicode punctuation variables (like $โ€ฐ) are now supported [perl #69032]. ๐Ÿ’œ the little guys are finally getting their moment

๐ŸŒโœจ Improved ability to mix locales and Unicode, including UTF-8 locales

Okay so use locale got an optional parameter and it's kind of a big deal:

 use locale ':not_characters';

which tells Perl to use all but the LC_CTYPE and LC_COLLATE portions of the current locale. Instead, the character set is assumed to be Unicode. This lets locales and Unicode be seamlessly mixed, including the increasingly frequent UTF-8 locales. When using this hybrid form of locales, the :locale layer to the open pragma can be used to interface with the file system, and there are CPAN modules available for ARGV and environment variable conversions. bestie the worlds are merging ๐ŸŒธ๐Ÿฆ‹

Full details are in perllocale.

๐Ÿ”ค New function fc and corresponding escape sequence \F for Unicode foldcase

Unicode foldcase is like lowercase's cooler, smarter sibling โ€” it gives better results when comparing two strings case-insensitively. It has long been used internally in regular expression /i matching. Now it is available explicitly through the new fc function call (enabled by use feature 'fc', or use v5.16, or explicitly callable via CORE::fc) or through the new \F sequence in double-quotish strings. she's out here, on main, callable ๐Ÿ’…

Full details are in "fc" in perlfunc.

๐Ÿฆ‹ The Unicode Script_Extensions property is now supported

New in Unicode 6.0, this is an improved "Script" property โ€” lowkey an upgrade arc. Details are in "Scripts" in perlunicode. ๐ŸŽ€

๐Ÿ› ๏ธ XS Changes ๐Ÿ› ๏ธ

Improved typemaps for Some Builtin Types

Most XS authors will know there is a longstanding bug in the OUTPUT typemap for T_AVREF (AV*), T_HVREF (HV*), T_CVREF (CV*), and T_SVREF (SVREF or \$foo) that requires manually decrementing the reference count of the return value instead of the typemap taking care of this. For backwards-compatibility, this cannot be changed in the default typemaps. But we now provide additional typemaps T_AVREF_REFCOUNT_FIXED, etc. that do not exhibit this bug. Using them in your extension is as simple as having one line in your TYPEMAP section:

 HV*   T_HVREF_REFCOUNT_FIXED

not me fixing the ancient bug, couldn't be me ๐Ÿ˜ญโœจ

is_utf8_char()

The XS-callable function is_utf8_char(), when presented with malformed UTF-8 input, can read up to 12 bytes beyond the end of the string. This cannot be fixed without changing its API, and so its use is now deprecated. Use is_utf8_char_buf() (described just below) instead. ๐Ÿ’€ like it's over the line, literally

Added is_utf8_char_buf()

This function is designed to replace the deprecated is_utf8_char() function. It includes an extra parameter to make sure it doesn't read past the end of the input buffer. boundary-respecting king ๐Ÿ‘‘

Other is_utf8_foo() functions, as well as utf8_to_foo(), etc.

Most other XS-callable functions that take UTF-8 encoded input implicitly assume that the UTF-8 is valid (not malformed) with respect to buffer length. Do not do things such as change a character's case or see if it is alphanumeric without first being sure that it is valid UTF-8. This can be safely done for a whole string by using one of the functions is_utf8_string(), is_utf8_string_loc(), and is_utf8_string_loclen(). ๐Ÿšจ fr fr, validate first, glam second

New Pad API

Many new functions have been added to the API for manipulating lexical pads. See "Pad Data Structures" in perlapi for more information.

๐Ÿ’œ Changes to Special Variables ๐Ÿ’œ

$$ can be assigned to

$$ was made read-only in Perl 5.8.0. But only sometimes: local $$ would make it writable again. Some CPAN modules were using local $$ or XS code to bypass the read-only check, so there is no reason to keep $$ read-only. (This change also allowed a bug to be fixed while maintaining backward compatibility.) the way the rules were fake this whole time ๐Ÿซ 

$^X converted to an absolute path on FreeBSD, OS X and Solaris

$^X is now converted to an absolute path on OS X, FreeBSD (without needing /proc mounted) and Solaris 10 and 11. This augments the previous approach of using /proc on Linux, FreeBSD, and NetBSD (in all cases, where mounted).

This makes relocatable perl installations more useful on these platforms. (See "Relocatable @INC" in INSTALL) ๐Ÿงš relocatable era

๐Ÿ› Debugger Changes ๐Ÿ›

Features inside the debugger

The current Perl's feature bundle is now enabled for commands entered in the interactive debugger. โœจ the debugger got the same perks as your script, periodt

New option for the debugger's t command

The t command in the debugger, which toggles tracing mode, now accepts a numeric argument that determines how many levels of subroutine calls to trace.

"enable" and "disable"

The debugger now has disable and enable commands for disabling existing breakpoints and re-enabling them. See perldebug. on/off era ๐Ÿ”

Breakpoints with file names

The debugger's b command for setting breakpoints now lets a line number be prefixed with a file name. See "b [file]:[line] [condition]" in perldebug.

๐Ÿ‘‘ The "CORE" Namespace ๐Ÿ‘‘

The CORE:: prefix

The CORE:: prefix can now be used on keywords enabled by feature.pm, even outside the scope of use feature. no gatekeeping ๐Ÿ’…

Subroutines in the "CORE" namespace

Many Perl keywords are now available as subroutines in the CORE namespace. This lets them be aliased:

 BEGIN { *entangle = \&CORE::tie }
 entangle $variable, $package, @args;

And for prototypes to be bypassed:

 sub mytie(\[%$*@]$@) {
     my ($ref, $pack, @args) = @_;
     ... do something ...
     goto &CORE::tie;
 }

Some of these cannot be called through references or via &foo syntax, but must be called as barewords.

See CORE for details. she's flexible but not that flexible ๐Ÿซถ

๐ŸŒˆ Other Changes ๐ŸŒˆ

Anonymous handles

Automatically generated file handles are now named __ANONIO__ when the variable name cannot be determined, rather than $__ANONIO__. glow-down of exactly one dollar sign, and honestly? correct.

Autoloaded sort Subroutines

Custom sort subroutines can now be autoloaded [perl #30661]:

 sub AUTOLOAD { ... }
 @sorted = sort foo @list; # uses AUTOLOAD

"continue" no longer requires the "switch" feature

The continue keyword has two meanings. It can introduce a continue block after a loop, or it can exit the current when block. Up to now, the latter meaning was valid only with the switch feature enabled, and was a syntax error otherwise. Since the main purpose of feature.pm is to avoid conflicts with user-defined subroutines, there is no reason for continue to depend on it. she's independent now ๐Ÿ’…

DTrace probes for interpreter phase change

The "phase-change" probes will fire when the interpreter's phase changes, which tracks the ${^GLOBAL_PHASE} variable. arg0 is the new phase name; arg1 is the old one. This is useful for limiting your instrumentation to one or more of: compile time, run time, or destruct time. ๐Ÿ”ฅ

__FILE__() Syntax

The __FILE__, __LINE__ and __PACKAGE__ tokens can now be written with an empty pair of parentheses after them. This makes them parse the same way as time, fork and other built-in functions.

The \$ prototype accepts any scalar lvalue

The \$ and \[$] subroutine prototypes now accept any scalar lvalue argument. Previously they accepted only scalars beginning with $ and hash and array elements. This change makes them consistent with the way the built-in read and recv functions (among others) parse their arguments. This means that one can override the built-in functions with custom subroutines that parse their arguments the same way. consistency ate ๐Ÿ“

_ in subroutine prototypes

The _ character in subroutine prototypes is now allowed before @ or %. tiny change, big slay

๐Ÿ”’ Security ๐Ÿ”’

Use is_utf8_char_buf() and not is_utf8_char()

The latter function is now deprecated because its API is insufficient to guarantee that it doesn't read (up to 12 bytes in the worst case) beyond the end of its input string. See is_utf8_char_buf().

bestie this is the "use the other one" warning. it's not a suggestion, it's a boundary ๐Ÿ’€

Malformed UTF-8 input could cause attempts to read beyond the end of the buffer

Two new XS-accessible functions, utf8_to_uvchr_buf() and utf8_to_uvuni_buf() are now available to prevent this, and the Perl core has been converted to use them. See "Internal Changes".

File::Glob::bsd_glob() memory error with GLOB_ALTDIRFUNC (CVE-2011-2728)

Calling File::Glob::bsd_glob with the unsupported flag GLOB_ALTDIRFUNC would cause an access violation / segfault. A Perl program that accepts a flags value from an external source could expose itself to denial of service or arbitrary code execution attacks. There are no known exploits in the wild. The problem has been corrected by explicitly disabling all unsupported flags and setting unused function pointers to null. Bug reported by Clรฉment Lecigne. (5.14.2)

not the ๐Ÿฉธ of it all. if you take a flags value from an external source, that's dangerous โ€” denial of service and arbitrary code execution attacks are real stakes. no known exploits in the wild, but still. periodt.

Privileges are now set correctly when assigning to $(

A hypothetical bug (probably unexploitable in practice) because the incorrect setting of the effective group ID while setting $( has been fixed. The bug would have affected only systems that have setresgid() but not setregid(), but no such systems are known to exist.


โš ๏ธ Deprecations โš ๏ธ

Don't read the Unicode data base files in lib/unicore

It is now deprecated to directly read the Unicode data base files. These are stored in the lib/unicore directory. Instead, you should use the new functions in Unicode::UCD. These provide a stable API, and give complete information. ๐Ÿฆ‹

Perl may at some point in the future change or remove these files. The file which applications were most likely to have used is lib/unicore/ToDigit.pl. prop_invmap() in Unicode::UCD can be used to get at its data instead.

ngl, stop poking the raw files behind the curtain โ€” go through the front door, the API is right there ๐Ÿซถ

XS functions is_utf8_char(), utf8_to_uvchr() and utf8_to_uvuni()

This function is deprecated because it could read beyond the end of the input string. Use the new is_utf8_char_buf(), utf8_to_uvchr_buf() and utf8_to_uvuni_buf() instead. ๐Ÿ’€ read beyond the end of the string one too many times and now it's on the deprecated list, as it should be

๐Ÿ”ฎ Future Deprecations ๐Ÿ”ฎ

okay bestie, storytime โ€” this section is basically a "coming soon" notice board. It's a heads-up about features that are probably gonna get removed or deprecated in the next release of perl (5.18.0). So if your code is out here depending on any of these, you should hit up the Perl 5 Porters via the mailing list <http://lists.perl.org/list/perl5-porters.html> or perlbug to explain your whole use case and get in on the deprecation process. speak now or forever hold your peace fr fr ๐Ÿ’…

๐Ÿงธ Core Modules ๐Ÿงธ

These modules might get marked as deprecated from the core. And to be super clear โ€” this only means they won't be installed by default with the core distribution anymore. They'll still be living their best life on the CPAN, so nobody's fully abandoning them. ๐Ÿซถ

  • CPANPLUS
  • Filter::Simple
  • PerlIO::mmap
  • Pod::LaTeX
  • Pod::Parser
  • SelfLoader
  • Text::Soundex
  • Thread.pm

๐Ÿชฆ Platforms with no supporting programmers ๐Ÿชฆ

These platforms will probably have their special build support removed during the 5.17.0 development series. it's giving... sunset era, lowkey sad ๐Ÿ˜ญ

  • BeOS
  • djgpp
  • dgux
  • EPOC
  • MPE/iX
  • Rhapsody
  • UTS
  • VM/ESA

โœจ Other Future Deprecations โœจ

  • Swapping of $< and $> โ€” for more info about this future deprecation, peep the relevant RT ticket <https://github.com/Perl/perl5/issues/11547>.
  • sfio, stdio โ€” Perl supports being built without PerlIO proper, using a stdio or sfio wrapper instead. But a perl build like that won't support IO layers and therefore no Unicode IO, which makes it kinda... handicapped ngl.

PerlIO does support a "stdio" layer if stdio use is what you want, and similarly a sfio layer could be produced.

  • Unescaped literal "{" in regular expressions. Starting with v5.20, the plan is to require a literal "{" to be escaped โ€” for example, by putting a backslash in front of it. In v5.18, a deprecated warning message will be emitted for all such uses. This affects only patterns that are meant to match a literal "{". Other uses of this character, like being part of a quantifier or sequence as in the ones below, are completely unaffected:
/foo{3,5}/
/\p{Alphabetic}/
/\N{DIGIT ZERO}

Removing this will permit extensions to Perl's pattern syntax and better error checking for existing syntax. See "Quantifiers" in perlre for an example.

  • Revamping "\Q" semantics in double-quotish strings when combined with other escapes. There are several bugs and inconsistencies involving combos of "\Q" and escapes like "\x", "\L", etc., inside a "\Q...\E" pair. These need to be fixed, and doing that will necessarily change current behavior. The changes have not yet been settled.

๐Ÿ’ฅ Incompatible Changes ๐Ÿ’ฅ

๐Ÿซฅ Special blocks called in void context ๐Ÿซฅ

Special blocks ("BEGIN", "CHECK", "INIT", "UNITCHECK", "END") are now called in void context. This avoids wasteful copying of the result of the last statement [perl #108794]. no more pointless copying, periodt ๐Ÿ’…

๐ŸŽญ The "overloading" pragma and regexp objects ๐ŸŽญ

With "no overloading", regular expression objects returned by "qr//" are now stringified as "Regexp=REGEXP(0xbe600d)" instead of the regular expression itself [perl #108780]. the way it just... changed its whole entire look ๐Ÿ™ˆ

๐Ÿ—‘๏ธ Two XS typemap Entries removed ๐Ÿ—‘๏ธ

Two presumably unused XS typemap entries have been removed from the core typemap: T_DATAUNIT and T_CALLBACK. If you are, against all odds, a user of these, please see the instructions on how to restore them in perlxstypemap.

๐ŸŒ Unicode 6.1 has incompatibilities with Unicode 6.0 ๐ŸŒ

These are detailed in "Supports (almost) Unicode 6.1" above. You can compile this version of Perl to use Unicode 6.0. See "Hacking Perl to work on earlier Unicode versions (for very serious hackers only)" in perlunicode.

๐Ÿšซ Borland compiler ๐Ÿšซ

All support for the Borland compiler has been dropped. The code hadn't worked for a long time anyway. rip bozo ๐Ÿชฆ

๐Ÿ”ค Certain deprecated Unicode properties are no longer supported by default ๐Ÿ”ค

Perl should never have exposed certain Unicode properties that are used by Unicode internally and not meant to be publicly available. Use of these has generated deprecated warning messages since Perl 5.12. The removed properties are Other_Alphabetic, Other_Default_Ignorable_Code_Point, Other_Grapheme_Extend, Other_ID_Continue, Other_ID_Start, Other_Lowercase, Other_Math, and Other_Uppercase.

Perl may be recompiled to include any or all of them; instructions are given in "Unicode character properties that are NOT accepted by Perl" in perluniprops.

๐ŸŒ€ Dereferencing IO thingies as typeglobs ๐ŸŒ€

The "*{...}" operator, when you pass it a reference to an IO thingy (as in "*{*STDIN{IO}}"), creates a new typeglob containing just that IO object. Previously it would stringify as an empty string, but some operators would treat it as undefined, producing an "uninitialized" warning. Now it stringifies as __ANONIO__ [perl #96326].

๐Ÿ”  User-defined case-changing operations ๐Ÿ” 

This feature was deprecated in Perl 5.14 and has now been removed. The CPAN module Unicode::Casing provides better functionality without the drawbacks this feature had, as are detailed in the 5.14 documentation: <http://perldoc.perl.org/5.14.0/perlunicode.html#User-Defined-Case-Mappings-%28for-serious-hackers-only%29>

๐ŸงŠ XSUBs are now 'static' ๐ŸงŠ

XSUB C functions are now 'static' โ€” meaning they are not visible from outside the compilation unit. Users can use the new XS_EXTERNAL(name) and XS_INTERNAL(name) macros to pick the desired linking behavior. The ordinary XS(name) declaration for XSUBs will continue to declare non-'static' XSUBs for compatibility, but the XS compiler, ExtUtils::ParseXS ("xsubpp"), will emit 'static' XSUBs by default. ExtUtils::ParseXS's behavior can be reconfigured from XS using the "EXPORT_XSUB_SYMBOLS" keyword. See perlxs for details.

๐Ÿ›‘ Weakening read-only references ๐Ÿ›‘

Weakening read-only references is no longer permitted. It should never have worked anyway, and it could sometimes result in crashes. so yeah โ€” it's giving danger, bestie, don't do it.

๐Ÿชข Tying scalars that hold typeglobs ๐Ÿชข

Attempting to tie a scalar after a typeglob was assigned to it would instead tie the handle in the typeglob's IO slot. This meant it was impossible to tie the scalar itself. Similar problems affected "tied" and "untie": "tied $scalar" would return false on a tied scalar if the last thing returned was a typeglob, and "untie $scalar" on such a tied scalar would do nothing.

We fixed this problem before Perl 5.14.0, but it caused problems with some CPAN modules, so we put in a deprecation cycle instead.

Now the deprecation has been removed and this bug has been fixed. So "tie $scalar" will always tie the scalar, not the handle it holds. To tie the handle, use "tie *$scalar" (with an explicit asterisk). The same applies to "tied *$scalar" and "untie *$scalar".

๐Ÿ“ฆ IPC::Open3 no longer provides xfork(), xclose_on_exec() and xpipe_anon() ๐Ÿ“ฆ

All three functions were private, undocumented, and unexported. They do not appear to be used by any code on CPAN. Two have been inlined and one deleted entirely. they're just... gone, bestie ๐Ÿ’€

๐Ÿ”ข $$ no longer caches PID ๐Ÿ”ข

Previously, if you called fork(3) from C, Perl's notion of $$ could go out of sync with what getpid() returns. By always fetching the value of $$ via getpid(), this potential bug is eliminated. Code that depends on the caching behavior will break. As described in Core Enhancements, $$ is now writable, but it will be reset during a fork.

๐Ÿง $$ and getppid() no longer emulate POSIX semantics under LinuxThreads ๐Ÿง

The POSIX emulation of $$ and getppid() under the obsolete LinuxThreads implementation has been removed. This only impacts users of Linux 2.4 and users of Debian GNU/kFreeBSD up to and including 6.0, not the vast majority of Linux installations that use NPTL threads.

This means that getppid(), like $$, is now always guaranteed to return the OS's idea of the current state of the process, not perl's cached version of it.

See the documentation for $$ for details.

๐Ÿ’ธ $<, $>, $( and $) are no longer cached ๐Ÿ’ธ

Similarly to the changes to $$ and getppid(), the internal caching of $<, $>, $(, and $) has been removed.

When we cached these values, our idea of what they were would drift out of sync with reality if someone (e.g., someone embedding perl) called "sete?[ug]id()" without updating "PL_e?[ug]id". Having to deal with this complexity wasn't worth it, given how cheap the "gete?[ug]id()" system call is.

This change will break a handful of CPAN modules that use the XS-level "PL_uid", "PL_gid", "PL_euid", or "PL_egid" variables.

The fix for those breakages is to use "PerlProc_gete?[ug]id()" to retrieve them (e.g., PerlProc_getuid()), and not to assign to "PL_e?[ug]id" if you change the UID/GID/EUID/EGID. There is no longer any need to do so, since perl will always retrieve the up-to-date version of those values from the OS.

โœจ Which Non-ASCII characters get quoted by "quotemeta" and "\Q" has changed โœจ

This is unlikely to result in a real problem, as Perl does not attach special meaning to any non-ASCII character, so it is currently irrelevant which are quoted or not. This change fixes bug [perl #77654] and brings Perl's behavior more into line with Unicode's recommendations. See "quotemeta" in perlfunc.

๐Ÿ’– Performance Enhancements ๐Ÿ’–

  • Improved performance for Unicode properties in regular expressions โœจ

So matching a code point against a Unicode property? That used to be a linear search, and now it's a binary search, bestie. Which means, for example, the worst case for a 1000-item property is 10 probes instead of 1000. ๐Ÿ’…

In the past, this inefficiency was compensated for by permanently storing in a hash the results of a given probe plus the results for the adjacent 64 code points, under the theory that near-by code points are likely to be searched for. A separate hash was used for each mention of a Unicode property in each regular expression. So like, qr/\p{foo}abc\p{foo}/ would generate two hashes. Any probes in one instance would be unknown to the other, and the hashes could expand separately to be quite large if the regular expression were used on many different widely-separated code points. ๐Ÿ˜ญ But now? There's just one hash shared by all instances of a given property. So if \p{foo} is matched against "A" in one regular expression in a thread, the result will be known immediately to all regular expressions, and the relentless march of using up memory is slowed considerably. ๐Ÿ‘‘

  • Version declarations with the use keyword (like use 5.012) are now faster, because they enable features without loading feature.pm. lowkey iconic tbh.
  • local $_ is faster now, since it no longer iterates through magic that it is not going to copy anyway. no cap. โœจ
  • Perl 5.12.0 sped up the destruction of objects whose classes define empty DESTROY methods (to prevent autoloading), by simply not calling such empty methods. This release takes that optimization a step further, by not calling any DESTROY method that begins with a return statement. So useful for destructors that are only used for debugging:
use constant DEBUG => 1;
sub DESTROY { return unless DEBUG; ... }

Constant-folding will reduce the first statement to return; if DEBUG is set to 0, triggering this optimization. ๐ŸŽ€

  • Assigning to a variable that holds a typeglob or copy-on-write scalar is now much faster. Before, the typeglob would be stringified or the copy-on-write scalar would be copied before being clobbered. not anymore bestie ๐Ÿ’…
  • Assignment to substr in void context is now more than twice its previous speed. Instead of creating and returning a special lvalue scalar that is then assigned to, substr modifies the original string itself. ๐Ÿ”ฅ
  • substr no longer calculates a value to return when called in void context. efficiency queen ๐Ÿ‘‘
  • Due to changes in File::Glob, Perl's glob function and its <...> equivalent are now much faster. The splitting of the pattern into words has been rewritten in C, resulting in speed-ups of 20% for some cases.

This does not affect glob on VMS, because it does not use File::Glob.

  • The short-circuiting operators &&, ||, and //, when chained (like $a || $b || $c), are now considerably faster to short-circuit, thanks to reduced optree traversal. ๐Ÿฆ‹
  • The implementation of s///r makes one fewer copy of the scalar's value.
  • Recursive calls to lvalue subroutines in lvalue scalar context use less memory. ๐ŸŒธ

๐ŸŒˆ Modules and Pragmata ๐ŸŒˆ

๐Ÿฅ€ Deprecated Modules ๐Ÿฅ€

Version::Requirements

Version::Requirements is now DEPRECATED, use CPAN::Meta::Requirements, which is a drop-in replacement. It will be deleted from perl.git blead in v5.17.0. ๐Ÿ’€

โœจ New Modules and Pragmata โœจ

  • arybase โ€” this new module implements the $[ variable. ๐ŸŽ€
  • PerlIO::mmap 0.010 has been added to the Perl core.

The mmap PerlIO layer is no longer implemented by perl itself, but has been moved out into the new PerlIO::mmap module. moving out, main character energy ๐Ÿ’…

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

This is only an overview of selected module updates. For a complete list of updates, run:

$ corelist --diff 5.14.0 5.16.0

You can substitute your favorite version in place of 5.14.0, too. ๐Ÿซถ

  • Archive::Extract has been upgraded from version 0.48 to 0.58.

Includes a fix for FreeBSD to only use unzip if it is located in /usr/local/bin, as FreeBSD 9.0 will ship with a limited unzip in /usr/bin.

  • Archive::Tar has been upgraded from version 1.76 to 1.82.

Adjustments to handle files >8gb (>0777777777777 octal) and a feature to return the MD5SUM of files in the archive.

  • base has been upgraded from version 2.16 to 2.18.

base no longer sets a module's $VERSION to -1 when a module it loads does not define a $VERSION. This change has been made because -1 is not a valid version number under the new lax criteria used internally by UNIVERSAL::VERSION. (See version for more on lax version criteria.)

base no longer internally skips loading modules it has already loaded and instead relies on require to inspect %INC. This fixes a bug when base is used with code that clear %INC to force a module to be reloaded.

  • Carp has been upgraded from version 1.20 to 1.26.

It now includes last read filehandle info and puts a dot after the file and line number, just like errors from die [perl #106538].

  • charnames has been updated from version 1.18 to 1.30.

charnames can now be invoked with a new option, :loose, which is like the existing :full option, but enables Unicode loose name matching. Details are in "LOOSE MATCHES" in charnames.

  • B::Deparse has been upgraded from version 1.03 to 1.14. This fixes numerous deparsing bugs. ๐ŸŽ€
  • CGI has been upgraded from version 3.52 to 3.59.

It uses the public and documented FCGI.pm API in CGI::Fast. CGI::Fast was using an FCGI API that was deprecated and removed from documentation more than ten years ago. Usage of this deprecated API with FCGI >= 0.70 or FCGI <= 0.73 introduces a security issue. โš ๏ธ not cute โš ๏ธ

https://rt.cpan.org/Public/Bug/Display.html?id=68380 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-2766

Things that may break your code:

url() was fixed to return PATH_INFO when it is explicitly requested with either the path=>1 or path_info=>1 flag.

If your code is running under mod_rewrite (or compatible) and you are calling self_url() or you are calling url() and passing path_info=>1, these methods will actually be returning PATH_INFO now, as you have explicitly requested or self_url() has requested on your behalf.

The PATH_INFO has been omitted in such URLs since the issue was introduced in the 3.12 release in December, 2005.

This bug is so old your application may have come to depend on it or workaround it. Check for application before upgrading to this release. ๐Ÿ’€

Examples of affected method calls:

$q->url(-absolute => 1, -query => 1, -path_info => 1);
$q->url(-path=>1);
$q->url(-full=>1,-path=>1);
$q->url(-rewrite=>1,-path=>1);
$q->self_url();

We no longer read from STDIN when the Content-Length is not set, preventing requests with no Content-Length from sometimes freezing. This is consistent with the CGI RFC 3875, and is also consistent with CGI::Simple. However, the old behavior may have been expected by some command-line uses of CGI.pm.

In addition, the DELETE HTTP verb is now supported. slay. ๐Ÿ‘‘

  • Compress::Zlib has been upgraded from version 2.035 to 2.048.

IO::Compress::Zip and IO::Uncompress::Unzip now have support for LZMA (method 14). There is a fix for a CRC issue in IO::Compress::Unzip and it supports Streamed Stored context now. And fixed a Zip64 issue in IO::Compress::Zip when the content size was exactly 0xFFFFFFFF.

  • Digest::SHA has been upgraded from version 5.61 to 5.71.

Added BITS mode to the addfile method and shasum. This makes partial-byte inputs possible via files/STDIN and lets shasum check all 8074 NIST Msg vectors, where previously special programming was required to do this. 8074 bestie. ๐Ÿคฏ

  • Encode has been upgraded from version 2.42 to 2.44.

Missing aliases added, a deep recursion error fixed and various documentation updates.

Addressed 'decode_xs n-byte heap-overflow' security bug in Unicode.xs (CVE-2011-2939). (5.14.2) ๐Ÿ”ฅ

  • ExtUtils::CBuilder updated from version 0.280203 to 0.280206.

The new version appends CFLAGS and LDFLAGS to their Config.pm counterparts.

  • ExtUtils::ParseXS has been upgraded from version 2.2210 to 3.16.

Much of ExtUtils::ParseXS, the module behind the XS compiler xsubpp, was rewritten and cleaned up. It has been made somewhat more extensible and now finally uses strictures. finally. periodt.

The typemap logic has been moved into a separate module, ExtUtils::Typemaps. See "New Modules and Pragmata", above.

For a complete set of changes, please see the ExtUtils::ParseXS changelog, available on the CPAN.

  • File::Glob has been upgraded from version 1.12 to 1.17.

On Windows, tilde (~) expansion now checks the USERPROFILE environment variable, after checking HOME.

It has a new :bsd_glob export tag, intended to replace :glob. Like :glob it overrides glob with a function that does not split the glob pattern into words, but, unlike :glob, it iterates properly in scalar context, instead of returning the last file. ๐Ÿฆ‹

There are other changes affecting Perl's own glob operator (which uses File::Glob internally, except on VMS). See "Performance Enhancements" and "Selected Bug Fixes".

  • FindBin updated from version 1.50 to 1.51.

It no longer returns a wrong result if a script of the same name as the current one exists in the path and is executable.

  • HTTP::Tiny has been upgraded from version 0.012 to 0.017.

Added support for using $ENV{http_proxy} to set the default proxy host.

Adds additional shorthand methods for all common HTTP verbs, a post_form() method for POST-ing x-www-form-urlencoded data and a www_form_urlencode() utility method. ๐Ÿซถ

  • IO has been upgraded from version 1.25_04 to 1.25_06, and IO::Handle from version 1.31 to 1.33.
  • IO::Handle โ€” okay so together, these upgrades fix a problem with IO::Handle's getline and getlines methods. When you call these on the special ARGV handle, the next file gets automatically opened, same as what happens with the built-in <> and readline functions. But here's the thing โ€” unlike the built-ins, these methods were not respecting the caller's use of the open pragma and applying the appropriate I/O layers to the newly-opened file [rt.cpan.org #66474]. Rude, honestly, but fixed now. ๐Ÿ’…
  • IPC::Cmd โ€” upgraded from version 0.70 to 0.76.

Capturing of command output (both STDOUT and STDERR) is now supported using IPC::Open3 on MSWin32 without requiring IPC::Run. no extra dependency, we love that for us โœจ

  • IPC::Open3 โ€” upgraded from version 1.09 to 1.12.
    • Fixes a bug which prevented use of open3 on Windows when *STDIN, *STDOUT or *STDERR had been localized. ๐Ÿ˜ค
    • Fixes a bug which prevented duplicating numeric file descriptors on Windows.
    • open3 with - for the program name works once more. This was broken in version 1.06 (and hence in Perl 5.14.0) [perl #95748]. it's giving "we broke it and we're so sorry bestie" ๐Ÿ’€
  • Locale::Codes โ€” upgraded from version 3.16 to 3.21.
    • Added Language Extension codes (langext) and Language Variation codes (langvar) as defined in the IANA language registry.
    • Added language codes from ISO 639-5.
    • Added language/script codes from the IANA language subtag registry.
    • Fixed an uninitialized value warning [rt.cpan.org #67438].
    • Fixed the return value for the all_XXX_codes and all_XXX_names functions [rt.cpan.org #69100].
    • Reorganized modules to move Locale::MODULE to Locale::Codes::MODULE to allow for cleaner future additions. The original four modules (Locale::Language, Locale::Currency, Locale::Country, Locale::Script) will continue to work, but all new sets of codes will be added in the Locale::Codes namespace. glow up era ๐Ÿฆ‹
    • The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now support retired codes. All codesets may be specified by a constant or by their name now. Previously, they were specified only by a constant.
    • The alias_code function exists for backward compatibility. It has been replaced by rename_country_code. The alias_code function will be removed some time after September, 2013.
    • All work is now done in the central module (Locale::Codes). Previously, some was still done in the wrapper modules (Locale::Codes::*). Added Language Family codes (langfam) as defined in ISO 639-5.
  • Math::BigFloat โ€” upgraded from version 1.993 to 1.997.

The numify method has been corrected to return a normalized Perl number (the result of 0 + $thing), instead of a string [rt.cpan.org #66732].

  • Math::BigInt โ€” upgraded from version 1.994 to 1.998.
    • It provides a new bsgn method that complements the babs method.
    • It fixes the internal objectify function's handling of foreign objects so they are converted to the appropriate class (Math::BigInt or Math::BigFloat).
  • Math::BigRat โ€” upgraded from version 0.2602 to 0.2603.

int() on a Math::BigRat object containing -1/2 now creates a Math::BigInt containing 0, rather than -0. Math::BigInt does not even support negative zero, so the resulting object was actually malformed [perl #95530]. not the malformed object ๐Ÿ˜ญ

  • Math::Complex โ€” upgraded from version 1.56 to 1.59, and Math::Trig from version 1.2 to 1.22.

Fixes include: correct copy constructor usage; fix polarwise formatting with numeric format specifier; and more stable great_circle_direction algorithm. slay ๐Ÿ”ฅ

  • Module::CoreList โ€” upgraded from version 2.51 to 2.66.

The corelist utility now understands the -r option for displaying Perl release dates and the --diff option to print the set of modlib changes between two perl distributions.

  • Module::Metadata โ€” upgraded from version 1.000004 to 1.000009.

Adds provides method to generate a CPAN META provides data structure correctly; use of package_versions_from_directory is discouraged. ๐Ÿšซ

  • ODBM_File โ€” upgraded from version 1.10 to 1.12.

The XS code is now compiled with PERL_NO_GET_CONTEXT, which will aid performance under ithreads. we stan a performance queen ๐Ÿ‘‘

  • open โ€” upgraded from version 1.08 to 1.10.

It no longer turns off layers on standard handles when invoked without the :std directive. Similarly, when invoked with the :std directive, it now clears layers on STDERR before applying the new ones, and not just on STDIN and STDOUT [perl #92728].

  • overload โ€” upgraded from version 1.13 to 1.18.
    • overload::Overloaded no longer calls can on the class, but uses another means to determine whether the object has overloading. It was never correct for it to call can, as overloading does not respect AUTOLOAD. So classes that autoload methods and implement can no longer have to account for overloading [perl #40333].
    • A warning is now produced for invalid arguments. See "New Diagnostics" ๐Ÿซถ
  • PerlIO::scalar โ€” upgraded from version 0.11 to 0.14.

(This is the module that implements open $fh, '>', \$scalar.)

  • It fixes a problem with open my $fh, ">", \$scalar not working if $scalar is a copy-on-write scalar. (5.14.2)
  • It also fixes a hang that occurs with readline or <$fh> if a typeglob has been assigned to $scalar [perl #92258].
  • It no longer assumes during seek that $scalar is a string internally. If it didn't crash, it was close to doing so [perl #92706]. Also, the internal print routine no longer assumes that the position set by seek is valid, but extends the string to that position, filling the intervening bytes (between the old length and the seek position) with nulls [perl #78980]. close to crashing is not the vibe bestie ๐Ÿ˜ญ
  • Printing to an in-memory handle now works if the $scalar holds a reference, stringifying the reference before modifying it. References used to be treated as empty strings.
  • Printing to an in-memory handle no longer crashes if the $scalar happens to hold a number internally, but no string buffer.
  • Printing to an in-memory handle no longer creates scalars that confuse the regular expression engine [perl #108398].
  • Pod::Functions โ€” upgraded from version 1.04 to 1.05.

Functions.pm is now generated at perl build time from annotations in perlfunc.pod. This will ensure that Pod::Functions and perlfunc remain in synchronisation. periodt ๐Ÿ’…

  • Pod::Html โ€” upgraded from version 1.11 to 1.1502.

This is an extensive rewrite of Pod::Html to use Pod::Simple under the hood. The output has changed significantly. full glow-up, no cap โœจ

  • Pod::Perldoc โ€” upgraded from version 3.15_03 to 3.17.
    • It corrects the search paths on VMS [perl #90640]. (5.14.1)
    • The -v option now fetches the right section for $0.
    • This upgrade has numerous significant fixes. Consult its changelog on the CPAN for more information.
  • POSIX โ€” upgraded from version 1.24 to 1.30.
    • POSIX no longer uses AutoLoader. Any code which was relying on this implementation detail was buggy, and may fail because of this change. The module's Perl code has been considerably simplified, roughly halving the number of lines, with no change in functionality. The XS code has been refactored to reduce the size of the shared object by about 12%, with no change in functionality. More POSIX functions now have tests. we love a glow up that's also a diet ๐Ÿฆ‹
    • sigsuspend and pause now run signal handlers before returning, as the whole point of these two functions is to wait until a signal has arrived, and then return after it has been triggered. Delayed, or "safe", signals were preventing that from happening, possibly resulting in race conditions [perl #107216].
    • POSIX::sleep is now a direct call into the underlying OS sleep function, instead of being a Perl wrapper on CORE::sleep. POSIX::dup2 now returns the correct value on Win32 (i.e., the file descriptor). POSIX::SigSet sigsuspend and sigpending and POSIX::pause now dispatch safe signals immediately before returning to their caller.
    • POSIX::Termios::setattr now defaults the third argument to TCSANOW, instead of 0. On most platforms TCSANOW is defined to be 0, but on some 0 is not a valid parameter, which caused a call with defaults to fail.
  • Socket โ€” upgraded from version 1.94 to 2.001.

It has new functions and constants for handling IPv6 sockets:

pack_ipv6_mreq
unpack_ipv6_mreq
IPV6_ADD_MEMBERSHIP
IPV6_DROP_MEMBERSHIP
IPV6_MTU
IPV6_MTU_DISCOVER
IPV6_MULTICAST_HOPS
IPV6_MULTICAST_IF
IPV6_MULTICAST_LOOP
IPV6_UNICAST_HOPS
IPV6_V6ONLY

IPv6 besties we are SO back ๐ŸŒˆ

  • Storable โ€” upgraded from version 2.27 to 2.34.

It no longer turns copy-on-write scalars into read-only scalars when freezing and thawing.

  • Sys::Syslog โ€” upgraded from version 0.27 to 0.29.

This upgrade closes many outstanding bugs. ate and left no crumbs ๐Ÿ’…

  • Term::ANSIColor โ€” upgraded from version 3.00 to 3.01.

Only interpret an initial array reference as a list of colors, not any initial reference, allowing the colored function to work properly on objects with stringification defined.

  • Term::ReadLine โ€” upgraded from version 1.07 to 1.09.

Term::ReadLine now supports any event loop, including unpublished ones and simple IO::Select, loops without the need to rewrite existing code for any particular framework [perl #108470].

  • threads::shared โ€” upgraded from version 1.37 to 1.40.

Destructors on shared objects used to be ignored sometimes if the objects were referenced only by shared data structures. This has been mostly fixed, but destructors may still be ignored if the objects still exist at global destruction time [perl #98204]. mostly fixed is the most "we tried our best" energy ever ๐Ÿ˜ญ

  • Unicode::Collate โ€” upgraded from version 0.73 to 0.89.
    • Updated to CLDR 1.9.1
    • Locales updated to CLDR 2.0: mk, mt, nb, nn, ro, ru, sk, sr, sv, uk, zh__pinyin, zh__stroke
    • Newly supported locales: bn, fa, ml, mr, or, pa, sa, si, si__dictionary, sr_Latn, sv__reformed, ta, te, th, ur, wae.
    • Tailored compatibility ideographs as well as unified ideographs for the locales: ja, ko, zh__big5han, zh__gb2312han, zh__pinyin, zh__stroke.
    • Locale/*.pl files are now searched for in @INC.
  • Unicode::Normalize โ€” upgraded from version 1.10 to 1.14.
  • Fixes for the removal of unicore/CompositionExclusions.txt from core.
  • Unicode::UCD got glowed up from version 0.32 to 0.43. ๐Ÿ’…

And bestie, it brought four new functions with it: prop_aliases() and prop_value_aliases(), which you use to hunt down every Unicode-approved synonym for a property name, or to convert from one name to another; "prop_invlist", which hands you all the code points matching a given Unicode binary property; and "prop_invmap", which returns the complete specification of a given Unicode property. Iconic behavior, no notes.

  • Win32API::File leveled up from version 0.1101 to 0.1200.

Added SetStdHandle and GetStdHandle functions. Slay.


๐ŸŒˆ Removed Modules and Pragmata ๐ŸŒˆ

Okay so this is the sad part but it was literally promised. As stated in Perl 5.14.0's release notes, these modules are gone from the core distribution, and if you still need them you should install them from CPAN instead. It's giving "we broke up but you can still text me."

  • Devel::DProf has been removed from the Perl core. Prior version was 20110228.00.
  • Shell has been removed from the Perl core. Prior version was 0.72_01.
  • Several old perl4-style libraries which have been deprecated with 5.14 are now removed:
abbrev.pl assert.pl bigfloat.pl bigint.pl bigrat.pl cacheout.pl
complete.pl ctime.pl dotsh.pl exceptions.pl fastcwd.pl flush.pl
getcwd.pl getopt.pl getopts.pl hostname.pl importenv.pl
lib/find{,depth}.pl look.pl newgetopt.pl open2.pl open3.pl
pwd.pl shellwords.pl stat.pl tainted.pl termcap.pl timelocal.pl

They can be found on CPAN as Perl4::CoreLibs. ๐Ÿซถ


โœจ Documentation โœจ

๐Ÿ“š New Documentation ๐Ÿ“š

  • perldtrace

perldtrace describes Perl's DTrace support, listing all the probes it provides and giving you examples of how to actually use them. ๐Ÿ”ฅ

  • perlexperiment

This document is intended to provide a list of experimental features in Perl. It is still a work in progress โ€” so like, respect the journey, it's growing. ๐ŸŒฑ

  • perlootut

This is a new OO tutorial. It focuses on basic OO concepts first, and then recommends that readers go pick an OO framework from CPAN. Very "learn the vibe before you pick your aesthetic."

  • perlxstypemap

The new manual describes the XS typemapping mechanism in unprecedented detail โ€” like, detail nobody has ever seen before โ€” and combines new documentation with information extracted from perlxs plus the previously unofficial list of all core typemaps. The way that this doc ate and left no crumbs. ๐Ÿ’…

๐Ÿ”ง Changes to Existing Documentation ๐Ÿ”ง

  • perlapi
    • The HV API has long accepted negative lengths to show that the key is in UTF8. This is now documented. Finally, the lore is written down. ๐Ÿ“œ
    • The boolSV() macro is now documented.
  • perlfunc
    • "dbmopen" treats a 0 mode as a special case, and that prevents a nonexistent file from being created. This has been the case since Perl 5.000, but was never documented anywhere. Now the perlfunc entry mentions it [perl #90064]. The way this ancient secret was just sitting there undocumented for decades ๐Ÿ’€
    • As an accident of history, "open $fh, '<:', ..." applies the default layers for the platform (":raw" on Unix, ":crlf" on Windows), ignoring whatever is declared by open.pm. This seems like such a useful feature that it has been documented in perlfunc and open. Accidental icon behavior, we love to see it.
    • The entry for "split" has been rewritten. It is now far clearer than before. Bestie it needed it.
  • perlguts
    • A new section, Autoloading with XSUBs, has been added, which explains the two APIs for accessing the name of the autoloaded sub.
    • Some function descriptions in perlguts were confusing, because it was not clear whether they referred to the function above or below the description. This has been clarified [perl #91790]. No more guessing games, we're being specific now.
  • perlobj
    • This document has been rewritten from scratch, and its coverage of various OO concepts has been expanded. Full makeover era. โœจ
  • perlop
    • Documentation of the smartmatch operator has been reworked and moved from perlsyn to perlop, where it belongs. It has also been corrected for the case of "undef" on the left-hand side. The list of different smart match behaviors had an item in the wrong place. Not me fixing the placement issue ๐Ÿ˜ญ
    • Documentation of the ellipsis statement ("...") has been reworked and moved from perlop to perlsyn.
    • The explanation of bitwise operators has been expanded to explain how they work on Unicode strings (5.14.1).
    • More examples for "m//g" have been added (5.14.1).
    • The "<<\FOO" here-doc syntax has been documented (5.14.1).
  • perlpragma
    • There is now a standard convention for naming keys in the "%^H", documented under Key naming. Structure? We love her. ๐ŸŽ€
  • "Laundering and Detecting Tainted Data" in perlsec
    • The example function for checking for taintedness contained a subtle error. $@ needs to be localized to prevent its changing this global's value outside the function. The preferred method to check for this remains "tainted" in Scalar::Util. Subtle bug caught, no cap. ๐Ÿ”
  • perllol
    • perllol has been expanded with examples using the new "push $scalar" syntax introduced in Perl 5.14.0 (5.14.1).
  • perlmod
    • perlmod now states explicitly that some types of explicit symbol table manipulation are not supported. This codifies what was effectively already the case [perl #78074]. It was always true, bestie, now it's just in writing.
  • perlpodstyle
    • The tips on which formatting codes to use have been corrected and greatly expanded.
    • There are now a couple of example one-liners for previewing POD files after they have been edited. Handy fr fr.
  • perlre
    • The "(*COMMIT)" directive is now listed in the right section (Verbs without an argument). Everything in its correct home, as it should be. ๐Ÿ 
  • perlrun
    • perlrun has undergone a significant clean-up. Most notably, the -0x... form of the -0 flag has been clarified, and the final section on environment variables has been corrected and expanded (5.14.1).
  • perlsub
    • The ($;) prototype syntax, which has existed for rather a long time, is now documented in perlsub. It lets a unary function have the same precedence as a list operator. Ancient syntax finally getting its documentation moment. ๐Ÿ‘‘
  • perltie
    • The required syntax for tying handles has been documented.
  • perlvar
    • The documentation for $! has been corrected and clarified. It used to state that $! could be "undef", which is not the case. It was also unclear whether system calls set C's "errno" or Perl's $! [perl #91614]. We're clearing that confusion upppp.
    • Documentation for $$ has been amended with additional cautions regarding changing the process ID. โš ๏ธ Be careful with that one, bestie.

๐ŸŒธ Other Changes ๐ŸŒธ

  • perlxs was extended with documentation on inline typemaps.
  • perlref has a new Circular References section explaining how circularities may not be freed and how to solve that with weak references. This one is so useful, go read it.
  • Parts of perlapi were clarified, and Perl equivalents of some C functions have been added as an additional mode of exposition.
  • A few parts of perlre and perlrecharclass were clarified.

๐Ÿ’€ Removed Documentation ๐Ÿ’€

๐Ÿ“ฆ Old OO Documentation ๐Ÿ“ฆ

The old OO tutorials, perltoot, perltooc, and perlboot, have been removed. The perlbot (bag of object tricks) document has been removed as well. Rest in peace to the old guard. ๐Ÿ•ฏ๏ธ

๐Ÿงš Development Deltas ๐Ÿงš

The perldelta files for development releases are no longer packaged with perl. These can still be found in the perl source code repository. So like, it's not gone gone, you just have to go looking for it. ๐Ÿฆ‹

โœจ Diagnostics โœจ

Okay bestie, so these are the additions and changes to diagnostic output, which includes your warnings and your fatal error messages. And if you want the complete, exhaustive list of diagnostic messages? That lives in perldiag. Go check it out. ๐Ÿ’–

๐Ÿฉท New Diagnostics ๐Ÿฉท

๐Ÿšจ New Errors ๐Ÿšจ

  • Cannot set tied @DB::args โ€” this one pops off when caller tries to set @DB::args but finds it tied. And honestly? Before this error existed, it would just crash instead. So this is a glow-up, fr. ๐Ÿ’…
  • Cannot tie unreifiable array โ€” this is part of a safety check that the tie operator runs before it ties a special array like @_. You should literally never see this message. It's a ghost. ๐Ÿ™ˆ
  • &CORE::%s cannot be called directly โ€” happens when a subroutine in the CORE:: namespace gets called with &foo syntax or through a reference. Some subroutines in this package just cannot be called that way yet, bestie โ€” they must be called as barewords. See "Subroutines in the "CORE" namespace", above. ๐Ÿ‘‘
  • Source filters apply only to byte streams โ€” this new error shows up when you try to activate a source filter (usually by loading a source filter module) inside a string passed to eval under the unicode_eval feature. Byte streams only, no cap. ๐ŸŒธ

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

  • defined(@array) is deprecated โ€” the long-deprecated defined(@array) now also warns for package variables. Before, it only issued a warning for lexical variables. So yeah, it's coming for you everywhere now. ๐Ÿ’€
  • length() used on %s โ€” new warning, fires when length is used on an array or hash instead of doing scalar(@array) or scalar(keys %hash). Bestie, that's not how length works, periodt.
  • lvalue attribute %s already-defined subroutine โ€” attributes.pm now emits this when the :lvalue attribute gets applied to a Perl subroutine that's already been defined. Why? Because doing that can have unexpected side-effects. Not the vibe you want. ๐Ÿ˜ญ
  • overload arg '%s' is invalid โ€” in the overload category, this one shows up when the overload pragma is handed an argument it doesn't recognize โ€” presumably a mistyped operator. Typo era. ๐Ÿ™ˆ
  • $[ used in %s (did you mean $] ?) โ€” this new warning is here to catch the accidental use of $[ in version checks. Just FYI: $], NOT $[, is the one that contains the version number. iykyk. ๐Ÿ’…
  • Useless assignment to a temporary โ€” assigning to a temporary scalar returned from an lvalue subroutine now produces this warning [perl #31946]. It's giving unhinged behavior, ngl.
  • Useless use of \E โ€” because \E does absolutely nothing unless it's preceded by \Q, \L or \U. It's literally just sitting there. โœจ

๐Ÿ’” Removed Errors ๐Ÿ’”

  • "sort is now a reserved word" โ€” okay so this error used to occur when sort was called without arguments, followed by ; or ). (Like, sort; would die, but {sort} was OK.) This error message was added in Perl 3 to catch code like close(sort) which would no longer work. More than two decades later, this message is no longer appropriate. Now sort without arguments is always allowed, and returns an empty list โ€” just like it did in those cases where it was already allowed [perl #90030]. She's retired, queens. ๐Ÿ‘‘

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

  • The Applying pattern match... or similar warning produced when an array or hash is on the left-hand side of the =~ operator now mentions the name of the variable. Name-dropping, but make it diagnostics. ๐Ÿ’…
  • The Attempt to free non-existent shared string has had the spelling of "non-existent" corrected to "nonexistent". It was already listed with the correct spelling in perldiag (so we were early, actually). ๐Ÿ™ˆ
  • The error messages for using default and when outside a topicalizer have been standardized to match the messages for continue and loop controls. They now read Can't "default" outside a topicalizer and Can't "when" outside a topicalizer. They both used to be Can't use when() outside a topicalizer [perl #91514]. Glow-up unlocked. โœจ
  • The message Code point 0x%X is not Unicode, no properties match it; all inverse properties do has been changed to Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed. Same energy, way more clear.
  • Redefinition warnings for constant subroutines used to be mandatory โ€” like, even occurring under no warnings. Now they respect the warnings pragma. Finally, she listens. ๐Ÿซถ
  • The glob failed warning message is now suppressible via no warnings [perl #111656].
  • The Invalid version format error message now says negative version number within the parentheses, rather than non-numeric data, for negative numbers. Specificity slay. ๐Ÿ’–
  • The two warnings Possible attempt to put comments in qw() list and Possible attempt to separate words with commas are no longer mutually exclusive: the same qw construct may produce both. Double the warning, double the fun. ๐Ÿ˜ญ
  • The uninitialized warning for y///r when $_ is implicit and undefined now mentions the variable name, just like the non-/r variation of the operator. Consistency is the moment. ๐ŸŒˆ
  • The Use of "foo" without parentheses is ambiguous warning has been extended to apply also to user-defined subroutines with a (;$) prototype, and not just to built-in functions. She's inclusive now. ๐Ÿ’œ
  • Warnings that mention the names of lexical (my) variables with Unicode characters in them now respect the presence or absence of the :utf8 layer on the output handle, instead of outputting UTF8 regardless. Also โ€” and this is the important part โ€” the correct names are included in the strings passed to $SIG{__WARN__} handlers, rather than the raw UTF8 bytes. We fixed the encoding situation, bestie. ๐ŸŽ€

๐Ÿ› ๏ธ Utility Changes ๐Ÿ› ๏ธ

h2ph ๐Ÿธ

  • h2ph used to generate code of the form:
unless(defined(&FOO)) {
  sub FOO () {42;}
}

But plot twist โ€” the subroutine is a compile-time declaration, and is hence unaffected by the condition. Not me realizing it did nothing. ๐Ÿ˜ญ So it's now been corrected to emit a string eval around the subroutine [perl #99368]. Slay.

splain ๐Ÿ—ฃ๏ธ

  • splain no longer emits backtraces with the first line number repeated. Like, this:
Uncaught exception from user code:
        Cannot fwiddle the fwuddle at -e line 1.
 at -e line 1
        main::baz() called at -e line 1
        main::bar() called at -e line 1
        main::foo() called at -e line 1

has become this:

Uncaught exception from user code:
        Cannot fwiddle the fwuddle at -e line 1.
        main::baz() called at -e line 1
        main::bar() called at -e line 1
        main::foo() called at -e line 1

Look at all that reclaimed space. Obsessed. โœจ

  • Some error messages consist of multiple lines that are listed as separate entries in perldiag. splain has been taught to find the separate entries in these cases, instead of simply failing to find the message. She studied. She passed. ๐Ÿ‘‘

zipdetails ๐Ÿ—œ๏ธ

  • This is a new utility, included as part of an IO::Compress::Base upgrade.

zipdetails displays information about the internal record structure of the zip file. It is not concerned with displaying any details of the compressed data stored in the zip file. Structural tea only, no data gossip. ๐Ÿซ–


๐Ÿ”ง Configuration and Compilation ๐Ÿ”ง

  • regexp.h has been modified for compatibility with GCC's -Werror option, as used by some projects that include perl's header files (5.14.1).
  • USE_LOCALE{,_COLLATE,_CTYPE,_NUMERIC} have been added the output of perl -V as they have affect the behavior of the interpreter binary (albeit in only a small area). Little area, real impact. ๐Ÿ’…
  • The code and tests for IPC::Open2 have been moved from ext/IPC-Open2 into ext/IPC-Open3, as IPC::Open2::open2() is implemented as a thin wrapper around IPC::Open3::_open3(), and hence is very tightly coupled to it. They're inseparable, your honor. ๐Ÿซถ
  • The magic types and magic vtables are now generated from data in a new script regen/mg_vtable.pl, instead of being maintained by hand. As different EBCDIC variants can't agree on the code point for ~, the character to code point conversion is done at build time by generate_uudmap to a new generated header mg_data.h. PL_vtbl_bm and PL_vtbl_fm are now defined by the pre-processor as PL_vtbl_regexp, instead of being distinct C variables. PL_vtbl_sig has been removed. The hand-maintenance era is over, bestie. ๐Ÿ™ˆ
  • Building with -DPERL_GLOBAL_STRUCT works again. This configuration is not generally used. (It's giving niche, and we respect it.)
  • Perl configured with MAD now correctly frees MADPROP structures when OPs are freed. MADPROPs are now allocated with PerlMemShared_malloc(). Memory leaks found dead, no cap. ๐Ÿ’€
  • makedef.pl has been refactored. This should have no noticeable effect on any of the platforms that use it as part of their build (AIX, VMS, Win32). Chill change, tbh.
  • useperlio can no longer be disabled. Periodt. ๐ŸŽ€
  • The file global.sym is no longer needed, and has been removed. It contained a list of all exported functions, one of the files generated by regen/embed.pl from data in embed.fnc and regen/opcodes. The code has been refactored so that the only user of global.sym, makedef.pl, now reads embed.fnc and regen/opcodes directly, removing the need to store the list of exported functions in an intermediate file.

As global.sym was never installed, this change should not be visible outside the build process. Silent but mighty. โœจ

  • pod/buildtoc, used by the build process to build perltoc, has been refactored and simplified. It now contains only code to build perltoc; the code to regenerate Makefiles has been moved to Porting/pod_rules.pl. It's a bug if this change has any material effect on the build process. (So like, if it does? That's a bug. Not a feature. ๐Ÿ˜ญ)
  • pod/roffitall is now built by pod/buildtoc, instead of being shipped with the distribution. Its list of manpages is now generated (and therefore current). See also RT #103202 for an unresolved related issue. ๐Ÿ‘€
  • The man page for XS::Typemap is no longer installed. XS::Typemap is a test module which is not installed, hence installing its documentation makes no sense. Bestie why were we documenting a thing that isn't even there. ๐Ÿ™ˆ
  • The -Dusesitecustomize and -Duserelocatableinc options now work together properly. The collab we've been waiting for. ๐Ÿซถ

๐ŸŒ€ Platform-Specific Notes

๐Ÿง Cygwin

  • bestie, ever since version 1.7 Cygwin supports native UTF-8 paths. So if Perl gets built under that environment, all your directory names and filenames are UTF-8 encoded. slay.
  • Cygwin does not initialize all the original Win32 environment variables, which is lowkey a whole thing. Go read README.cygwin for the full tea on the newly-added Cygwin::sync_winenv() function [perl #110190] plus more links. ๐Ÿ“š

๐Ÿ’œ HP-UX

  • HP-UX PA-RISC/64 now supports gcc-4.x. A fix correcting the socketsize means the test suite finally passes on HP-UX PA-RISC for 64bitall builds. we love a passing suite. (5.14.2)

๐Ÿฆ‹ VMS

  • Unnecessary includes? removed. Misc compiler warnings? fixed. Some unclosed comments in vms/vms.c? closed. it's giving cleanup era.
  • The sockadapt layer has been removed from the VMS build.
  • Explicit support for VMS versions before v7.0 and DEC C versions before v6.0? gone. no cap.
  • Okay so this one's been lurking since Perl 5.10.1: the home-grown stat wrapper couldn't tell apart a directory name containing an underscore from an otherwise-identical filename containing a dot in that same position (think t/test_pl as a directory vs t/test.pl as a file ๐Ÿ˜ญ). That problem has now been corrected.
  • The VMS build now lets names of resulting symbols in C code for Perl be longer than 31 characters. Symbols like Perl__it_was_the_best_of_times_it_was_the_worst_of_times can be created freely now without making the VMS linker seize up. iconic.

๐Ÿงš GNU/Hurd

  • Numerous build and test failures on GNU/Hurd have been resolved, with hints for building DBM modules, detection of the library search path, and enabling of large file support. ๐Ÿ’…

๐Ÿ‘‘ OpenVOS

  • Perl is now built with dynamic linking on OpenVOS, and the minimum supported version of it is now Release 17.1.0.

๐ŸŒž SunOS

The CC workshop C++ compiler is now detected and used on systems that ship without cc. periodt.


๐Ÿ”ง Internal Changes ๐Ÿ”ง

  • The compiled representation of formats is now stored via the mg_ptr of their PERL_MAGIC_fm. Before, it lived in the string buffer, past SvLEN(), i.e. past the regular end of the string. SvCOMPILED() and SvCOMPILED_{on,off}() now exist solely for compatibility with XS code โ€” the first is always 0, and the other two are now no-ops. (5.14.1)
  • Some global variables have been marked const, members in the interpreter structure have been re-ordered, and the opcodes have been re-ordered too. Also, the op OP_AELEMFAST has been split into OP_AELEMFAST and OP_AELEMFAST_LEX.
  • When you empty a hash of its elements (like via undef(%h), or %h=()), the HvARRAY field is no longer temporarily zeroed. Any destructors called on the freed elements now see the remaining elements. So %h=() becomes more like delete $h{$_} for keys %h.
  • Boyer-Moore compiled scalars are now PVMGs, and the Boyer-Moore tables are stored via the mg_ptr of their PERL_MAGIC_bm. Previously they were PVGVs, with the tables stored in the string buffer, beyond SvLEN(). This eliminates the last place where the core stores data beyond SvLEN(). ๐Ÿ’€
  • Simplified logic in Perl_sv_magic() introduces a small behavior change for error cases involving unknown magic types. Before, if Perl_sv_magic() got a magic type unknown to it, it would:
    1. Croak "Modification of a read-only value attempted" if read only.
    2. Return without error if the SV happened to already have this magic.
    3. Otherwise croak "Don't know how to handle magic of type \\%o".

Now it will always croak "Don't know how to handle magic of type \\%o", even on read-only values, or on SVs which already have the unknown magic type.

  • The experimental fetch_cop_label function has been renamed to cop_fetch_label.
  • The cop_store_label function has been added to the API, but heads up โ€” it's experimental.
  • embedvar.h has been simplified, and one level of macro indirection for PL_* variables has been removed for the default (non-multiplicity) configuration. The PERLVAR*() macros now directly expand their arguments to tokens such as PL_defgv, instead of expanding to PL_Idefgv, with embedvar.h defining a macro to map PL_Idefgv to PL_defgv. So XS code that has unwarranted chumminess with the implementation may need updating. ๐Ÿ™ˆ
  • An API has been added to explicitly choose whether to export XSUB symbols. More detail lives in the comments for commit e64345f8.
  • The is_gv_magical_sv function has been eliminated and merged with gv_fetchpvn_flags. It used to be called to determine whether a GV should be autovivified in rvalue context. Now it's been replaced with a new GV_ADDMG flag (which is not part of the API).
  • The returned code point from the function utf8n_to_uvuni() โ€” when the input is malformed UTF-8, malformations are allowed, and utf8 warnings are off โ€” is now the Unicode REPLACEMENT CHARACTER whenever the malformation is such that no well-defined code point can be computed. Previously the returned value was essentially garbage. The only malformations that have well-defined values are a zero-length string (0 is the return) and overlong UTF-8 sequences.
  • Padlists are now marked AvREAL, i.e. reference-counted. They've always been reference-counted, but weren't marked real, because pad.c did its own clean-up instead of using the usual clean-up code in sv.c. That caused problems in thread cloning, so now the AvREAL flag is on โ€” but it's turned off in pad.c right before the padlist is freed (after pad.c has done its custom freeing of the pads).
  • All C files that make up the Perl core have been converted to UTF-8. โœจ
  • These new functions have been added as part of the work on Unicode symbols:
HvNAMELEN
HvNAMEUTF8
HvENAMELEN
HvENAMEUTF8
gv_init_pv
gv_init_pvn
gv_init_pvsv
gv_fetchmeth_pv
gv_fetchmeth_pvn
gv_fetchmeth_sv
gv_fetchmeth_pv_autoload
gv_fetchmeth_pvn_autoload
gv_fetchmeth_sv_autoload
gv_fetchmethod_pv_flags
gv_fetchmethod_pvn_flags
gv_fetchmethod_sv_flags
gv_autoload_pv
gv_autoload_pvn
gv_autoload_sv
newGVgen_flags
sv_derived_from_pv
sv_derived_from_pvn
sv_derived_from_sv
sv_does_pv
sv_does_pvn
sv_does_sv
whichsig_pv
whichsig_pvn
whichsig_sv
newCONSTSUB_flags

The gv_fetchmethod_*_flags functions, like gv_fetchmethod_flags, are experimental and may change in a future release.

  • The following functions were added. These are not part of the API:
GvNAMEUTF8
GvENAMELEN
GvENAME_HEK
CopSTASH_flags
CopSTASH_flags_set
PmopSTASH_flags
PmopSTASH_flags_set
sv_sethek
HEKfARG

There's also a HEKf macro corresponding to SVf, for interpolating HEKs in formatted strings.

  • sv_catpvn_flags takes a couple of new internal-only flags, SV_CATBYTES and SV_CATUTF8, which tell it whether the char array being concatenated is UTF8. This allows for more efficient concatenation than creating temporary SVs to pass to sv_catsv.
  • For XS AUTOLOAD subs, $AUTOLOAD is set once more, just like it was in 5.6.0. This is in addition to setting SvPVX(cv), for compatibility with 5.8 to 5.14. See "Autoloading with XSUBs" in perlguts.
  • Perl now checks whether the array (the linearized isa) returned by an MRO plugin begins with the name of the class itself, for which the array was created, instead of just assuming that it does. This stops the first element from being skipped during method lookup. It also means mro::get_linear_isa may return an array with one more element than the MRO plugin provided [perl #94306].
  • PL_curstash is now reference-counted.
  • There are now feature bundle hints in PL_hints ($^H) that version declarations use, so we don't have to load feature.pm. One setting of the hint bits indicates a "custom" feature bundle, which means the entries in %^H still apply. feature.pm uses that.

The HINT_FEATURE_MASK macro is defined in perl.h along with other hints. Other macros for setting and testing features and bundles are in the new feature.h. FEATURE_IS_ENABLED (which has moved to feature.h) is no longer used throughout the codebase, but instead more specific macros, e.g. FEATURE_SAY_IS_ENABLED, that are defined in feature.h.

  • lib/feature.pm is now a generated file, created by the new regen/feature.pl script, which also generates feature.h.
  • Tied arrays are now always AvREAL. If @_ or DB::args is tied, it's reified first, to make sure this is always the case.
  • Two new functions, utf8_to_uvchr_buf() and utf8_to_uvuni_buf(), have been added. These are the same as utf8_to_uvchr and utf8_to_uvuni (which are now deprecated), but they take an extra parameter that's used to guard against reading beyond the end of the input string. See "utf8_to_uvchr_buf" in perlapi and "utf8_to_uvuni_buf" in perlapi.
  • The regular expression engine now does TRIE case insensitive matches under Unicode. This may change the output of use re 'debug';, and it will speed up various things. ๐Ÿ”ฅ
  • There's a new wrap_op_checker() function, which provides a thread-safe alternative to writing to PL_check directly.

๐Ÿ› Selected Bug Fixes ๐Ÿ›

๐Ÿ“ Array and hash

  • A bug has been fixed that would cause a "Use of freed value in iteration" error if the next two hash elements that would be iterated over are deleted [perl #85026]. (5.14.1)
  • Deleting the current hash iterator (the hash element that would be returned by the next call to each) in void context used to not free it [perl #85026]. fixed bestie.
  • Deletion of methods via delete $Class::{method} syntax used to update method caches if called in void context, but not in scalar or list context.
  • When hash elements are deleted in void context, the internal hash entry is now freed before the value is freed, to prevent destructors called by that latter freeing from seeing the hash in an inconsistent state. It was possible to cause double-frees if the destructor freed the hash itself [perl #100340]. ๐Ÿ˜ญ
  • A keys optimization from Perl 5.12.0 (it was just trying to make keys go faster on empty hashes ๐Ÿฅบ) had the side effect of making each not reset the iterator if you called it after the last element got deleted. Yeah. That. Fixed now.
  • Freeing deeply nested hashes doesn't crash anymore [perl #44225]. ๐Ÿ’€โžก๏ธ๐Ÿ˜Œ
  • So from XS code you can totally create hashes whose elements have no values at all. And the hash element & slice operators used to crash when they had to handle those in lvalue context ๐Ÿ˜ญ. Now they give you a nice little <hotpink>Modification of non-creatable hash value attempted</hotpink> error message instead. Much better behavior, still an error, periodt.
  • If list assignment to a hash or array triggered destructors that freed the hash or array *itself*โ€ฆ crash city. No more [perl #107440]. ๐ŸŽ€
  • Fun one: it used to be possible to free the typeglob of a localized array or hash (like local @{"x"}; delete $::{x}), and then ๐Ÿ’ฅ crash on scope exit. Gone.
  • Some core bugs that were messing with Hash::Util got fixed too: locking a hash element that's a glob copy no longer makes the next assignment to it corrupt the glob (that's the 5.14.2 fix โœจ), and unlocking a hash element holding a copy-on-write scalar no longer causes modifications to that scalar to leak into other scalars sharing the same string buffer. the way that would have been a nightmare, bestie.

๐Ÿ’– C API fixes ๐Ÿ’–

  • The newHVhv XS function now actually works on tied hashes, instead of crashing or handing you back an empty hash. iconic.
  • The SvIsCOW C macro now returns false for read-only copies of typeglobs, like the ones you get from:
$hash{elem} = *foo;
Hash::Util::lock_value %hash, 'elem';

It used to return true. ๐Ÿ™ˆ

  • The SvPVutf8 C function no longer tries to modify its own argument, which was producing errors [perl #108994].
  • SvPVutf8 now works properly with magical variables โœจ
  • SvPVbyte now works properly on non-PVs โœจ
  • When it got malformed UTF-8 input, the XS-callable functions is_utf8_string(), is_utf8_string_loc(), and is_utf8_string_loclen() could read up to 12 bytes past the end of the input string ๐Ÿ˜ญ. That no longer happens. [perl #32080]. However, heads up: is_utf8_char() still has this defect, see "is_utf8_char()" above.
  • The C-level pregcomp function could get its wires crossed about whether the pattern was in UTF8 if the pattern was an overloaded, tied, or otherwise magical scalar [perl #101940].

๐Ÿง  Compile-time hints ๐Ÿง 

  • Tying %^H no longer makes perl crash or just ignore what's in %^H when entering a compilation scope [perl #106282].
  • eval $string and require used to not localize %^H during compilation if it was empty at the time the eval call itself got compiled ๐Ÿ‘€. And that could lead to genuinely scary side effects, like use re "/m" enabling other flags that the surrounding code was trying to set up for its caller [perl #68750]. yikes.
  • eval $string and require no longer localize hints ($^H and %^H) at run time โ€” only during compilation of the $string or the required file. This makes BEGIN { $^H{foo}=7 } equivalent to BEGIN { eval '$^H{foo}=7' } [perl #70151]. slay.
  • Creating a BEGIN block from XS code (via newXS or newATTRSUB) would, on completion, make the hints of the current compiling code the current hints. Which could cause warnings to pop up in a non-warning scope ๐Ÿ™ƒ no thanks. Fixed.

๐Ÿฆ‹ Copy-on-write scalars ๐Ÿฆ‹

Copy-on-write or shared hash key scalars got introduced way back in 5.8.0, but most Perl code never ran into them (they were mostly an internal thing). Then Perl 5.10.0 extended them, so that assigning __PACKAGE__ or a hash key to a scalar would make it copy-on-write. And lowkey several parts of Perl were never updated to account for that. They have now been fixed ๐Ÿ’…

  • utf8::decode had a nasty bug that modified copy-on-write scalars' string buffers in place (i.e. it skipped the copy ๐Ÿ˜ญ). This could result in hashes ending up with two elements with the same key [perl #91834]. (5.14.2)
  • Lvalue subroutines weren't allowing COW scalars to be returned. This got fixed for lvalue scalar context back in Perl 5.12.3 and 5.14.0, but list context wasn't fixed until this release. โœจ
  • Elements of restricted hashes (see the fields pragma) containing copy-on-write values couldn't be deleted, and you couldn't clear such hashes either (%hash = ()). (5.14.2)
  • Localizing a tied variable used to make it read-only if it contained a copy-on-write string. (5.14.2)
  • Assigning a copy-on-write string to a stash element no longer causes a double free. Regardless of this change, the results of such assignments are still undefined. ๐Ÿšจ (yes, still. don't.)
  • Assigning a copy-on-write string to a tied variable no longer stops that variable from being tied if it happens to be a PVMG or PVLV internally.
  • Doing a substitution on a tied variable that returned a copy-on-write scalar used to cause an assertion failure or an Attempt to free nonexistent shared string warning. ๐Ÿ˜ญ gone.
  • This one's a regression from 5.12: in 5.14.0, the bitwise assignment operators |=, ^= and &= started leaving the left-hand side undefined if it happened to be a copy-on-write string [perl #108480].
  • Storable, Devel::Peek and PerlIO::scalar had similar problems. See "Updated Modules and Pragmata", above. ๐Ÿซถ

๐ŸŽ€ The debugger ๐ŸŽ€

  • dumpvar.pl โ€” and therefore the x command in the debugger โ€” has been fixed to handle objects blessed into classes whose names contain =. The contents of such objects used to justโ€ฆ not get dumped [perl #101814]. not me finding out my objects were invisible ๐Ÿ’€
  • The R command for restarting a debugger session now works on Windows, or any other system lacking a POSIX::_SC_OPEN_MAX constant [perl #87740].
  • The #line 42 foo directive used to not update the arrays of lines the debugger uses if it showed up inside a string eval. That got partially fixed in 5.14, but it only worked for a single #line 42 foo per eval. Now it works for multiple. ๐Ÿ”ฅ
  • When subroutine calls get intercepted by the debugger, the name of the subroutine (or a reference to it) is stored in $DB::sub so the debugger can reach it. Sometimes (like with $foo = *bar; undef *bar; &$foo) $DB::sub would be set to a name that couldn't be used to find the subroutine, so the debugger's attempt to call it would just fail ๐Ÿ˜ญ. The check for whether a reference is needed is more robust now, so those problems shouldn't happen anymore [rt.cpan.org #69862].
  • Every subroutine has a filename associated with it that the debugger uses. The one associated with constant subroutines used to be misallocated when cloned under threads. So debugging threaded applications could result in memory corruption [perl #96126]. genuinely terrifying. fixed now though ๐Ÿซถ

๐Ÿ‘‘ Dereferencing operators ๐Ÿ‘‘

  • defined(${"..."}), defined(*{"..."}), etc., used to return true for most โ€” but not all โ€” built-in variables, if they hadn't been used yet. This bug affected ${^GLOBAL_PHASE} and ${^UTF8CACHE}, among others. It also used to return false if the package name was given as well (${"::!"}) [perl #97978, #97492].
  • Perl 5.10.0 introduced a similar bug: defined(*{"foo"}) where "foo" is the name of a built-in global variable used to return false if the variable had never been used before โ€” but only on the first call ๐Ÿ‘€. That's fixed too.
  • Ever since 5.6.0, *{ ... } has been inconsistent about how it treats undefined values. It would die in strict mode or lvalue context for most undefined values, but would be treated as the empty string (with a warning) for the specific scalar returned by undef() (&PL_sv_undef internally). This is corrected now. undef() is treated like other undefined scalars, same as in Perl 5.005. periodt.

๐ŸŒธ Filehandle, last-accessed ๐ŸŒธ

Perl has an internal variable that stores the last filehandle to be accessed. It's what $. uses, plus tell and eof when they're called with no arguments.

  • It used to be possible to set this internal variable to a glob copy, then modify that glob copy into something that's not a glob, and still have the last-accessed filehandle stay associated with the variable after you assigned a glob to it again:
my $foo = *STDOUT;  # $foo is a glob copy
<$foo>;             # $foo is now the last-accessed handle
$foo = 3;           # no longer a glob
$foo = *STDERR;     # still the last-accessed handle

Now the $foo = 3 assignment unsets that internal variable, so there's no last-accessed filehandle at all โ€” just as if <$foo> had never happened. โœจ

This also prevents some unrelated handle from quietly becoming the last-accessed handle if $foo falls out of scope and the same internal SV gets reused for another handle [perl #97988].

  • A regression in 5.14 made these statements not set that internal variable:
my $fh = *STDOUT;
tell $fh;
eof  $fh;
seek $fh, 0,0;
tell     *$fh;
eof      *$fh;
seek     *$fh, 0,0;
readline *$fh;

That's fixed now ๐ŸŽ‰ โ€” but tell *{ *$fh } still has the problem, and it's not clear how to fix it [perl #106536]. ๐Ÿ’€ iykyk.


โญ Filetests and stat โญ

Okay vocab check bestie: "filetests" = the operators made of a hyphen plus a single letter: -r, -x, -M, etc. And "stacked" (when you're talking filetests) = followed by another filetest operator sharing the same operand, like -r -x -w $fooo.

  • stat produces more consistent warnings now. It no longer warns for _ [perl #71002], and it no longer sometimes skips the warning for other unopened handles. It also no longer warns about an unopened handle when the operating system's fstat function fails.
  • stat would sometimes return negative numbers for large inode numbers, because it was using the wrong internal C type ๐Ÿ˜ญ [perl #84590].
  • lstat is documented to fall back to stat (with a warning) when it's given a filehandle. When passed an IO reference, it was actually doing the equivalent of stat _ and just ignoring the handle. ๐Ÿ™ˆ
  • -T _ with no preceding stat used to throw a confusing uninitialized warning, even though there's no visible uninitialized value to speak of. rude.
  • -T, -B, -l and -t now work when stacked with other filetest operators [perl #77388]. ๐Ÿฆ‹
  • In 5.14.0, filetest ops (-r, -x, etc.) started calling FETCH on a tied argument belonging to the previous argument to a list operator, if they were called with a bareword argument or no argument at all. Fixed ๐ŸŽ€ โ€” so push @foo, $tied, -r no longer calls FETCH on $tied.

  • In Perl 5.6, -l followed by literally anything that wasn't a bareword would treat its argument as a file name. Then 5.8 changed that โ€” but only for glob references (\*foo), not for globs themselves (*foo). And -l started handing back undef for glob references without setting the last stat buffer that the _ handle uses... but only if warnings were on?? With warnings off it behaved exactly like 5.6 again. So basically it was just buggy and inconsistent, no notes. ๐Ÿ’€ The 5.6 behavior has now been restored, periodt.
  • -l followed by a bareword no longer "eats" the previous argument of the list operator it's sitting inside. Which means print "bar", -l foo actually prints bar now, because -l isn't eating it anymore. ๐Ÿซถ
  • Perl keeps several internal variables around to keep track of the last stat buffer: which file(handle) it came from, what type it was, and whether the last stat succeeded.

There were sooo many cases where these could get out of synch, giving you inconsistent or erratic behavior in edge cases (and heads up bestie: every single mention of -T down here applies to -B too):

  • -T HANDLE, even though it does a stat, wasn't resetting the last stat type, so an lstat _ right after it would merrily return the wrong results. It also wasn't setting the success status. ๐Ÿ˜ญ
  • Freeing the handle last used by stat or by a filetest could result in -T _ using some completely unrelated handle.
  • stat with an IO reference wouldn't reset the stat type or record the filehandle for -T _ to use.
  • Fatal warnings could cause the stat buffer not to be reset for a filetest operator on an unopened filehandle, or for -l on any handle. Fatal warnings also stopped -T from setting $!.
  • When the last stat was on an unreadable file, -T _ is supposed to return undef, leaving the last stat buffer unchanged. But it was setting the stat type, which made lstat _ stop working.
  • -T FILENAME wasn't resetting the internal stat buffers for unreadable files.

All of these have been fixed. โœจ

๐ŸŽ€ Formats ๐ŸŽ€

  • Several edge cases got fixed with formats and formline โ€” specifically where the format itself is potentially variable (think ties and overloading), and where the format and the data differ in their encoding. In both of those situations, it used to be possible for the output to come out corrupted [perl #91032]. ๐Ÿ’€
  • formline no longer converts its argument into a string in-place. So passing a reference to formline no longer destroys the reference [perl #79532]. Iconic behavior honestly.
  • Assigning to $^A (the format output accumulator) now recalculates the number of lines output.

๐Ÿฆ‹ "given" and "when" ๐Ÿฆ‹

  • given wasn't scoping its implicit $_ properly, which meant memory leaks or Variable is not available warnings [perl #94682].
  • given wasn't calling set-magic on the implicit lexical $_ that it uses. So like, pos would be remembered from one execution of the same given block to the next โ€” even if the input was a totally different variable [perl #84526]. Not the vibe.
  • when blocks can now return variables declared inside the enclosing given block [perl #93548]. Slay.

๐ŸŒˆ The "glob" operator ๐ŸŒˆ

  • On OSes other than VMS, Perl's glob operator (and the <...> form) uses File::Glob underneath. File::Glob splits the pattern into words before feeding each word to its bsd_glob function.

There were several inconsistencies in how that split was done. Now quotation marks (' and ") are always treated as shell-style word delimiters (the kind that let whitespace be part of a word), and backslashes are always preserved โ€” unless they exist to escape quotation marks. Before, those things would only sometimes be the case, depending on whether the pattern contained whitespace. Also, escaped whitespace at the end of the pattern is no longer stripped [perl #40470].

  • CORE::glob now works as a way to call the default globbing function. It used to respect overrides, despite the CORE:: prefix. ๐Ÿ™ˆ
  • Under miniperl (which is used to configure modules when perl itself is built), glob now clears %ENV before calling csh, since csh croaks on some systems if it doesn't like the contents of the LS_COLORS environment variable [perl #98662].

๐Ÿ‘‘ Lvalue subroutines ๐Ÿ‘‘

  • Explicit return now returns the actual argument passed to return, instead of copying it [perl #72724, #72706]. No copy, just vibes.
  • Lvalue subroutines used to enforce lvalue syntax (like, whatever can go on the left-hand side of =) for the last statement and for the arguments to return. But since lvalue subroutines aren't always called in lvalue context, that restriction has been lifted. ๐Ÿ’…
  • Lvalue subroutines are less restrictive about what values they can return now. It used to croak on values returned by shift and delete, and from other subroutines โ€” but no longer [perl #71172].
  • Empty lvalue subroutines (sub :lvalue {}) used to return @_ in list context. All subroutines used to do this, but regular subs got fixed back in Perl 5.8.2. Now lvalue subroutines have been fixed the same way.
  • Autovivification now works on values returned from lvalue subroutines [perl #7946], and so does returning keys in lvalue context. ๐ŸŽ‰
  • Lvalue subroutines used to copy their return values in rvalue context. Not only was that a waste of CPU cycles, it also caused bugs: a ($) prototype would make an lvalue sub copy its return value [perl #51408], and while(lvalue_sub() =~ m/.../g) { ... } would loop endlessly [perl #78680]. ๐Ÿ˜ญ
  • When called in potential lvalue context (think subroutine arguments, or a list passed to for), lvalue subroutines used to copy any read-only value that got returned. So like, sub :lvalue { $] } would not return $] โ€” it'd return a copy of it.
  • When called in potential lvalue context, an lvalue subroutine returning arrays or hashes used to bind those arrays or hashes to scalar variables, which caused bugs. That was fixed in 5.14.0 if an array was the first thing returned from the subroutine (but not for $scalar, @array, or for hashes being returned). Now a more general fix has been applied [perl #23790].
  • Method calls whose arguments were all wrapped in my() or our() (like $object->method(my($a,$b))) used to force lvalue context on the subroutine. That would stop lvalue methods from returning certain values.
  • Lvalue sub calls that aren't determined to be lvalue calls at compile time (&$name or &{"name"}) are no longer exempt from strict refs when they show up in the last statement of an lvalue subroutine [perl #102486].
  • Sub calls whose subs aren't visible at compile time, if they occurred in the last statement of an lvalue subroutine, would reject non-lvalue subroutines and die with Can't modify non-lvalue subroutine call [perl #102486].

Non-lvalue sub calls whose subs are visible at compile time had the exact opposite bug. If the call occurred in the last statement of an lvalue subroutine, there'd be no error at all when the lvalue sub was called in lvalue context. Perl would just blindly assign to the temporary value returned by the non-lvalue subroutine. ๐Ÿซ 

  • AUTOLOAD routines used to take precedence over the actual sub being called (i.e., even when autoloading wasn't needed), for sub calls in lvalue or potential lvalue context โ€” if the subroutine wasn't visible at compile time.
  • Applying the :lvalue attribute to an XSUB, or to an aliased subroutine stub written with sub foo :lvalue; syntax, stopped working in Perl 5.12. This has been fixed. โœจ
  • Applying the :lvalue attribute to a subroutine that's already defined doesn't work properly, because the attribute changes the way the sub is compiled. So Perl 5.12 started warning when someone tries to apply the attribute to an already-defined sub. In those cases, the attribute gets discarded.

But the 5.12 change missed the case where custom attributes are also present โ€” that case would still silently and ineffectively apply the attribute. That omission has now been corrected. sub foo :lvalue :Whatever (when foo is already defined) now warns about the :lvalue attribute, and does not apply it.

  • A bug affecting lvalue context propagation through nested lvalue subroutine calls has been fixed. Previously, returning a value in nested rvalue context would be treated as lvalue context by the inner subroutine call, which meant some values (like read-only values) got rejected. Rude.

๐Ÿ’… Overloading ๐Ÿ’…

  • Arithmetic assignment ($left += $right) involving overloaded objects that rely on the 'nomethod' override no longer segfaults when the left operand isn't overloaded. ๐Ÿ’€
  • Errors that happen when methods can't be found during overloading now mention the correct package name โ€” like they did in 5.8.x โ€” instead of erroneously mentioning the overload package, which is what they've been doing since 5.10.0.
  • Undefining %overload:: no longer causes a crash. ๐ŸŽ€

๐Ÿ”ฎ Prototypes of built-in keywords ๐Ÿ”ฎ

  • The prototype function no longer dies for the __FILE__, __LINE__ and __PACKAGE__ directives. It now returns an empty-string prototype for them, because they're syntactically indistinguishable from nullary functions like time.
  • prototype now returns undef for all overridable infix operators, like eq, which aren't callable in any way that resembles functions. It used to return incorrect prototypes for some and die for others [perl #94984].
  • The prototypes of several built-in functions โ€” getprotobynumber, lock, not and select โ€” have been corrected, or at least are now closer to reality than they were before. Close enough bestie.

๐Ÿงš Regular expressions ๐Ÿงš

  • /[[:ascii:]]/ and /[[:blank:]]/ now use locale rules under use locale when the platform supports that. Previously they used the platform's native character set.
  • m/[[:ascii:]]/i and /\p{ASCII}/i now match identically (when not under a differing locale). This fixes a regression introduced in 5.14 where the first expression could match characters outside of ASCII, like the KELVIN SIGN. ๐Ÿ˜ญ
  • /.*/g would sometimes refuse to match at the end of a string that ends with \n. This has been fixed [perl #109206]. ๐Ÿฆ‹
  • Starting with 5.12.0, Perl used to get its internal bookkeeping all muddled up ๐Ÿ˜ต after you assigned ${ qr// } to a hash element and locked it with Hash::Util. The result? Double frees, crashes, erratic behavior. Not the vibe. Fixed now. ๐Ÿ’…
  • The new (in 5.14.0) regular expression modifier /a โ€” when you repeat it like /aa โ€” forbids the characters outside the ASCII range that match characters inside that range from matching under /i. Bestie, this was just not working under some circumstances, and all of them involved alternation, like:
 "\N{KELVIN SIGN}" =~ /k|foo/iaa;

which was succeeding inappropriately ๐Ÿ™ˆ. This is now fixed. โœจ

  • 5.14.0 introduced some memory leaks in regular expression character classes such as [\w\s], and those have now been fixed. (5.14.1) ๐Ÿงš
  • An edge case in regular expression matching could potentially loop forever ๐Ÿ˜ญ. This happened only under /i in bracketed character classes that have characters with multi-character folds, where the target string to match against includes the first portion of the fold, followed by another character that has a multi-character fold that begins with the remaining portion of the fold, plus some more. Example of one such case:
 "s\N{U+DF}" =~ /[\x{DF}foo]/i

because \xDF folds to ss. (5.14.1)

  • A few characters in regular expression pattern matches did not match correctly in some circumstances, all involving /i. The affected characters, for the record, are: COMBINING GREEK YPOGEGRAMMENI, GREEK CAPITAL LETTER IOTA, GREEK CAPITAL LETTER UPSILON, GREEK PROSGEGRAMMENI, GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA, GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS, GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA, GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS, LATIN SMALL LETTER LONG S, LATIN SMALL LIGATURE LONG S T, and LATIN SMALL LIGATURE ST.
  • A memory leak regression in regular expression compilation under threading has been fixed. ๐Ÿซถ
  • A regression introduced in 5.14.0 has been fixed. This involved an inverted bracketed character class in a regular expression that consisted solely of a Unicode property. That property wasn't getting inverted outside the Latin1 range. Periodt. โœ…
  • Three problematic Unicode characters now work better in regex pattern matching under /i. ๐ŸŒˆ

In the past, three Unicode characters โ€” LATIN SMALL LETTER SHARP S, GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS, and GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS โ€” along with the sequences that they fold to (including ss for LATIN SMALL LETTER SHARP S), did not properly match under /i. 5.14.0 fixed some of these cases, but introduced others, including a panic when one of the characters or sequences was used in the (?(DEFINE) regular expression predicate ๐Ÿ’€. The known bugs that were introduced in 5.14 have now been fixed, plus some other edge cases that had never worked until now. All of these involve using the characters and sequences outside bracketed character classes under /i. This closes [perl #98546]. ๐Ÿ‘‘

There remain known problems when using certain characters with multi-character folds inside bracketed character classes, including such constructs as qr/[\N{LATIN SMALL LETTER SHARP}a-z]/i. Those remaining bugs are addressed in [perl #89774].

  • RT #78266: The regex engine has been leaking memory when accessing named captures that weren't matched as part of a regex โ€” ever since 5.10, when they were introduced ๐Ÿ˜ญ. Like, this would consume over a hundred MB of memory:
 for (1..10_000_000) {
     if ("foo" =~ /(foo|(?<capture>bar))?/) {
         my $capture = $+{capture}
     }
 }
 system "ps -o rss $$"'

not me casually leaking a hundred megs ๐Ÿ’€

  • In 5.14, /[[:lower:]]/i and /[[:upper:]]/i no longer matched the opposite case. This has been fixed [perl #101970]. โœ…
  • A regular expression match with an overloaded object on the right-hand side would sometimes stringify the object too many times. Rude. Fixed.
  • A regression has been fixed that was introduced in 5.14, in /i regular expression matching, in which a match improperly fails if the pattern is in UTF-8, the target string is not, and a Latin-1 character precedes a character in the string that should match the pattern. [perl #101710] ๐Ÿฆ‹
  • In case-insensitive regular expression pattern matching, no longer on UTF-8 encoded strings does the scan for the start of match look only at the first possible position. That was causing matches such as "f\x{FB00}" =~ /ff/i to fail. Fixed. ๐Ÿ’œ
  • The regexp optimizer no longer crashes on debugging builds when merging fixed-string nodes with inconvenient contents. ๐Ÿ”ฅ
  • A panic involving the combination of the regular expression modifiers /aa and the \b escape sequence introduced in 5.14.0 has been fixed [perl #95964]. (5.14.2)
  • The combination of the regular expression modifiers /aa and the \b and \B escape sequences did not work properly on UTF-8 encoded strings. All non-ASCII characters under /aa should be treated as non-word characters, but what was actually happening was that Unicode rules were used to determine wordness/non-wordness for non-ASCII characters ๐Ÿ˜ค. This is now fixed [perl #95968]. โœจ
  • (?foo: ...) no longer loses its passed-in character set. ๐ŸŽ€
  • The trie optimization used to have problems with alternations containing an empty (?:), causing "x" =~ /\A(?>(?:(?:)A|B|C?x))\z/ not to match โ€” when it really should have [perl #111842]. Fixed bestie. ๐Ÿซถ
  • Use of lexical (my) variables in code blocks embedded in regular expressions will no longer result in memory corruption or crashes. ๐ŸŽ‰

Nevertheless, these code blocks are still experimental, as there are still problems with the wrong variables being closed over (in loops, for instance) and with abnormal exiting (e.g., die) causing memory corruption. So like, use with caution, iykyk. โš ๏ธ

  • The \h, \H, \v and \V regular expression metacharacters used to cause a panic error message when trying to match at the end of the string [perl #96354]. Not anymore. ๐Ÿ’…
  • The abbreviations for four C1 control characters MW, PM, RI, and ST were previously unrecognized by \N{}, vianame(), and string_vianame(). Now they're recognized, as they should be. ๐ŸŒธ
  • Mentioning a variable named & other than $& (i.e., @& or %&) no longer stops $& from working. The same applies to variables named ' and ` [perl #24237]. ๐Ÿ‘‘
  • Creating a UNIVERSAL::AUTOLOAD sub no longer stops %+, %- and %! from working some of the time [perl #105024]. ๐Ÿ’œ

โœจ Smartmatching โœจ

  • ~~ now correctly handles the precedence of Any~~Object, and is not tricked by an overloaded object on the left-hand side. Slay. ๐ŸŽ€
  • In Perl 5.14.0, $tainted ~~ @array stopped working properly ๐Ÿ˜ญ. Sometimes it would erroneously fail (when $tainted contained a string that occurs in the array after the first element) or erroneously succeed (when undef occurred after the first element) [perl #93590]. Fixed, bestie.

โœจ The sort operator โœจ

  • sort was not treating sub {} and sub {()} as equivalent when such a sub was provided as the comparison routine. It used to croak on sub {()}. Rude. ๐Ÿ˜ค
  • sort now works once more with custom sort routines that are XSUBs. It stopped working in 5.10.0. ๐Ÿ’€
  • sort with a constant for a custom sort routine, although it produces unsorted results, no longer crashes. It started crashing in 5.10.0. ๐Ÿ™ˆ
  • Warnings emitted by sort when a custom comparison routine returns a non-numeric value now contain in sort and show the line number of the sort operator, rather than the last line of the comparison routine. The warnings also now occur only if warnings are enabled in the scope where sort occurs. Previously the warnings would occur if enabled in the comparison routine's scope. Glow up fr fr. โœจ
  • sort { $a <=> $b }, which is optimized internally, now produces uninitialized warnings for NaNs (not-a-number values), since <=> returns undef for those. This brings it in line with sort { 1; $a <=> $b } and other more complex cases, which are not optimized [perl #94390]. ๐Ÿ’…

โœจ The substr operator โœจ

  • Tied (and otherwise magical) variables are no longer exempt from the Attempt to use reference as lvalue in substr warning. ๐Ÿซถ
  • That warning now occurs when the returned lvalue is assigned to, not when substr itself is called. This makes a difference only if the return value of substr is referenced and later assigned to. ๐Ÿ‘‘
  • Passing a substring of a read-only value or a typeglob to a function (potential lvalue context) no longer causes an immediate Can't coerce or Modification of a read-only value error. That error occurs only if the passed value is assigned to. ๐ŸŒˆ

The same thing happens with the substr outside of string error. If the lvalue is only read from, not written to, it is now just a warning, as with rvalue substr.

  • substr assignments no longer call FETCH twice if the first argument is a tied variable, just once. Efficiency queen. ๐Ÿ’…

โœจ Support for embedded nulls โœจ

Some parts of Perl did not work correctly with nulls (chr 0) embedded in strings ๐Ÿ˜ญ. That meant that, for instance, $m = "a\0b"; foo->$m would call the a method, instead of the actual method name contained in $m. These parts of perl have been fixed to support nulls:

  • Method names ๐ŸŽ€
  • Typeglob names (including filehandle and subroutine names) ๐Ÿฆ‹
  • Package names, including the return value of ref() โœจ
  • Typeglob elements (*foo{"THING\0stuff"}) ๐Ÿ‘‘
  • Signal names ๐ŸŒธ
  • Various warnings and error messages that mention variable names or values, methods, etc. ๐Ÿ’œ

One side effect of these changes is that blessing into "\0" no longer causes ref() to return false. Note that. ๐Ÿ’…

โœจ Threading bugs โœจ

  • Typeglobs returned from threads are no longer cloned if the parent thread already has a glob with the same name. This means that returned subroutines will now assign to the right package variables [perl #107366]. Slay. ๐Ÿซถ
  • Some cases of threads crashing due to memory allocation during cloning have been fixed [perl #90006]. ๐ŸŽ‰
  • Thread joining would sometimes emit Attempt to free unreferenced scalar warnings if caller had been used from the DB package before thread creation [perl #98092]. Annoying, now gone. ๐Ÿ™ˆ
  • Locking a subroutine (via lock &sub) is no longer a compile-time error for regular subs. For lvalue subroutines, it no longer tries to return the sub as a scalar, which used to result in strange side effects like ref \$_ returning CODE in some instances. Iconic fix honestly. ๐Ÿ‘‘
  • lock &sub is now a run-time error if threads::shared is loaded (and a no-op otherwise), but that might get fixed in a future version, so likeโ€ฆ stay tuned bestie ๐Ÿซถ

๐ŸŽ€ Tied variables ๐ŸŽ€

  • Various cases where FETCH was being straight-up ignored, or called wayyy too many times, have been fixed. The glow-up list:
    • PerlIO::get_layers [perl #97956]
    • $tied =~ y/a/b/, chop $tied and chomp $tied when $tied holds a reference.
    • When calling local $_ [perl #105912]
    • Four-argument select
    • A tied buffer passed to sysread
    • $tied .= <>
    • Three-argument open, the third being a tied file handle (as in open $fh, ">&", $tied)
    • sort with a reference to a tied glob for the comparison routine.
    • .. and ... in list context [perl #53554].
    • ${$tied}, @{$tied}, %{$tied} and *{$tied} where the tied variable returns a string (&{} was unaffected)
    • defined ${ $tied_variable }
    • Various functions that take a filehandle argument in rvalue context (close, readline, etc.) [perl #97482]
    • Some cases of dereferencing a complex expression, such as ${ (), $tied } = 1, used to call FETCH multiple times, but now call it once. one and done, periodt โœจ
    • $tied->method where $tied returns a package name--even resulting in a failure to call the method, due to memory corruption ๐Ÿ˜ญ
    • Assignments like *$tied = \&{"..."} and *glob = $tied
    • chdir, chmod, chown, utime, truncate, stat, lstat and the filetest ops (-r, -x, etc.)
  • caller sets @DB::args to the subroutine arguments when called from the DB package. It used to crash when doing so if @DB::args happened to be tied. Now it croaks instead. we love a graceful degradation ๐Ÿ’…
  • Tying an element of %ENV or "%^H" and then deleting that element would result in a call to the tie object's DELETE method, even though tying the element itself is supposed to be equivalent to tying a scalar (the element is, of course, a scalar) [perl #67490]. not the vibe, and it's fixed now ๐Ÿฆ‹
  • When Perl autovivifies an element of a tied array or hash (which entails calling STORE with a new reference), it now calls FETCH immediately after the STORE, instead of assuming that FETCH would have returned the same reference. This can make it easier to implement tied objects [perl #35865, #43011]. less guessing, more knowing, iykyk ๐Ÿ”ฅ
  • Four-argument select no longer produces its "Non-string passed as bitmask" warning on tied or tainted variables that are strings.
  • Localizing a tied scalar that returns a typeglob no longer stops it from being tied till the end of the scope. it stays tied, bestie, through the whole scope ๐Ÿ’–
  • Attempting to goto out of a tied handle method used to cause memory corruption or crashes. Now it produces an error message instead [perl #8611]. character development!!
  • A bug has been fixed that occurs when a tied variable is used as a subroutine reference: if the last thing assigned to or returned from the variable was a reference or typeglob, the \&$tied could either crash or return the wrong subroutine. The reference case is a regression introduced in Perl 5.10.0. For typeglobs, it has probably never worked till now. it's giving "we finally fixed the thing that was never working" ๐Ÿ˜ญ

๐ŸŒˆ Version objects and vstrings ๐ŸŒˆ

  • The bitwise complement operator (and possibly other operators, too) when passed a vstring would leave vstring magic attached to the return value, even though the string had changed. This meant that version->new(~v1.2.3) would create a version looking like v1.2.3 even though the string passed to version->new was actually "\376\375\374". This also caused B::Deparse to deparse ~v1.2.3 incorrectly, without the ~ [perl #29070]. the magic was clinging on for dear life, no cap ๐Ÿ’€
  • Assigning a vstring to a magic (e.g., tied, $!) variable and then assigning something else used to blow away all magic. This meant that tied variables would come undone, $! would stop getting updated on failed system calls, $| would stop setting autoflush, and other mischief would take place. This has been fixed. absolute chaos era, over now โœจ
  • version->new("version") and printf "%vd", "version" no longer crash [perl #102586].
  • Version comparisons, such as those that happen implicitly with use v5.43, no longer cause locale settings to change [perl #105784].
  • Version objects no longer cause memory leaks in boolean context [perl #109762]. memory leak? not on my watch ๐Ÿšซ

โญ Warnings, redefinition โญ

  • Subroutines from the autouse namespace are once more exempt from redefinition warnings. This used to work in 5.005, but was broken in 5.6 for most subroutines. For subs created via XS that redefine subroutines from the autouse package, this stopped working in 5.10. we brought it back, you're welcome ๐Ÿ’…
  • New XSUBs now produce redefinition warnings if they overwrite existing subs, as they did in 5.8.x. (The autouse logic was reversed in 5.10-14. Only subroutines from the autouse namespace would warn when clobbered.)
  • newCONSTSUB used to use compile-time warning hints, instead of run-time hints. The following code should never produce a redefinition warning, but it used to, if newCONSTSUB redefined an existing subroutine:
use warnings;
BEGIN {
    no warnings;
    some_XS_function_that_calls_new_CONSTSUB();
}
  • Redefinition warnings for constant subroutines are on by default (what are known as severe warnings in perldiag). This occurred only when it was a glob assignment or declaration of a Perl subroutine that caused the warning. If the creation of XSUBs triggered the warning, it was not a default warning. This has been corrected.
  • The internal check to see whether a redefinition warning should occur used to emit "uninitialized" warnings in cases like this:
use warnings "uninitialized";
use constant {u => undef, v => undef};
sub foo(){u}
sub foo(){v}

๐Ÿงš Warnings, "Uninitialized" ๐Ÿงš

  • Various functions that take a filehandle argument in rvalue context (close, readline, etc.) used to warn twice for an undefined handle [perl #97482]. twice?? one warning is plenty bestie ๐Ÿ™ˆ
  • dbmopen now only warns once, rather than three times, if the mode argument is undef [perl #90064].
  • The += operator does not usually warn when the left-hand side is undef, but it was doing so for tied variables. This has been fixed [perl #44895].
  • A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized" warnings to report the wrong variable if the operator in question had two operands and one was %{...} or @{...}. This has been fixed [perl #103766]. classic fix-one-thing-break-another moment ๐Ÿ˜ญ
  • .. and ... in list context now mention the name of the variable in "uninitialized" warnings for string (as opposed to numeric) ranges.

๐Ÿฆ‹ Weak references ๐Ÿฆ‹

  • Weakening the first argument to an automatically-invoked DESTROY method could result in erroneous "DESTROY created new reference" errors or crashes. Now it is an error to weaken a read-only reference.
  • Weak references to lexical hashes going out of scope were not going stale (becoming undefined), but continued to point to the hash. they were justโ€ฆ hanging around, uninvited ๐Ÿ’€
  • Weak references to lexical variables going out of scope are now broken before any magical methods (e.g., DESTROY on a tie object) are called. This prevents such methods from modifying the variable that will be seen the next time the scope is entered.
  • Creating a weak reference to an @ISA array or accessing the array index ($#ISA) could result in confused internal bookkeeping for elements later added to the @ISA array. For instance, creating a weak reference to the element itself could push that weak reference on to @ISA; and elements added after use of $#ISA would be ignored by method lookup [perl #85670]. the internal bookkeeping was NOT okay but it is now ๐Ÿซถ

๐Ÿ‘‘ Other notable fixes ๐Ÿ‘‘

  • quotemeta now quotes consistently the same non-ASCII characters under use feature 'unicode_strings', regardless of whether the string is encoded in UTF-8 or not, hence fixing the last vestiges (we hope) of the notorious "The "Unicode Bug"" in perlunicode. [perl #77654].

Which of these code points is quoted has changed, based on Unicode's recommendations. See "quotemeta" in perlfunc for details.

  • study is now a no-op, presumably fixing all outstanding bugs related to study causing regex matches to behave incorrectly! study said "i'm retired" and honestly, slay ๐Ÿ‘‘
  • When one writes open foo || die, which used to work in Perl 4, a "Precedence problem" warning is produced. This warning used erroneously to apply to fully-qualified bareword handle names not followed by ||. This has been corrected.
  • After package aliasing (*foo:: = *bar::), select with 0 or 1 argument would sometimes return a name that could not be used to refer to the filehandle, or sometimes it would return undef even when a filehandle was selected. Now it returns a typeglob reference in such cases. returning undef bestie?? embarrassing. fixed ๐Ÿ’…
  • PerlIO::get_layers no longer ignores some arguments that it thinks are numeric, while treating others as filehandle names. It is now consistent for flat scalars (i.e., not references).
  • Unrecognized switches on #! line

If a switch, such as -x, that cannot occur on the #! line is used there, perl dies with "Can't emulate...".

It used to produce the same message for switches that perl did not recognize at all, whether on the command line or the #! line.

Now it produces the "Unrecognized switch" error message [perl #104288].

  • system now temporarily blocks the SIGCHLD signal handler, to prevent the signal handler from stealing the exit status [perl #105700]. no more stealing, the signal handler has been put in time-out ๐Ÿšซ
  • The %n formatting code for printf and sprintf, which causes the number of characters to be assigned to the next argument, now actually assigns the number of characters, instead of the number of bytes.

It also works now with special lvalue functions like substr and with nonexistent hash and array elements [perl #3471, #103492].

  • Perl skips copying values returned from a subroutine, for the sake of speed, if doing so would make no observable difference. Because of faulty logic, this would happen with the result of delete, shift or splice, even if the result was referenced elsewhere. It also did so with tied variables about to be freed [perl #91844, #95548]. the optimization was doing too much and got caught ๐Ÿ˜ญ
  • utf8::decode now refuses to modify read-only scalars [perl #91850]. read-only means read-only, hands off ๐Ÿ™ˆ
  • Freeing $_ inside a grep or map block, or inside a code block embedded in a regular expression, or inside an @INC filter (that's a subroutine returned by a subroutine in @INC) โ€” bestie, that used to give you double frees or full-on crashes ๐Ÿซ  [perl #91880, #92254, #92256].
  • eval gives you back undef in scalar context, or an empty list in list context, whenever there's a run-time error. But here's the tea ๐Ÿต: when eval got handed a string in list context and a syntax error happened, it used to return a list with exactly one undefined element in it. Now it returns an empty list in list context for all errors [perl #80630]. Clean. Consistent. Iconic.
  • goto &func used to crash ๐Ÿ’€ โ€” now it just throws an error message when, while the current subroutine's scope is unwinding, a destructor fires and undefines the subroutine you were "goneto" [perl #99850]. No more mystery segfault, just a polite little "nope".
  • Perl now holds an extra reference count on the package that code is currently compiling in. Which means this legendary snippet no longer crashes [perl #101486]:
package Foo;
BEGIN {*Foo:: = *Bar::}
sub foo;
  • The x repetition operator no longer crashes on 64-bit builds when you throw big repeat counts at it [perl #94560]. Go off, king ๐Ÿ‘‘.
  • Calling require on an implicit $_ while *CORE::GLOBAL::require has been overridden: no more segfault ๐ŸŽ‰ and $_ actually gets passed through to your overriding subroutine now [perl #78260].
  • use and require are no longer affected by the I/O layers active in the caller's scope (the ones enabled by open.pm) [perl #96008]. Your layers stay in your lane, fr fr.
  • our $::รฉ; $รฉ โ€” which is invalid, to be clear โ€” no longer spits out that cursed "Compilation error at lib/utf8_heavy.pl..." message. That message has been haunting us since 5.10.0 [perl #99984]. RIP bozo ๐Ÿ™ˆ.
  • On 64-bit systems, read() now understands large string offsets beyond the 32-bit range. Big offsets, no problem ๐Ÿ’….
  • Errors that happen while processing subroutine attributes no longer cause the subroutine's op tree to leak. Memory leak, you are DONE โœจ.
  • Passing the same constant subroutine to both index and formline no longer makes one of them fail [perl #89218]. (5.14.1)
  • List assignment to lexical variables declared with attributes in the same statement โ€” like my ($x,@y) : blimp = (72,94) โ€” just stopped working back in Perl 5.8.0. It's fixed now ๐ŸŽ€.
  • Perl 5.10.0 introduced some faulty logic where U* in the middle of a pack template was treated as equivalent to U0 whenever the input string was empty. Fixed [perl #90160]. (5.14.2)
  • Destructors on objects were not being called during global destruction for objects that weren't referenced by any scalars. This could sneak up on you if an array element got blessed (like bless \$a[0]) or if a closure referenced a blessed variable (bless \my @a; sub foo { @a }).

So now there's an extra pass during global destruction that fires destructors on any objects that might still be hanging around after the usual passes that check for objects referenced by scalars [perl #36347].

  • Fixed a case where a freed buffer might have been read from while parsing a here document ๐Ÿ‘€ [perl #90128]. (5.14.1)
  • each(ARRAY) is now wrapped in defined(...), just like each(HASH), when it's inside a while condition [perl #90888]. Consistency slay.
  • Fixed a problem with context propagation when a do block is an argument to return. It used to cause undef to get returned in certain cases of a return inside an if block, where that if block itself is followed by another return. Chaos, honestly. Gone now ๐Ÿ’–.
  • Calling index with a tainted constant no longer causes constants in subsequently compiled code to become tainted [perl #64804]. Taint stays where it belongs, periodt.
  • Infinite loops like 1 while 1 used to break strict 'subs' mode for the rest of the block. Not anymore ๐Ÿงš.
  • Okay so for list assignments like ($a,$b) = ($b,$a), Perl has to copy the right-hand side items before assigning them to the left. But for efficiency it'll skip the copy and assign straight across when no single variable shows up on both sides โ€” like ($a,$b) = ($c,$d). The logic for deciding when it's allowed to cheat was faulty, in that && and || on the right-hand side could fool it. So ($a,$b) = $some_true_value && ($b,$a) would end up assigning the value of $b to both scalars ๐Ÿ˜ญ. Rude.
  • Perl no longer tries to apply lvalue context to the string in ("string", $variable) ||= 1 (which used to be an error). Here's why that's correct: the left-hand side of ||= is evaluated in scalar context, so that's a scalar comma operator โ€” which gives everything but the last item void context. And there is no such thing as void lvalue context, so Perl forcing it was just a mistake [perl #96942]. The way that was never gonna work ๐Ÿซถ.
  • caller no longer leaks memory when it's called from the DB package and @DB::args got assigned to after the first call to caller. Carp was triggering this bug [perl #97010]. (5.14.2)
  • close and similar filehandle functions used to die when called on built-in global variables (like $+) and that variable happened to hold the undefined value โ€” instead of giving you the usual "Use of uninitialized value" warning. Fixed ๐Ÿ’œ.
  • When autovivified file handles showed up in Perl 5.6.0, readline accidentally got made to autovivify when called as readline($foo) (but not when called as <$foo>). It's now fixed to never autovivify. Ever. ๐Ÿšซ
  • Calling an undefined anonymous subroutine โ€” like whatever $x holds after undef &{$x = sub{}} โ€” used to raise a "Not a CODE reference" error. That's been corrected to "Undefined subroutine called" [perl #71154]. Way more accurate, way more helpful โœจ.
  • Causing @DB::args to be freed between uses of caller no longer results in a crash [perl #93320]. We love a stable runtime ๐Ÿ˜Œ.
  • setpgrp($foo) used to be equivalent to ($foo, setpgrp), because setpgrp was ignoring its argument when there was only one. Now it's equivalent to setpgrp($foo,0) ๐ŸŽฏ.
  • shmread wasn't setting the scalar flags correctly when reading from shared memory, which meant the existing cached numeric representation in the scalar would just... persist. Fixed [perl #98480].
  • ++ and -- now work on copies of globs instead of dying. Growth mindset ๐Ÿ’….
  • splice() doesn't warn when truncating

You can now cap the size of an array with splice(@a,MAX_LEN) and not have to worry about warnings popping off at you. Peace at last ๐Ÿ•Š๏ธ.

  • $$ is no longer tainted. Since that value comes directly from getpid(), it's always safe. Trust ๐Ÿซก.
  • The parser no longer leaks a filehandle if STDIN was closed before parsing even started [perl #37033].
  • die; with a non-reference, non-string, or magical (e.g., tainted) value sitting in $@ now properly propagates that value [perl #111654]. The value gets to be itself ๐ŸŒˆ.

๐Ÿšง Known Problems ๐Ÿšง

  • On Solaris, there are two flavours of failure, and honestly? Both are annoying.

If make is Sun's make, you'll get an error about a badly formed macro assignment in the Makefile. That happens when ./Configure tries to make depends. Configure then exits 0, but any further make-ing fails. So it tells you it's fine and then it is not fine ๐Ÿ˜ญ.

If make is gmake, Configure completes, and then you get errors related to /usr/include/stdbool.h.

  • On Win32, a bunch of tests hang unless STDERR is redirected. The cause of this is still under investigation ๐Ÿ”.
  • When you build as root with a umask that stops files from being other-readable, t/op/filetest.t will fail. Just so we're clear: this is a test bug, not a bug in perl's behavior ๐Ÿ’–.
  • Configuring with a recent gcc and link-time-optimization, like Configure -Doptimize='-O2 -flto', fails โ€” because the optimizer optimizes away some of Configure's tests. Rude of it, honestly.

Workaround: leave the -flto flag out while running Configure, then add it back in while actually building, something like:

sh Configure -Doptimize=-O2
make OPTIMIZE='-O2 -flto'
  • The following CPAN modules have test failures with perl 5.16. Patches have been submitted for all of them, so hopefully there will be new releases soon ๐Ÿคž:
    • Date::Pcalc version 6.1
    • Module::CPANTS::Analyse version 0.85

This one fails because of problems in Module::Find 0.10 and File::MMagic 1.27.

  • PerlIO::Util version 0.72

๐Ÿ’– ACKNOWLEDGEMENTS ๐Ÿ’–

okay bestie, gather round, because this part is literally just me screaming about people ๐Ÿ’…

Perl 5.16.0 represents approximately 12 months of development since Perl 5.14.0 and contains approximately 590,000 lines of changes across 2,500 files from 139 authors. (yes you read that right. 139. that's a whole group chat of geniuses ๐Ÿซถ)

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

Aaron Crane, Abhijit Menon-Sen, Abigail, Alan Haggai Alavi, Alberto Simรตes, Alexandr Ciornii, Andreas Kรถnig, Andy Dougherty, Aristotle Pagaltzis, Bo Johansson, Bo Lindbergh, Breno G. de Oliveira, brian d foy, Brian Fraser, Brian Greenfield, Carl Hayter, Chas. Owens, Chia-liang Kao, Chip Salzenberg, Chris 'BinGOs' Williams, Christian Hansen, Christopher J. Madsen, chromatic, Claes Jacobsson, Claudio Ramirez, Craig A. Berry, Damian Conway, Daniel Kahn Gillmor, Darin McBride, Dave Rolsky, David Cantrell, David Golden, David Leadbeater, David Mitchell, Dee Newcum, Dennis Kaarsemaker, Dominic Hargreaves, Douglas Christopher Wilson, Eric Brine, Father Chrysostomos, Florian Ragwitz, Frederic Briere, George Greer, Gerard Goossen, Gisle Aas, H.Merijn Brand, Hojung Youn, Ian Goodacre, James E Keenan, Jan Dubois, Jerry D. Hedden, Jesse Luehrs, Jesse Vincent, Jilles Tjoelker, Jim Cromie, Jim Meyering, Joel Berger, Johan Vromans, Johannes Plunien, John Hawkinson, John P. Linderman, John Peacock, Joshua ben Jore, Juerd Waalboer, Karl Williamson, Karthik Rajagopalan, Keith Thompson, Kevin J. Woolley, Kevin Ryde, Laurent Dami, Leo Lapworth, Leon Brocard, Leon Timmermans, Louis Strous, Lukas Mai, Marc Green, Marcel Grรผnauer, Mark A. Stratman, Mark Dootson, Mark Jason Dominus, Martin Hasch, Matthew Horsfall, Max Maischein, Michael G Schwern, Michael Witten, Mike Sheldrake, Moritz Lenz, Nicholas Clark, Niko Tyni, Nuno Carvalho, Pau Amma, Paul Evans, Paul Green, Paul Johnson, Perlover, Peter John Acklam, Peter Martini, Peter Scott, Phil Monsen, Pino Toscano, Rafael Garcia-Suarez, Rainer Tammer, Reini Urban, Ricardo Signes, Robin Barker, Rodolfo Carvalho, Salvador Fandiรฑo, Sam Kimbrel, Samuel Thibault, Shawn M Moore, Shigeya Suzuki, Shirakata Kentaro, Shlomi Fish, Sisyphus, Slaven Rezic, Spiros Denaxas, Steffen Mรผller, Steffen Schwigon, Stephen Bennett, Stephen Oberholtzer, Stevan Little, Steve Hay, Steve Peters, Thomas Sibley, Thorsten Glaser, Timothe Litt, Todd Rinaldo, Tom Christiansen, Tom Hukins, Tony Cook, Vadim Konovalov, Vincent Pit, Vladimir Timofeev, Walt Mankowski, Yves Orton, Zefram, Zsbรกn Ambrus, ร†var Arnfjรถrรฐ Bjarmason.

The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker. (you filed a bug and got no credit line? rude. but so appreciated, fr fr ๐Ÿฅบ)

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish. ๐Ÿ‘‘

For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.


๐Ÿ› REPORTING BUGS ๐Ÿ›

found something sus? ๐Ÿ‘€ If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at http://rt.perl.org/perlbug/. There may also be information at http://www.perl.org/, the Perl Home Page.

If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case โ€” like, nobody wants your 4000-line script, bestie, give us the one line that breaks ๐Ÿ’€. Your bug report, along with the output of perl -V, will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please use this address only for security issues in the Perl core, not for modules independently distributed on CPAN. ๐Ÿšจ

ok this one matters: security stuff goes to the closed list, NOT the public one. don't be the person who drops a zero-day in a public archive ๐Ÿ™ˆ

๐Ÿ‘€ 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 thing, bestie ๐ŸŽ€ this was perl v5.44.0, dated 2026-10-17, and you've officially made it through the entire PERL5160DELTA(1perl) page. go forth, use strict, and slay ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: perl 5.44.0-1 ยท Artistic-1.0-Perl AND GPL-1.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms