=encoding utf8 =head1 NAME perldelta - what is new for perl v5.35.11 =head1 DESCRIPTION This document describes differences between the 5.35.10 release and the 5.35.11 release. If you are upgrading from an earlier release such as 5.35.9, first read L, which describes differences between 5.35.9 and 5.35.10. =head1 Core Enhancements =head2 New functions C and C These new functions allow code to inspect whether a defined but non-referential scalar value originated from an expression that was string-like in nature, or number-like. While most uses within Perl should not care about such distinctions, this can be useful when serialising or encoding Perl data structures for export to other languages or data formats where such a distinction does matter. =head2 Support for not sharing all keys in large hash tables. This release includes support to build Perl so that it does not share all keys in hash tables as has been historically the case since Perl v5.6. The shared key behavior was added to Perl originally to support having many objects with the same keys without having to store each key many times. For objects that might be created hundreds or thousands of times this key sharing behavior can result in using significantly less memory. However, key sharing comes at the cost of having to maintain an internal "master hash table" (PL_str_tab), and having to do two store operations per key stored in a hash table. It also can result in surprising consequences with programs that fork, causing the master hash table to be COWed (copy on write) into the memory space for each forked process which can, in worst case, greatly increase the memory utilization of such scripts. The new behavior is an attempt to have our cake and eat it too. Small hash tables will continue to share keys, but once the hash table is used to store more than a certain number of keys (currently 64) it will not share the new keys that are added. This should benefit scripts that build large hash tables, especially those that do so in forked sub-processes. The unshared mode is triggered when the hash table is resized which is non-deterministic and depends on the underlying hash function that perl has been built with and the seed used by the current process so the exact circumstances when this new mode will be enabled for a given hash will vary between different invocations of a script. We are uncertain of the exact effects of this new mode and are keen to get field reports about the consequences of enabling it. We know that in many cases not sharing keys speeds up scripts in general, and may result in a reduction in memory consumption. Code that builds large hashes where the keys are stored in only one hash, for instance where the keys are message digests, will likely benefit from this change by being faster and using less memory. However, there are also circumstances where not sharing keys can significantly increase memory consumption, such as where large numbers of keys are stored in multiple hash tables at once. We have data to suggest that not sharing keys will reduce COW churn and overall memory consumption in scripts that fork and construct large hash tables, however such scripts may also encounter a modest speed penalty. Overall, the consequences of not sharing keys will vary depending on workload. However, we believe that broadly speaking enabling this feature will be beneficial for most of our users. We would like to get data from the field to validate our assumptions. We are not enabling the new mode by default in this release as we want to gather more data and obtain feedback from the field about how it affects people's scripts, but our intention is to ship the next release of Perl, version 5.38, with some form of this functionality enabled. We are hopeful that people will try to build their perls with this feature and provide us feedback on the results. This will help guide our next steps. So please try it and send feedback to the porters mailing list. You can enable this new feature by passing -Accflags='-DPERL_USE_UNSHARED_KEYS_IN_LARGE_HASHES' to F during the Configuration process. Big thanks to Nicholas Clark for all the hard work in implementing this new feature. =head1 Modules and Pragmata =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 1.63 to 1.64. Deparse now tries harder to preserve the original type of numeric constants, so !0 is deparsed as '!0' rather than '1', 2.0 is deparsed as '2.0' rather than '2' etc. The 'use/no warnings' lines for custom warnings categories are now fully handled - in the previous few releases only a small number of categories were correctly handled. =item * L has been upgraded from version 0.64 to 0.65. =item * L has been upgraded from version 2.101 to 2.103. =item * L has been upgraded from version 2.101 to 2.103. =item * L has been upgraded from version 3.16 to 3.17. =item * L has been upgraded from version 1.49 to 1.49_01. =item * IO-Compress has been upgraded from version 2.102 to 2.106. =item * libnet has been upgraded from version 3.13 to 3.14. =item * L has been upgraded from version 1.30 to 1.31. =item * L has been upgraded from version 1.999829 to 1.999830. =item * L has been upgraded from version 0.2620 to 0.2621. =item * L has been upgraded from version 5.20220320 to 5.20220420. =item * L has been upgraded from version 0.42 to 0.43. =item * L has been upgraded from version 2.032 to 2.033. =item * L has been upgraded from version 3.25 to 3.26. =item * L has been upgraded from version 3.43 to 3.44. =item * L has been upgraded from version 3.30 to 3.31. =item * L has been upgraded from version 1.9769 to 1.9770. =item * L has been upgraded from version 1.30 to 1.31. =back =head1 Documentation =head2 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 L. Additionally, the following selected changes have been made: =head3 L =over 4 =item * Add the new flow-control keywords (try, catch, finally and defer). =back =head2 Removed Documentation =over =item * The long-obsolete F (aka the perlmacos manpage) has been removed. =back =head1 Configuration and Compilation =over 4 =item * A new question has been added to Configure, to ask if you want to build perl with taint support. If you say "no", then all taint features, such as the B<-T> and B<-t> switches, will silently do nothing. It defaults to "yes", so if you run Configure accepting all defaults, you'll get a perl which supports taint just like before. If you're used to running Configure in "batch mode", here's how you'd build Perl without taint support: ./Configure -des -Utaint_support You can check the C key in the C<%Config> hash (in the B module) to determine whether your perl supports taint. If the key doesn't exist in the hash, then you're almost certainly running under an older perl which predates this change, and you can assume that taint is support. See L for more details. =back =head1 Testing Tests were added and changed to reflect the other additions and changes in this release. =head1 Selected Bug Fixes =over 4 =item * Early bailout from the inner one of a pair of nested lookbehinds could cause the outer lookbehind to give the wrong answer. [L]. =item * ACCEPT inside of a C<< (...)+ >> now works as expected. [L]. =back =head1 Acknowledgements Perl 5.35.11 represents approximately 4 weeks of development since Perl 5.35.10 and contains approximately 42,000 lines of changes across 360 files from 24 authors. Excluding auto-generated files, documentation and release tools, there were approximately 36,000 lines of changes to 250 .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.35.11: Bram, brian d foy, Dagfinn Ilmari Mannsåker, David Mitchell, Eugen Konkov, Graham Knop, Hugo van der Sanden, James E Keenan, Karl Williamson, Leon Timmermans, Magnus Woldrich, Neil Bowers, Niyas Sait, Paul Evans, Paul Marquess, Ricardo Signes, Richard Leach, Sawyer X, Sergey Poznyakoff, Sisyphus, Steve Hay, Todd Rinaldo, 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 F file in the Perl source distribution. =head1 Reporting Bugs If you find what you think is a bug, you might check the perl bug database at L. There may also be information at L, the Perl Home Page. If you believe you have an unreported bug, please open an issue at L. 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 L for details of how to report the issue. =head1 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 C program: perlthanks This will send an email to the Perl 5 Porters list with your show of thanks. =head1 SEE ALSO The F file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut