From 7eef11b4706962e0f627688fc9011c6a2e9aeac7 Mon Sep 17 00:00:00 2001 From: Max Maischein <corion@corion.net> Date: Fri, 20 Dec 2024 15:53:39 +0100 Subject: [PATCH] New perldelta for 5.41.7 --- MANIFEST | 1 + Makefile.SH | 8 +- pod/.gitignore | 2 +- pod/perl.pod | 1 + pod/perl5417delta.pod | 372 ++++++++++++++++++++++++++++++++ pod/perldelta.pod | 448 +++++++++++++++++++++++---------------- vms/descrip_mms.template | 2 +- win32/GNUmakefile | 4 +- win32/Makefile | 4 +- win32/pod.mak | 4 + 10 files changed, 649 insertions(+), 197 deletions(-) create mode 100644 pod/perl5417delta.pod diff --git a/MANIFEST b/MANIFEST index 120dbeeb1220..9d8f4a434cfe 100644 --- a/MANIFEST +++ b/MANIFEST @@ -5743,6 +5743,7 @@ pod/perl5413delta.pod Perl changes in version 5.41.3 pod/perl5414delta.pod Perl changes in version 5.41.4 pod/perl5415delta.pod Perl changes in version 5.41.5 pod/perl5416delta.pod Perl changes in version 5.41.6 +pod/perl5417delta.pod Perl changes in version 5.41.7 pod/perl561delta.pod Perl changes in version 5.6.1 pod/perl56delta.pod Perl changes in version 5.6 pod/perl581delta.pod Perl changes in version 5.8.1 diff --git a/Makefile.SH b/Makefile.SH index 6eb86e7f6217..0b1629ffe43e 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -627,7 +627,7 @@ esac $spitshell >>$Makefile <<'!NO!SUBS!' -perltoc_pod_prereqs = extra.pods pod/perl5417delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod +perltoc_pod_prereqs = extra.pods pod/perl5418delta.pod pod/perlapi.pod pod/perlintern.pod pod/perlmodlib.pod pod/perluniprops.pod generated_pods = pod/perltoc.pod $(perltoc_pod_prereqs) generated_headers = uudmap.h bitcount.h mg_data.h @@ -1136,9 +1136,9 @@ pod/perlintern.pod: $(MINIPERL_EXE) autodoc.pl embed.fnc pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST $(MINIPERL) pod/perlmodlib.PL -q -pod/perl5417delta.pod: pod/perldelta.pod - $(RMS) pod/perl5417delta.pod - $(LNS) perldelta.pod pod/perl5417delta.pod +pod/perl5418delta.pod: pod/perldelta.pod + $(RMS) pod/perl5418delta.pod + $(LNS) perldelta.pod pod/perl5418delta.pod extra.pods: $(MINIPERL_EXE) -@test ! -f extra.pods || rm -f `cat extra.pods` diff --git a/pod/.gitignore b/pod/.gitignore index c0293808a8db..4c1d7c4100c3 100644 --- a/pod/.gitignore +++ b/pod/.gitignore @@ -47,7 +47,7 @@ /roffitall # generated -/perl5417delta.pod +/perl5418delta.pod /perlapi.pod /perlintern.pod /perlmodlib.pod diff --git a/pod/perl.pod b/pod/perl.pod index 8d0c3cbe80f4..9d69bdbc974a 100644 --- a/pod/perl.pod +++ b/pod/perl.pod @@ -181,6 +181,7 @@ aux h2ph h2xs perlbug pl2pm pod2html pod2man splain xsubpp perlhist Perl history records perldelta Perl changes since previous version + perl5417delta Perl changes in version 5.41.7 perl5416delta Perl changes in version 5.41.6 perl5415delta Perl changes in version 5.41.5 perl5414delta Perl changes in version 5.41.4 diff --git a/pod/perl5417delta.pod b/pod/perl5417delta.pod new file mode 100644 index 000000000000..dbc5d2cd084b --- /dev/null +++ b/pod/perl5417delta.pod @@ -0,0 +1,372 @@ +=encoding utf8 + +=head1 NAME + +perl5417delta - what is new for perl v5.41.7 + +=head1 DESCRIPTION + +This document describes differences between the 5.41.6 release and the 5.41.7 +release. + +If you are upgrading from an earlier release such as 5.41.5, first read +L<perl5416delta>, which describes differences between 5.41.5 and 5.41.6. + +=head1 Core Enhancements + +=head2 New C<:writer> attribute on field variables + +Classes defined using C<use feature 'class'> are now able to automatically +create writer accessors for scalar fields, by using the C<:writer> attribute, +similar to the way that C<:reader> already creates reader accessors. + + class Point { + field $x :reader :writer :param; + field $y :reader :writer :param; + } + + my $p = Point->new( x => 20, y => 40 ); + $p->set_x(60); + +=head2 New C<any> and C<all> operators + +A new experimental feature has been added, which adds two new list-processing +operators, C<any> and C<all>. + + use v5.40; + use feature 'all'; + + my @numbers = ... + + if(all { $_ % 2 == 0 } @numbers) { + say "All the numbers are even"; + } + +These operate similarly to C<grep> except that they only ever return true or +false, testing if any (or all) of the elements in the list make the testing +block yield true. Because of this they can short-circuit, avoiding the need +to test any further elements if a given element determines the eventual +result. + +These are inspired by the same-named functions in the L<List::Util> module, +except that they are implemented as direct core operators, and thus perform +faster, and do not produce an additional subroutine call stack frame for +invoking the code block. + +=head1 Performance Enhancements + +=over 4 + +=item * + +Code that uses the C<indexed> function from the L<builtin> module to generate +a list of index/value pairs out of an array or list which is then passed into +a two-variable C<foreach> list to unpack those again is now optimised to be +more efficient. + + my @array = (...); + + foreach my ($idx, $val) (builtin::indexed @array) { + ... + } + +Z<> + + foreach my ($idx, $val) (builtin::indexed LIST...) { + ... + } + +In particular, a temporary list twice the size of the original is no longer +generated. Instead, the loop iterates down the original array or list +in-place directly, in the same way that C<foreach (@array)> or +C<foreach (LIST)> would do. + +=back + +=head1 Modules and Pragmata + +=head2 Updated Modules and Pragmata + +=over 4 + +=item * + +L<B::Deparse> has been upgraded from version 1.80 to 1.81. + +=item * + +L<builtin> has been upgraded from version 0.016 to 0.017. + +=item * + +L<CPAN::Meta::YAML> has been upgraded from version 0.018 to 0.020. + +=item * + +L<feature> has been upgraded from version 1.92 to 1.93. + +=item * + +L<IO::Socket::IP> has been upgraded from version 0.42 to 0.43. + +=item * + +L<Module::CoreList> has been upgraded from version 5.20241120 to 5.20241220. + +=item * + +L<Opcode> has been upgraded from version 1.66 to 1.67. + +=item * + +L<parent> has been upgraded from version 0.242_001 to 0.244. + +=item * + +L<warnings> has been upgraded from version 1.71 to 1.72. + +=item * + +L<XS::APItest> has been upgraded from version 1.38 to 1.40. + +=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<https://github.com/Perl/perl5/issues>. + +Additionally, the following selected changes have been made: + +=head3 L<perl5416delta> + +=head4 F<pod/perlguts.pod> and F<pod/perlclib.pod> + +=over 4 + +=item Memory Allocation in C/XS + +Documentation was updated to reflect that mixing C<Newx>, C<Renew>, and +C<Safefree> vs C<malloc>, C<realloc>, and C<free> are not allowed, and mixing +pointers between the 2 classes of APIs is not allowed. Updates made in +F<pod/perlguts.pod> and F<pod/perlclib.pod>. + +=back + +=over 4 + +=item +Added the change note for apostrophes in names being reinstated, which +was delayed by the review cycle. + +=back + + + +=head1 Configuration and Compilation + +=over 4 + +=item * + +The (mostly undocumented) configuration macro C<PERL_STRICT_CR> has been +removed. When enabled (e.g. with C<./Configure -A ccflags=-DPERL_STRICT_CR>), +it would make the perl parser throw a fatal error when it encountered a CR +(carriage return) character in source files. The default (and now only) +behavior of the perl parser is to strip CRs paired with newline characters and +otherwise treat them as whitespace. + +(C<PERL_STRICT_CR> was originally introduced in perl 5.005 to optionally +restore backward compatibility with perl 5.004, which had made CR in source +files an error. Before that, CR was accepted, but retained literally in quoted +multi-line constructs such as here-documents, even at the end of a line.) + +=item * + +Similarly, the (even less documented) configuration macro C<PERL_CR_FILTER> has +been removed. When enabled, it would install a default source filter to strip +carriage returns from source code before the parser proper got to see it. + +=back + +=head1 Testing + +Tests were added and changed to reflect the other additions and changes +in this release. + +=head1 Internal Changes + +=over 4 + +=item * + +New API functions are introduced to convert strings encoded in UTF-8 to +their ordinal code point equivalent. These are safe to use by default, +and generally more convenient to use than the existing ones. + +L<perlapi/C<utf8_to_uv>> and L<perlapi/C<utf8_to_uv_or_die>> replace +L<perlapi/C<utf8_to_uvchr>> (which is retained for backwards +compatibility), but you should convert to use the new forms, as likely +you aren't using the old one safely. + +To convert in the opposite direction, you can now use +L<perlapi/C<uv_to_utf8>>. This is not a new function, but a new synonym +for L<perlapi/C<uvchr_to_utf8>>. It is added so you don't have to learn +two sets of names. + +There are also two new functions, L<perlapi/C<strict_utf8_to_uv>> and +L<perlapi/C<c9strict_utf8_to_uv>> which do the same thing except when +the input string represents a code point that Unicode doesn't accept as +legal for interchange, using either the strict original definition +(C<strict_utf8_to_uv>), or the looser one given by +L<Unicode Corrigendum #9|https://www.unicode.org/versions/corrigendum9.html> +(C<c9strict_utf8_to_uv>). When the input string represents one of the +restricted code points, these functions return the Unicode +C<REPLACEMENT CHARACTER> instead. + +Also L<perlapi/C<extended_utf8_to_uv>> is a synonym for C<utf8_to_uv>, for use +when you want to emphasize that the entire range of Perl extended UTF-8 +is acceptable. + +There are also replacement functions for the three more specialized +conversion functions that you are unlikely to need to use. Again, the +old forms are kept for backwards compatibility, but you should convert +to use the new forms. + +L<perlapi/C<utf8_to_uv_flags>> replaces L<perlapi/C<utf8n_to_uvchr>>. + +L<perlapi/C<utf8_to_uv_errors>> replaces L<perlapi/C<utf8n_to_uvchr_error>>. + +L<perlapi/C<utf8_to_uv_msgs>> replaces +L<perlapi/C<utf8n_to_uvchr_msgs>>. + +Also added are the inverse functions L<perlapi/C<uv_to_utf8_flags>> +and L<perlapi/C<uv_to_utf8_msgs>>, which are synonyms for the existing +functions, L<perlapi/C<uvchr_to_utf8_flags>> and +L<perlapi/C<uvchr_to_utf8_flags_msgs>> respectively. These are provided only +so you don't have to learn two sets of names. + +=item * + +Three new API functions are introduced to convert strings encoded in +UTF-8 to native bytes format (if possible). These are easier to use +than the existing ones, and they avoid unnecessary memory allocations. +The functions are L<perlapi/C<utf8_to_bytes_overwrite>> which is used +when it is ok for the input string to be overwritten with the converted +result; and L<perlapi/C<utf8_to_bytes_new_pv>> and +L<perlapi/C<utf8_to_bytes_temp_pv>> when the original string must be +preserved intact. C<utf8_to_bytes_temp_pv> returns the result in a +temporary using L<perlapi>/C<SAVEFREEPV> that will automatically be +destroyed. With C<utf8_to_bytes_new_pv>, you are responsible for +freeing the newly allocated memory that is returned if the conversion is +successful. + +The latter two functions are designed to replace +L<perlapi/C<bytes_from_utf8>> which creates memory unnecessarily, or +unnecessarily large. + +=item * + +New API functions L<C<valid_identifier_pve()>|perlapi/valid_identifier_pve>, +L<C<valid_identifier_pvn()>|perlapi/valid_identifier_pvn> and +L<C<valid_identifier_sv()>|perlapi/valid_identifier_sv> have been added, which +test if a string would be considered by Perl to be a valid identifier name. + +=item * + +When assigning from an SVt_IV into a SVt_NV (or vice versa), providing that +both are "bodyless" types, Perl_sv_setsv_flags will now just change the +destination type to match the source type. Previously, an SVt_IV would have +been upgraded to a SVt_PVNV to store an NV, and an SVt_NV would have been +upgraded to a SVt_PVIV to store an IV. This change prevents the need to +allocate - and later free - the relevant body struct. + +=back + +=head1 Selected Bug Fixes + +=over 4 + +=item * + +Declaring a lexically scoped array or hash using C<state> within a subroutine +and then immediately returning no longer triggers a "Bizarre copy of HASH/ARRAY +in subroutine exit" error. [GH #18630] + +=item * + +C<builtin::trim()> didn't properly clear C<TARG> which could result in +out of date cached numeric versions of the value being used on a +second evaluation. Properly clear any cached values. [GH #22784] + +=back + +=head1 Acknowledgements + +Perl 5.41.7 represents approximately 4 weeks of development since Perl +5.41.6 and contains approximately 11,000 lines of changes across 160 files +from 16 authors. + +Excluding auto-generated files, documentation and release tools, there were +approximately 6,400 lines of changes to 96 .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.41.7: + +Dagfinn Ilmari Mannsåker, Daniel Dragan, Ed Sabol, James E Keenan, Karen +Etheridge, Karl Williamson, Lukas Mai, Mark Fowler, Max Maischein, Paul +Evans, Richard Leach, Scott Baker, Sisyphus, TAKAI Kousuke, Thibault +Duponchelle, 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<AUTHORS> 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<https://github.com/Perl/perl5/issues>. There may also be information at +L<https://www.perl.org/>, the Perl Home Page. + +If you believe you have an unreported bug, please open an issue at +L<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 +L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> +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<perlthanks> program: + + perlthanks + +This will send an email to the Perl 5 Porters list with your show of thanks. + +=head1 SEE ALSO + +The F<Changes> file for an explanation of how to view exhaustive details on +what changed. + +The F<INSTALL> file for how to build Perl. + +The F<README> file for general stuff. + +The F<Artistic> and F<Copying> files for copyright information. + +=cut diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 7e6ddd35fc13..2d4881a6b6aa 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2,337 +2,411 @@ =head1 NAME -perldelta - what is new for perl v5.41.7 +[ this is a template for a new perldelta file. Any text flagged as XXX needs +to be processed before release. ] + +perldelta - what is new for perl v5.41.8 =head1 DESCRIPTION -This document describes differences between the 5.41.6 release and the 5.41.7 +This document describes differences between the 5.41.7 release and the 5.41.8 release. -If you are upgrading from an earlier release such as 5.41.5, first read -L<perl5416delta>, which describes differences between 5.41.5 and 5.41.6. +If you are upgrading from an earlier release such as 5.41.6, first read +L<perl5417delta>, which describes differences between 5.41.6 and 5.41.7. -=head1 Core Enhancements +=head1 Notice -=head2 New C<:writer> attribute on field variables +XXX Any important notices here -Classes defined using C<use feature 'class'> are now able to automatically -create writer accessors for scalar fields, by using the C<:writer> attribute, -similar to the way that C<:reader> already creates reader accessors. +=head1 Core Enhancements - class Point { - field $x :reader :writer :param; - field $y :reader :writer :param; - } +XXX New core language features go here. Summarize user-visible core language +enhancements. Particularly prominent performance optimisations could go +here, but most should go in the L</Performance Enhancements> section. - my $p = Point->new( x => 20, y => 40 ); - $p->set_x(60); +[ List each enhancement as a =head2 entry ] -=head2 New C<any> and C<all> operators +=head1 Security -A new experimental feature has been added, which adds two new list-processing -operators, C<any> and C<all>. +XXX Any security-related notices go here. In particular, any security +vulnerabilities closed should be noted here rather than in the +L</Selected Bug Fixes> section. - use v5.40; - use feature 'all'; +[ List each security issue as a =head2 entry ] - my @numbers = ... +=head1 Incompatible Changes - if(all { $_ % 2 == 0 } @numbers) { - say "All the numbers are even"; - } +XXX For a release on a stable branch, this section aspires to be: -These operate similarly to C<grep> except that they only ever return true or -false, testing if any (or all) of the elements in the list make the testing -block yield true. Because of this they can short-circuit, avoiding the need -to test any further elements if a given element determines the eventual -result. + There are no changes intentionally incompatible with 5.XXX.XXX + If any exist, they are bugs, and we request that you submit a + report. See L</Reporting Bugs> below. -These are inspired by the same-named functions in the L<List::Util> module, -except that they are implemented as direct core operators, and thus perform -faster, and do not produce an additional subroutine call stack frame for -invoking the code block. +[ List each incompatible change as a =head2 entry ] -=head1 Performance Enhancements +=head1 Deprecations -=over 4 +XXX Any deprecated features, syntax, modules etc. should be listed here. -=item * +=head2 Module removals -Code that uses the C<indexed> function from the L<builtin> module to generate -a list of index/value pairs out of an array or list which is then passed into -a two-variable C<foreach> list to unpack those again is now optimised to be -more efficient. +XXX Remove this section if not applicable. - my @array = (...); +The following modules will be removed from the core distribution in a +future release, and will at that time need to be installed from CPAN. +Distributions on CPAN which require these modules will need to list them as +prerequisites. - foreach my ($idx, $val) (builtin::indexed @array) { - ... - } +The core versions of these modules will now issue C<deprecated>-category +warnings to alert you to this fact. To silence these deprecation warnings, +install the modules in question from CPAN. -Z<> +Note that these are (with rare exceptions) fine modules that you are encouraged +to continue to use. Their disinclusion from core primarily hinges on their +necessity to bootstrapping a fully functional, CPAN-capable Perl installation, +not usually on concerns over their design. - foreach my ($idx, $val) (builtin::indexed LIST...) { - ... - } +=over -In particular, a temporary list twice the size of the original is no longer -generated. Instead, the loop iterates down the original array or list -in-place directly, in the same way that C<foreach (@array)> or -C<foreach (LIST)> would do. +=item XXX + +XXX Note that deprecated modules should be listed here even if they are listed +as an updated module in the L</Modules and Pragmata> section. =back -=head1 Modules and Pragmata +[ List each other deprecation as a =head2 entry ] -=head2 Updated Modules and Pragmata +=head1 Performance Enhancements + +XXX Changes which enhance performance without changing behaviour go here. +There may well be none in a stable release. + +[ List each enhancement as an =item entry ] =over 4 =item * -L<B::Deparse> has been upgraded from version 1.80 to 1.81. +XXX -=item * +=back -L<builtin> has been upgraded from version 0.016 to 0.017. +=head1 Modules and Pragmata -=item * +XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> +go here. If L<Module::CoreList> is updated, generate an initial draft of the +following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary +for important changes should then be added by hand. In an ideal world, +dual-life modules would have a F<Changes> file that could be cribbed. -L<CPAN::Meta::YAML> has been upgraded from version 0.018 to 0.020. +The list of new and updated modules is modified automatically as part of +preparing a Perl release, so the only reason to manually add entries here is if +you're summarising the important changes in the module update. (Also, if the +manually-added details don't match the automatically-generated ones, the +release manager will have to investigate the situation carefully.) -=item * +[ Within each section, list entries as an =item entry ] -L<feature> has been upgraded from version 1.92 to 1.93. +=head2 New Modules and Pragmata + +=over 4 =item * -L<IO::Socket::IP> has been upgraded from version 0.42 to 0.43. +XXX Remove this section if F<Porting/corelist-perldelta.pl> did not add any content here. -=item * +=back + +=head2 Updated Modules and Pragmata -L<Module::CoreList> has been upgraded from version 5.20241120 to 5.20241220. +=over 4 =item * -L<Opcode> has been upgraded from version 1.66 to 1.67. +L<XXX> has been upgraded from version A.xx to B.yy. -=item * +XXX If there was something important to note about this change, include that here. -L<parent> has been upgraded from version 0.242_001 to 0.244. +=back -=item * +=head2 Removed Modules and Pragmata -L<warnings> has been upgraded from version 1.71 to 1.72. +=over 4 =item * -L<XS::APItest> has been upgraded from version 1.38 to 1.40. +XXX Remove this section if F<Porting/corelist-perldelta.pl> did not add any content here. =back =head1 Documentation +XXX Changes to files in F<pod/> go here. Consider grouping entries by +file and be sure to link to the appropriate page, e.g. L<perlfunc>. + +=head2 New Documentation + +XXX Changes which create B<new> files in F<pod/> go here. + +=head3 L<XXX> + +XXX Description of the purpose of the new file here + =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<https://github.com/Perl/perl5/issues>. +XXX Changes which significantly change existing files in F<pod/> go here. +However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics> +section. + Additionally, the following selected changes have been made: -=head3 L<perl5416delta> +=head3 L<XXX> + +=over 4 + +=item * + +XXX Description of the change here + +=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<perldiag>. -=head4 F<pod/perlguts.pod> and F<pod/perlclib.pod> +XXX New or changed warnings emitted by the core's C<C> code go here. Also +include any changes in L<perldiag> that reconcile it to the C<C> code. + +=head2 New Diagnostics + +XXX Newly added diagnostic messages go under here, separated into L</New Errors> +and L</New Warnings> + +=head3 New Errors =over 4 -=item Memory Allocation in C/XS +=item * -Documentation was updated to reflect that mixing C<Newx>, C<Renew>, and -C<Safefree> vs C<malloc>, C<realloc>, and C<free> are not allowed, and mixing -pointers between the 2 classes of APIs is not allowed. Updates made in -F<pod/perlguts.pod> and F<pod/perlclib.pod>. +XXX L<message|perldiag/"message"> =back +=head3 New Warnings + =over 4 -=item -Added the change note for apostrophes in names being reinstated, which -was delayed by the review cycle. +=item * + +XXX L<message|perldiag/"message"> =back +=head2 Changes to Existing Diagnostics +XXX Changes (i.e. rewording) of diagnostic messages go here -=head1 Configuration and Compilation +=over 4 + +=item * + +XXX Describe change here + +=back + +=head1 Utility Changes + +XXX Changes to installed programs such as F<perldoc> and F<xsubpp> go here. +Most of these are built within the directory F<utils>. + +[ List utility changes as a =head2 entry for each utility and =item +entries for each change +Use F<XXX> with program names to get proper documentation linking. ] + +=head2 F<XXX> =over 4 =item * -The (mostly undocumented) configuration macro C<PERL_STRICT_CR> has been -removed. When enabled (e.g. with C<./Configure -A ccflags=-DPERL_STRICT_CR>), -it would make the perl parser throw a fatal error when it encountered a CR -(carriage return) character in source files. The default (and now only) -behavior of the perl parser is to strip CRs paired with newline characters and -otherwise treat them as whitespace. +XXX + +=back + +=head1 Configuration and Compilation -(C<PERL_STRICT_CR> was originally introduced in perl 5.005 to optionally -restore backward compatibility with perl 5.004, which had made CR in source -files an error. Before that, CR was accepted, but retained literally in quoted -multi-line constructs such as here-documents, even at the end of a line.) +XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools +go here. Any other changes to the Perl build process should be listed here. +However, any platform-specific changes should be listed in the +L</Platform Support> section, instead. + +[ List changes as an =item entry ]. + +=over 4 =item * -Similarly, the (even less documented) configuration macro C<PERL_CR_FILTER> has -been removed. When enabled, it would install a default source filter to strip -carriage returns from source code before the parser proper got to see it. +XXX =back =head1 Testing +XXX Any significant changes to the testing of a freshly built perl should be +listed here. Changes which create B<new> files in F<t/> go here as do any +large changes to the testing harness (e.g. when parallel testing was added). +Changes to existing files in F<t/> aren't worth summarizing, although the bugs +that they represent may be covered elsewhere. + +XXX If there were no significant test changes, say this: + Tests were added and changed to reflect the other additions and changes in this release. -=head1 Internal Changes +XXX If instead there were significant changes, say this: + +Tests were added and changed to reflect the other additions and +changes in this release. Furthermore, these significant changes were +made: + +[ List each test improvement as an =item entry ] =over 4 =item * -New API functions are introduced to convert strings encoded in UTF-8 to -their ordinal code point equivalent. These are safe to use by default, -and generally more convenient to use than the existing ones. +XXX -L<perlapi/C<utf8_to_uv>> and L<perlapi/C<utf8_to_uv_or_die>> replace -L<perlapi/C<utf8_to_uvchr>> (which is retained for backwards -compatibility), but you should convert to use the new forms, as likely -you aren't using the old one safely. +=back -To convert in the opposite direction, you can now use -L<perlapi/C<uv_to_utf8>>. This is not a new function, but a new synonym -for L<perlapi/C<uvchr_to_utf8>>. It is added so you don't have to learn -two sets of names. +=head1 Platform Support -There are also two new functions, L<perlapi/C<strict_utf8_to_uv>> and -L<perlapi/C<c9strict_utf8_to_uv>> which do the same thing except when -the input string represents a code point that Unicode doesn't accept as -legal for interchange, using either the strict original definition -(C<strict_utf8_to_uv>), or the looser one given by -L<Unicode Corrigendum #9|https://www.unicode.org/versions/corrigendum9.html> -(C<c9strict_utf8_to_uv>). When the input string represents one of the -restricted code points, these functions return the Unicode -C<REPLACEMENT CHARACTER> instead. +XXX Any changes to platform support should be listed in the sections below. -Also L<perlapi/C<extended_utf8_to_uv>> is a synonym for C<utf8_to_uv>, for use -when you want to emphasize that the entire range of Perl extended UTF-8 -is acceptable. +[ Within the sections, list each platform as an =item entry with specific +changes as paragraphs below it. ] -There are also replacement functions for the three more specialized -conversion functions that you are unlikely to need to use. Again, the -old forms are kept for backwards compatibility, but you should convert -to use the new forms. +=head2 New Platforms -L<perlapi/C<utf8_to_uv_flags>> replaces L<perlapi/C<utf8n_to_uvchr>>. +XXX List any platforms that this version of perl compiles on, that previous +versions did not. These will either be enabled by new files in the F<hints/> +directories, or new subdirectories and F<README> files at the top level of the +source tree. -L<perlapi/C<utf8_to_uv_errors>> replaces L<perlapi/C<utf8n_to_uvchr_error>>. +=over 4 -L<perlapi/C<utf8_to_uv_msgs>> replaces -L<perlapi/C<utf8n_to_uvchr_msgs>>. +=item XXX-some-platform -Also added are the inverse functions L<perlapi/C<uv_to_utf8_flags>> -and L<perlapi/C<uv_to_utf8_msgs>>, which are synonyms for the existing -functions, L<perlapi/C<uvchr_to_utf8_flags>> and -L<perlapi/C<uvchr_to_utf8_flags_msgs>> respectively. These are provided only -so you don't have to learn two sets of names. +XXX -=item * +=back -Three new API functions are introduced to convert strings encoded in -UTF-8 to native bytes format (if possible). These are easier to use -than the existing ones, and they avoid unnecessary memory allocations. -The functions are L<perlapi/C<utf8_to_bytes_overwrite>> which is used -when it is ok for the input string to be overwritten with the converted -result; and L<perlapi/C<utf8_to_bytes_new_pv>> and -L<perlapi/C<utf8_to_bytes_temp_pv>> when the original string must be -preserved intact. C<utf8_to_bytes_temp_pv> returns the result in a -temporary using L<perlapi>/C<SAVEFREEPV> that will automatically be -destroyed. With C<utf8_to_bytes_new_pv>, you are responsible for -freeing the newly allocated memory that is returned if the conversion is -successful. - -The latter two functions are designed to replace -L<perlapi/C<bytes_from_utf8>> which creates memory unnecessarily, or -unnecessarily large. +=head2 Discontinued Platforms -=item * +XXX List any platforms that this version of perl no longer compiles on. + +=over 4 + +=item XXX-some-platform -New API functions L<C<valid_identifier_pve()>|perlapi/valid_identifier_pve>, -L<C<valid_identifier_pvn()>|perlapi/valid_identifier_pvn> and -L<C<valid_identifier_sv()>|perlapi/valid_identifier_sv> have been added, which -test if a string would be considered by Perl to be a valid identifier name. +XXX + +=back + +=head2 Platform-Specific Notes + +XXX List any changes for specific platforms. This could include configuration +and compilation changes or changes in portability/compatibility. However, +changes within modules for platforms should generally be listed in the +L</Modules and Pragmata> section. + +=over 4 + +=item XXX-some-platform + +XXX + +=back + +=head1 Internal Changes + +XXX Changes which affect the interface available to C<XS> code go here. Other +significant internal changes for future core maintainers should be noted as +well. + +[ List each change as an =item entry ] + +=over 4 =item * -When assigning from an SVt_IV into a SVt_NV (or vice versa), providing that -both are "bodyless" types, Perl_sv_setsv_flags will now just change the -destination type to match the source type. Previously, an SVt_IV would have -been upgraded to a SVt_PVNV to store an NV, and an SVt_NV would have been -upgraded to a SVt_PVIV to store an IV. This change prevents the need to -allocate - and later free - the relevant body struct. +XXX =back =head1 Selected Bug Fixes +XXX Important bug fixes in the core language are summarized here. Bug fixes in +files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>. + +XXX Include references to GitHub issues and PRs as: [GH #12345] and the release +manager will later use a regex to expand these into links. + +[ List each fix as an =item entry ] + =over 4 =item * -Declaring a lexically scoped array or hash using C<state> within a subroutine -and then immediately returning no longer triggers a "Bizarre copy of HASH/ARRAY -in subroutine exit" error. [GH #18630] +XXX + +=back + +=head1 Known Problems + +XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any +tests that had to be C<TODO>ed for the release would be noted here. Unfixed +platform specific bugs also go here. + +[ List each fix as an =item entry ] + +=over 4 =item * -C<builtin::trim()> didn't properly clear C<TARG> which could result in -out of date cached numeric versions of the value being used on a -second evaluation. Properly clear any cached values. [GH #22784] +XXX =back -=head1 Acknowledgements +=head1 Errata From Previous Releases -Perl 5.41.7 represents approximately 4 weeks of development since Perl -5.41.6 and contains approximately 11,000 lines of changes across 160 files -from 16 authors. +=over 4 -Excluding auto-generated files, documentation and release tools, there were -approximately 6,400 lines of changes to 96 .pm, .t, .c and .h files. +=item * -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.41.7: +XXX Add anything here that we forgot to add, or were mistaken about, in +the F<perldelta> of a previous release. -Dagfinn Ilmari Mannsåker, Daniel Dragan, Ed Sabol, James E Keenan, Karen -Etheridge, Karl Williamson, Lukas Mai, Mark Fowler, Max Maischein, Paul -Evans, Richard Leach, Scott Baker, Sisyphus, TAKAI Kousuke, Thibault -Duponchelle, Tony Cook. +=back -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. +=head1 Obituary + +XXX If any significant core contributor or member of the CPAN community has +died, add a short obituary here. + +=head1 Acknowledgements -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. +XXX Generate this with: -For a more complete list of all of Perl's historical contributors, please -see the F<AUTHORS> file in the Perl source distribution. + perl Porting/acknowledgements.pl v5.41.7..HEAD =head1 Reporting Bugs diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index f2baf06aee2e..5c96616a4891 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -298,7 +298,7 @@ utils : $(utils1) $(utils2) $(utils3) $(utils4) $(utils5) extra.pods : miniperl @ @extra_pods.com -PERLDELTA_CURRENT = [.pod]perl5417delta.pod +PERLDELTA_CURRENT = [.pod]perl5418delta.pod $(PERLDELTA_CURRENT) : [.pod]perldelta.pod Copy/NoConfirm/Log $(MMS$SOURCE) $(PERLDELTA_CURRENT) diff --git a/win32/GNUmakefile b/win32/GNUmakefile index ed7e43c51614..b01900aca765 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -1643,7 +1643,7 @@ utils: $(HAVEMINIPERL) ..\utils\Makefile copy ..\README.tw ..\pod\perltw.pod copy ..\README.vos ..\pod\perlvos.pod copy ..\README.win32 ..\pod\perlwin32.pod - copy ..\pod\perldelta.pod ..\pod\perl5417delta.pod + copy ..\pod\perldelta.pod ..\pod\perl5418delta.pod $(MINIPERL) -I..\lib $(PL2BAT) $(UTILS) $(MINIPERL) -I..\lib ..\autodoc.pl -c "win32\$(CONFIG_H)" .. $(MINIPERL) -I..\lib ..\pod\perlmodlib.PL -q .. @@ -1743,7 +1743,7 @@ distclean: realclean -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS -cd $(PODDIR) && del /f *.html *.bat roffitall \ - perl5417delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ + perl5418delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \ perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \ perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \ diff --git a/win32/Makefile b/win32/Makefile index 0b55bb377d62..d06df3220114 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1165,7 +1165,7 @@ utils: $(PERLEXE) ..\utils\Makefile copy ..\README.tw ..\pod\perltw.pod copy ..\README.vos ..\pod\perlvos.pod copy ..\README.win32 ..\pod\perlwin32.pod - copy ..\pod\perldelta.pod ..\pod\perl5417delta.pod + copy ..\pod\perldelta.pod ..\pod\perl5418delta.pod cd ..\win32 $(PERLEXE) $(PL2BAT) $(UTILS) $(MINIPERL) -I..\lib ..\autodoc.pl -c "win32\$(CONFIG_H)" .. @@ -1266,7 +1266,7 @@ distclean: realclean -if exist $(LIBDIR)\Win32API rmdir /s /q $(LIBDIR)\Win32API -if exist $(LIBDIR)\XS rmdir /s /q $(LIBDIR)\XS -cd $(PODDIR) && del /f *.html *.bat roffitall \ - perl5417delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ + perl5418delta.pod perlaix.pod perlamiga.pod perlandroid.pod \ perlapi.pod perlbs2000.pod perlcn.pod perlcygwin.pod \ perlfreebsd.pod perlhaiku.pod perlhpux.pod perlhurd.pod \ perlintern.pod perlirix.pod perljp.pod perlko.pod perllinux.pod \ diff --git a/win32/pod.mak b/win32/pod.mak index ec0a9f08d9c8..b2331a3a7be5 100644 --- a/win32/pod.mak +++ b/win32/pod.mak @@ -84,6 +84,7 @@ POD = perl.pod \ perl5415delta.pod \ perl5416delta.pod \ perl5417delta.pod \ + perl5418delta.pod \ perl561delta.pod \ perl56delta.pod \ perl581delta.pod \ @@ -268,6 +269,7 @@ MAN = perl.man \ perl5415delta.man \ perl5416delta.man \ perl5417delta.man \ + perl5418delta.man \ perl561delta.man \ perl56delta.man \ perl581delta.man \ @@ -452,6 +454,7 @@ HTML = perl.html \ perl5415delta.html \ perl5416delta.html \ perl5417delta.html \ + perl5418delta.html \ perl561delta.html \ perl56delta.html \ perl581delta.html \ @@ -636,6 +639,7 @@ TEX = perl.tex \ perl5415delta.tex \ perl5416delta.tex \ perl5417delta.tex \ + perl5418delta.tex \ perl561delta.tex \ perl56delta.tex \ perl581delta.tex \