You are viewing the version of this documentation from Perl 5.39.8. This is a development version of Perl.



perldelta - what is new for perl v5.39.8


This document describes differences between the 5.39.7 release and the 5.39.8 release.

If you are upgrading from an earlier release such as 5.39.6, first read perl5397delta, which describes differences between 5.39.6 and 5.39.7.

Core Enhancements

:reader attribute for field variables

When using the class feature, field variables can now take a :reader attribute. This requests that an accessor method be automatically created that simply returns the value of the field variable from the given instance.

field $name :reader;

Is equivalent to

field $name;
method name () { return $name; }

An alternative name can also be provided:

field $name :reader(get_name);

For more detail, see ":reader" in perlclass.

Permit a space in -M command-line option

When processing command-line options, perl now allows a space between the -M switch and the name of the module after it.

$ perl -M Data::Dumper=Dumper -E 'say Dumper [1,2,3]'

This matches the existing behaviour of the -I option.

Restrictions to use VERSION declarations

In Perl 5.36, a deprecation warning was added when downgrading a use VERSION declaration from one above version 5.11, to below. This has now been made a fatal error.

Additionally, it is now a fatal error to issue a subsequent use VERSION declaration when another is in scope, when either version is 5.39 or above. This is to avoid complications surrounding imported lexical functions from builtin. A deprecation warning has also been added for any other subsequent use VERSION declaration below version 5.39, to warn that it will no longer be permitted in Perl version 5.46.

use VERSION no longer removes imported builtin functions

For a few development versions we have experimented with the idea that as well as importing lexical functions, the use VERSION syntax can also remove previously imported functions when a new version is requested that does not include them. This behaviour of removing lexical functions has turned out to be a bad model to follow so this version of Perl removes it again.

As this behaviour has not appeared in any stable release of Perl, no warning or deprecation period is required.

New builtin::inf and builtin::nan functions

Two new functions, inf and nan, have been added to the builtin namespace. These act like constants that yield the floating-point infinity and Not-a-Number value respectively.

Incompatible Changes

Class barewords no longer resolved as file handles in method calls under no feature "bareword_filehandles"

Under no feature "bareword_filehandles" bareword file handles continued to be resolved in method calls:

open FH, "<", $somefile or die;
no feature 'bareword_filehandles';

This has been fixed, so the:


will attempt to resolve FH as a class, typically resulting in a runtime error.

The standard file handles such as STDOUT continue to be resolved as a handle:

no feature 'bareword_filehandles';
STDOUT->flush; # continues to work

Note that once perl resolves a bareword name as a class it will continue to do so:

package SomeClass {
    sub somemethod{}
open SomeClass, "<", "somefile" or die;
# SomeClass resolved as a handle
    no feature "bareword_filehandles";
# SomeClass resolved as a class

[github #19426]

Modules and Pragmata

Updated Modules and Pragmata


Changes to Existing Documentation

We have attempted to update the documentation to reflect the changes listed in this document. If you find any we have missed, open an issue at


The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

New Diagnostics

New Warnings

Changes to Existing Diagnostics

Selected Bug Fixes


Perl 5.39.8 represents approximately 5 weeks of development since Perl 5.39.7 and contains approximately 9,100 lines of changes across 170 files from 24 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 4,900 lines of changes to 79 .pm, .t, .c and .h files.

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

Chris 'BinGOs' Williams, Craig A. Berry, Daniel Böhmer, Dan Jacobson, David Mitchell, Elvin Aslanov, Graham Knop, H.Merijn Brand, James E Keenan, John Karr, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Marek Rouchal, Mathias Kende, Max Maischein, Paul Evans, Renee Baecker, Richard Leach, Sisyphus, TAKAI Kousuke, Tony Cook, Yves Orton.

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.

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

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

Reporting Bugs

If you find what you think is a bug, you might check the perl bug database at There may also be information at, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at Be sure to trim your bug down to a tiny but sufficient test case.

If the bug you are reporting has security implications which make it inappropriate to send to a public issue tracker, then see "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of how to report the issue.

Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you can do so by running the perlthanks program:


This will send an email to the Perl 5 Porters list with your show of thanks.


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.