NAME

perldelta - what is new for perl v5.39.1

DESCRIPTION

This document describes differences between the 5.39.0 release and the 5.39.1 release.

If you are upgrading from an earlier release such as 5.38.0, first read perl5390delta, which describes differences between 5.38.0 and 5.39.0.

Incompatible Changes

reset EXPR now calls set-magic on scalars

Previously reset EXPR did not call set magic when clearing scalar variables. This meant that changes did not propagate to the underlying internal state where needed, such as for $^W, and did not result in an exception where the underlying magic would normally throw an exception, such as for $1.

This means code that had no effect before may now actually have an effect, including possibly throwing an exception.

reset EXPR already called set magic when modifying arrays and hashes.

This has no effect on plain reset used to reset one-match searches as with m?pattern?.

[GH #20763]

Calling the import method of an unknown package produces an error

Historically, it has been possible to call the import() or unimport() method of any class, including ones which have not been defined, with an argument and not experience an error. For instance, this code will not throw an error in Perl 5.38:

    Class::That::Does::Not::Exist->import("foo");

However, as of Perl 5.39.1 this will throw an exception. Note that calling these methods with no arguments continues to silently succeed and do nothing. For instance,

    Class::That::Does::Not::Exist->import();

will continue to not throw an error. This is because every class implicitly inherits from the class UNIVERSAL which now defines an import method. In older perls there was no such method defined, and instead the method calls for import and unimport were special cased to not throw errors if there was no such method defined.

This change has been added because it makes it easier to detect case typos in use statements when running on case-insensitive file systems. For instance, on Windows or other platforms with case-insensitive file systems on older perls the following code

    use STRICT 'refs';

would silently do nothing as the module is actually called 'strict.pm', not 'STRICT.pm', so it would be loaded but its import method would never be called. It will also detect cases where a user passes an argument when using a package that does not provide its own import, for instance most "pure" class definitions do not define an import method.

Modules and Pragmata

Updated Modules and Pragmata

  • Compress::Raw::Bzip2 has been upgraded from version 2.204_001 to 2.205.

  • Compress::Raw::Zlib has been upgraded from version 2.204_001 to 2.205.

  • CPAN::Meta::Requirements has been upgraded from version 2.140 to 2.143.

  • Errno has been upgraded from version 1.37 to 1.38.

    The osvers and archname baked into the module to ensure Errno is loaded by the perl that built it are now more comprehensively escaped. [GH #21135]

  • ExtUtils::CBuilder has been upgraded from version 0.280238 to 0.280239.

  • ExtUtils::Manifest has been upgraded from version 1.73 to 1.75.

  • feature has been upgraded from version 1.82 to 1.83.

  • IO-Compress has been upgraded from version 2.204 to 2.205.

  • Math::BigInt has been upgraded from version 1.999837 to 1.999839.

  • Math::BigInt::FastCalc has been upgraded from version 0.5013 to 0.5014.

  • Module::CoreList has been upgraded from version 5.20230520 to 5.20230720.

  • Module::Metadata has been upgraded from version 1.000037 to 1.000038.

  • perlfaq has been upgraded from version 5.20210520 to 5.20230701.

  • POSIX has been upgraded from version 2.13 to 2.14.

  • Socket has been upgraded from version 2.036 to 2.037.

  • Test::Simple has been upgraded from version 1.302194 to 1.302195.

  • Text::Tabs has been upgraded from version 2021.0814 to 2023.0511.

  • Text::Wrap has been upgraded from version 2021.0814 to 2023.0511.

  • threads has been upgraded from version 2.36 to 2.37.

  • Time::HiRes has been upgraded from version 1.9775 to 1.9776.

  • Time::Local has been upgraded from version 1.30 to 1.35.

  • UNIVERSAL has been upgraded from version 1.15 to 1.16.

  • warnings has been upgraded from version 1.65 to 1.66.

Documentation

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 https://github.com/Perl/perl5/issues.

Additionally, the following selected changes have been made:

perlhacktips

  • Document we can't use compound literals or array designators due to C++ compatibility. [GH #21073]

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

  • Attempt to call undefined %s method with arguments via package "%s" (perhaps you forgot to load the package?)

    (F) You called the import() or unimport() method of a class that has no import method defined in its inheritance graph, and passed an argument to the method. This is very often the sign of a misspelled package name in a use or require statement that has silently succeeded due to a case-insensitive file system.

    Another common reason this may happen is when mistakenly attempting to import or unimport a symbol from a class definition or package which does not use Exporter or otherwise define its own import or unimport method.

Testing

Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:

  • Update nm output parsing for Darwin in t/porting/libperl.t to handle changes in the output of nm on Darwin. [GH #21117]

Platform Support

Platform-Specific Notes

Windows

Eliminated several header build warnings under MSVC with /W4 to reduce noise for embedders. [GH #21031]

Acknowledgements

Perl 5.39.1 represents approximately 3 weeks of development since Perl 5.38.0 and contains approximately 24,000 lines of changes across 290 files from 18 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 6,100 lines of changes to 200 .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.1:

Bernd, Elvin Aslanov, Eugen Konkov, Graham Knop, Hauke D, H.Merijn Brand, Hugo van der Sanden, James E Keenan, James Raspass, Karl Williamson, Lukas Mai, Paul Evans, Ricardo Signes, Steve Hay, TAKAI Kousuke, Tomasz Konojacki, 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 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.