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

CONTENTS

NAME

perl5377delta - what is new for perl v5.37.7

DESCRIPTION

This document describes differences between the 5.37.6 release and the 5.37.7 release.

If you are upgrading from an earlier release such as 5.37.5, first read perl5376delta, which describes differences between 5.37.5 and 5.37.6.

Core Enhancements

Defined-or and logical-or assignment default expressions to signatures

The default expression for a subroutine signature parameter can now be assigned using the //= or ||= operators, to apply the defaults whenever the caller provided an undefined or false value (respectively), rather than simply when the parameter is missing entirely. For more detail see the documentation in perlsub.

@INC Hook Enhancements and $INC and INCDIR

The internals for @INC hooks have been hardened to handle various edge cases and should no longer segfault or throw assert failures when hooks modify @INC during a require operation. As part of this we now ensure that any given hook is executed at most once during a require call, and that any duplicate directories do not trigger additional directory probes.

To provide developers more control over dynamic module lookup, a new hook method INCDIR is now supported. An object supporting this method may be injected into the @INC array, and when it is encountered in the module search process it will be executed, just like how INC hooks are executed, and its return value used as a list of directories to search for the module. Returning an empty list acts as a no-op. Note that since any references returned by this hook will be stringified and used as strings, you may not return a hook to be executed later via this API.

When an @INC hook (either INC or INCDIR) is called during require, the $INC variable will be localized to be the value of the index of @INC that the hook came from. If the hook wishes to override what the "next" index in @INC should be it may update $INC to be one less than the desired index (undef is equivalent to -1). This allows an @INC hook to completely rewrite the @INC array and have perl restart its directory probes from the beginning of @INC.

Blessed CODE references in @INC that do not support the INC or INCDIR methods will no longer trigger an exception, and instead will be treated the same as unblessed coderefs are, and executed as though they were an INC hook.

Forbidden control flow out of defer or finally now detected at compile-time

It is forbidden to attempt to leave a defer or finally block by means of control flow such as return or goto. Previous versions of perl could only detect this when actually attempted at runtime.

This version of perl adds compile-time detection for many cases that can be statically determined. This may mean that code which compiled successfully on a previous version of perl is now reported as a compile-time error with this one. This only happens in cases where it would have been an error to actually execute the code anyway; the error simply happens at an earlier time.

Modules and Pragmata

Updated Modules and Pragmata

Diagnostics

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 Errors

Changes to Existing Diagnostics

Testing

Tests were added and changed to reflect the other additions and changes in this release.

Internal Changes

Selected Bug Fixes

Known Problems

Acknowledgements

Perl 5.37.7 represents approximately 4 weeks of development since Perl 5.37.6 and contains approximately 42,000 lines of changes across 250 files from 20 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 33,000 lines of changes to 140 .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.37.7:

Bart Van Assche, Craig A. Berry, Eric Herman, Felipe Gasper, Graham Knop, James E Keenan, Karl Williamson, Leon Timmermans, Matthew O. Persico, Max Maischein, Paul Evans, Philippe Bruhat (BooK), Richard Leach, Russ Allbery, Scott Baker, Tomasz Konojacki, Tony Cook, Tsuyoshi Watanabe, Yves Orton, Zakariyya Mughal.

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

If you believe you have an unreported bug, please open an issue at https://github.com/Perl/perl5/issues. 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:

perlthanks

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

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.