=encoding utf8 =head1 NAME perldelta - what is new for perl v5.43.8 =head1 DESCRIPTION This document describes differences between the 5.43.7 release and the 5.43.8 release. If you are upgrading from an earlier release such as 5.43.6, first read L, which describes differences between 5.43.6 and 5.43.7. =head1 Core Enhancements =head2 Multi-variable C can now use aliased references Perl version 5.22 introduced reference aliases, allowing a C loop iteration variable to create new aliases to references. Perl version 5.36 introduced C loops with multiple variables, consuming more than one input list item on each iteration. New in this version, the two features may now be used together, allowing multiple iteration variables where any of them are permitted to be reference aliases. use v5.42; use feature qw( refaliasing declared_refs ); my %hash = ( one => [1], two => [2, 2], ); foreach my ( $key, \@items ) ( %hash ) { say "The $key array contains: @items"; } Currently both the C and C features remain B. =head1 Incompatible Changes =head2 Unicode rules are now fully enforced on identifier and regular expression group names. Before Unicode, Perl accepted any C<\w> character in an identifier or other name, except the first character couldn't be a digit. Later, Unicode created two properties that described this. Even later, they found those properties to be insufficient, and created two new similar properties. These are the ones that perl has intended to use since: C<\p{XID_Start}> and C<\p{XID_Continue}>. (The C stands for "eXtended" and indicates these are the more modern versions.) (And even later, long after Perl identifier rules were formed using the above properties, Unicode added recommendations to further restrict legal identifier names. These were added to counter cases where, for example, programmers snuck code past reviewers using characters that look like other ones. The two properties are C and C. L. Perl currently doesn't do anything with these, except to furnish you the ability to use them in regular expressions.) We soon discovered that there were 14 characters that match C and C that don't also match C<\w>. To avoid breaking code that had long relied on C<\w>, we chose to not add those to the list of acceptable identifier characters. It turns out that there are about 160 characters that match C<\w> but not the Unicode C properties. Thus they are illegal according to Unicode. Those are now explicitly forbidden in both Perl identifiers and regular expression group names. Previously, it was likely that their use in identifiers wouldn't work anyway; they could be accepted as initially as legal, but other code would later reject them, but with a message that had nothing to do with the underlying problem. However group names in regular expression patterns could contain illegal continuation characters and have a higher probablility of not being caught. That is now changed. Only programs that do L|utf8> can be affected, and then only characters that appear in the 2nd or later positions of the name. The characters that an identifier name can begin with are unchanged. 130 of the now unacceptable characters are 5 sets of 26 Latin letters that are enclosed by some shape, such as CIRCLED LATIN CAPITAL LETTER N. Another 8 are generic modifiers that add shapes around other characters; 5 are modifiers to Cyrillic numbers; and 16 are Arabic ligatures and isolated forms. The other two are GREEK YPOGEGRAMMENI and VERTICAL TILDE. =head1 Deprecations =head2 C has new restrictions Using an unescaped C<#> or literal vertical space is now deprecated in a regular expression bracketed character class that is compiled with the C modifier. These still work, but deprecation warnings will be generated unless turned off or the constructs are cured as follows. =over =item * Escape a C<#> by preceding it with a backslash, like in m/ [ % \# ( ) ] /xx =item * Use constructs like C<\n> instead of literal vertical space. =back =head1 Modules and Pragmata =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 1.010 to 1.011. =item * L has been upgraded from version 1.88 to 1.89. =item * L has been upgraded from version 2.214 to 2.217. =item * L has been upgraded from version 2.214 to 2.218. =item * L has been upgraded from version 0.38 to 0.39. =item * L has been upgraded from version 2.150010 to 2.150012. =item * L has been upgraded from version 1.859 to 1.860. =item * L has been upgraded from version 1.11 to 1.12. =item * L has been upgraded from version 3.62 to 3.63. =item * L has been upgraded from version 3.62 to 3.63. =item * L has been upgraded from version 2.00 to 2.01. =item * L has been upgraded from version 2.214 to 2.217. =item * L has been upgraded from version 5.20260119 to 5.20260220. =item * L has been upgraded from version 2.43 to 2.44. =item * L has been upgraded from version 1.71 to 1.72. =item * L has been upgraded from version 1.9779 to 1.9780. =item * L has been upgraded from version 1.76 to 1.77. =item * L has been upgraded from version 1.48 to 1.49. =item * L has been upgraded from version 0.20 to 0.21. =back =head1 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 L. =head2 New Diagnostics =head3 New Errors =over 4 =item * L<\x{%X} is a \w char that isn't valid in a name "%s" |perldiag/\x{%X} is a \w char that isn't valid in a name "%s"> In most cases where this message now appears, an error would have occurred anyway, but the text would not have been helpful in finding the problem. =back =head2 Changes to Existing Diagnostics =over 4 =item * Variables whose name started with C<^_> were incorrectly shown in diagnostics with a literal C (which is an invisible ASCII character) in their name. The names of variables whose names begin with a caret and are longer than two characters are now wrapped in braces, just as they have to be in the source code. Therefore, using an undefined C<${^_FOO}> will now correctly warn with C, instead of the earlier C (with a literal C after the dollar sign). [L] =item * Calling the C method on a package with no C method now produces a regular warning rather than a deprecation warning or error. Since Perl 5.39.1, calling C with arguments on a package without such a method has triggered a deprecation warning. In Perl 5.43.6, this deprecation was promoted into an error. This broke a significant amount of code while providing very little advantage over the warning. This fatal error has been converted back to a warning, with its deprecation status removed. There are no longer any plans to make this fatal in the future. The category for this warning is C and it is enabled by default. =back =head1 Configuration and Compilation =over 4 =item * It is now possible to pass to F the values dealing with POSIX locale categories, overriding its automatic calculation of these. This enables cross-compilation to work. The easiest way to do this is to extract the C program that does the calculation from F and then run it on the target machine, and then pass the values it outputs to F on the other machine. F has examples. [L] =item * The C configuration macro has been removed. It was almost undocumented and it has been disabled by default since Perl 5.10.0. Its purpose was to force all GVs to initialize their SV slot on creation. [L] =back =head1 Testing Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made: =over 4 =item * When testing embedding, add a sanity check to ensure the C we link against matches the perl we are building. [L] =back =head1 Platform Support =head2 Platform-Specific Notes =over 4 =item OpenBSD When testing embedding, ensure we link against the correct static libperl. [L] =back =head1 Internal Changes =over 4 =item * Fixed a bug in the L API where values with numeric ("0+") overloading but not equality or numeric comparison overloading would always be compared as floating point values. This could lead to large integers being reported as equal when they weren't. =item * Fixed a bug in L where the C flag would skip operator overloading, but would still honor numeric ("0+") overloading. =item * Added L, sv_numle, sv_numlt, sv_numge, sv_numgt and L APIs that perform numeric comparison in the same way perl does, including overloading. Separate APIs for each comparison are needed to invoke their corresponding overload when needed. Inspired by [L] This also extends the sv_numeq API to support C. =item * Added the C flag to the L> API to force scalar context for overload calls. =item * Added the C flag to the L> API to allow forcing overloading to be honored even in the context of C. =item * The C bits used by C and C have now been merged into the same position, thus freeing up a flags bit for possible future purposes. This merge is distinguished by the fact that the C behaviour is only used on references (when C is true), whereas the C only applies to string buffers (when C is false). This change shouldn't affect any C module code that is using the test macros correctly, though might cause confusion to code that attempts to analyse C bits directly outside of the helper macros. =item * An upper limit has been applied to the multiplier operand of the repetition operator. Constant folding will not be attempted if the operand is a numerical constant above C. See [L] and [L] for background. =back =head1 Selected Bug Fixes =over 4 =item * sort() optimizes common comparisons from calling the OP tree for a comparison block into a call to a C function. The C function used for overloaded numeric comparisons did not handle the case where there was no comparison overload but there was a numeric ("0+") overload correctly, losing precision for large overloaded integer arguments that are not exactly representable as a Perl floating point value (NV). [L] =item * When a scalar variable used as the target of a filehandle is C'ed while being output, garbage bytes would be left in that scalar. [L] =over 4 =item * Additionally, there was a case that would expose garbage bytes in the target scalar or even trigger a segmentation fault when that scalar is output on it (as in C<< open $fh, '>', \$str; print $fh $str; >>). This is also fixed. [L] =back =item * C when C has been opened as a pipe will now properly wait for the child to exit on Windows. [L] =item * Calling an XSUB via goto in scalar context, where the XSUB didn't return exactly one value, could result in the return of the wrong number of items, leading to potential stack corruption. For example: sub wrap { goto \&an_xsub_which_returns_no_values } $ret = wrap(); [L] =back =head1 Acknowledgements Perl 5.43.8 represents approximately 5 weeks of development since Perl 5.43.7 and contains approximately 56,000 lines of changes across 320 files from 20 authors. Excluding auto-generated files, documentation and release tools, there were approximately 48,000 lines of changes to 190 .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.43.8: Craig A. Berry, David Mitchell, Graham Knop, H.Merijn Brand, James E Keenan, James Raspass, Karl Williamson, Leon Timmermans, Lukas Mai, Max Maischein, Paul Evans, Paul Marquess, Philippe Bruhat (BooK), Ricardo Signes, Richard Leach, Scott Baker, Steve Hay, TAKAI Kousuke, Tomasz Konojacki, Tony Cook. 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