Skip to content

prepare perldelta for the release of v5.42.0 #23366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: blead
Choose a base branch
from
Draft

Conversation

book
Copy link
Contributor

@book book commented Jun 11, 2025

This is a manual merge of the perl541*delta.pod files in preparation for the 5.42.0 release.

Review and comments (especially about omissions and inconsistencies) are very welcome.

We wonder if the (currently)sections about apostrophe_as_package_separator and smartmatch really belong to "Incompatible Changes" and not to "Core Enhancements". The "unfeatures" are backward-compatible by design.

@Leont
Copy link
Contributor

Leont commented Jun 11, 2025

The cloning of dirhandle bug isn't mentioned (probably because I neglected to write that for the dev release). That should absolutely be in the stable release though.


=head2 New C<any> and C<all> operators

Two new experimental features have been added, which add two new list-processing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than have 2x "two new", how about "Two new experimental features add the list-processing operators, C and C."?

Comment on lines +100 to +104
This can be controlled with the C<apostrophe_as_package_separator>
feature which is enabled by default, but is disabled from the 5.41
feature bundle onwards.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this perldelta, should it read "disabled from the 5.42 feature bundle onwards"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, :5.41 is an alias to :5.42. The documentation for feature also says: "This is enabled by default, but disabled from the 5.41 feature bundle
onwards."

However, the use of development bundles is not very consistent in feature.pm, so maybe we should just mention stable versions in there.

Comment on lines +146 to +153
They were deprecated in Perl v5.38.0 and scheduled for removal in Perl
5.42.0, and entirely removed in Perl 5.41.3.

After some discussion these have been re-instated in 5.41.9.

Using them no longer produces a deprecation warning.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably too much detail for this perldelta. How about something along the lines of:

"They were deprecated in Perl v5.38.0 and scheduled for removal in Perl 5.42.0, but after some discussion their removal has been indefinitely postponed. Using them no longer produces a deprecation warning."

Note that calling C<eval EXPR> in a function unconditionally causes a function
to reference its enclosing functions as it always has.

=head2 Switch and Smart Match operator reinstated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs merging with the previous version of this notice.


=item *

XXX
C<Perl_leave_adjust_stacks>: additional efficiency for mortal copies.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs to be included. It's unlikely to be very user-noticeable.

Comment on lines +413 to +411
=item *

Subroutines in packages no longer need to be stored in typeglobs:
declaring a subroutine will now put a simple sub reference directly in the
stash if possible, saving memory. The typeglob still notionally exists,
so accessing it will cause the stash entry to be upgraded to a typeglob
(i.e. this is just an internal implementation detail).
This optimization does not currently apply to XSUBs or exported
subroutines, and method calls will undo it, since they cache things in
typeglobs.
[L<GH #23001|https://github.com/Perl/perl5/issues/23001>]

(This optimization was originally announced in L<perl5220delta>, but due to a
bug it only worked for subroutines in package C<main>, not in modules.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this got reverted

Comment on lines 996 to 998
=item *

pp_reverse: don't COW buffer just to then un-COW it [L<GH #22729|https://github.com/Perl/perl5/issues/22729>]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't need to be included. There's no API change, it doesn't change the visible operation of the OP and the performance change won't be noticeable to end users.

@book
Copy link
Contributor Author

book commented Jun 12, 2025

The cloning of dirhandle bug isn't mentioned (probably because I neglected to write that for the dev release). That should absolutely be in the stable release though.

Please take the time to write it in: you're the best positioned to do it.

@book
Copy link
Contributor Author

book commented Jun 12, 2025

@richardleach Thanks a lot for your review! I'll go over it soon.

@book
Copy link
Contributor Author

book commented Jun 18, 2025

Note to self: mention the doc change from fdbbfbf.

Co-authored-by: Thibault Duponchelle <[email protected]>
Co-authored-by: Eric Herman <[email protected]>
@book
Copy link
Contributor Author

book commented Jun 18, 2025

Note to self: move apostrophe_as_package_separator and smartmatch unfeatures in the "Core Enhancements" section. Look at the deltas for 5.36 and 5.38 for examples.

khwilliamson
khwilliamson previously approved these changes Jun 18, 2025
@khwilliamson khwilliamson dismissed their stale review June 18, 2025 18:30

I pressed the wrong button

@robrwo
Copy link
Contributor

robrwo commented Jun 18, 2025

Note to self: mention the doc change from fdbbfbf.

"The recommended alternatives to the rand() function were updated to modern modules recommended by the CPAN Security Group."

invoking the code block.

The feature flags enabling those keywords have been named L<keyword_any>
and L<keyword_all> to avoid confusion with to the ability of the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with to the doesn't make sense to me

Comment on lines +100 to +104
This can be controlled with the C<apostrophe_as_package_separator>
feature which is enabled by default, but is disabled from the 5.41
feature bundle onwards.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so


Along with the ability to declare methods lexically, this release also permits
invoking a lexical subroutine as if it were a method, bypassing the usual
name-based method resolution by name.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name...name sounds redundant

They were deprecated in Perl v5.38.0 and scheduled for removal in Perl
5.42.0, and entirely removed in Perl 5.41.3.

After some discussion these have been re-instated in 5.41.9.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/some/extensive/
seems better to me

It is believed that this vulnerability can enable Denial of Service or
Arbitrary Code Execution attacks on platforms that lack sufficient defenses.

Discovered by: Nathan Mills.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add that the patch to fix this is applicable to all perls that are vulnerable, including those out-of-support

=head3 L<XXX>
C<gv_autoload4> is now documented with C<gv_autoload_pv> and additional notes added.

=back
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add that the long Perl_ forms are now listed when available

=item *

Normalized alignment of verbatim sections, fixing how they are displayed by
some Pod viewers that strip indentation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make sense to me. A viewer that strips indentation doesn't care about the original spacing.

I'd like to know of any viewers that don't strip the indentation and substitute their own.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content was using tabs for alignment of column data. But it was using 4 spaces for indents. If the indentation you strip is not aligned with a tab stop, then it changes the alignment of the later tabs.

You can see the result of this in the precedence table on https://perldoc.perl.org/perlop#Operator-Precedence-and-Associativity

Normalized alignment of verbatim sections, fixing how they are displayed by
some Pod viewers that strip indentation.

=back
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were several very recent changes to perlop that probably should be mentioned.

=over 4

=item *

XXX
A new F<t/run/todo.t> test script was added as a place for TODO tests
for known unfixed bugs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add that patches are welcome to add to this file


=item *

Enable removing most of mathoms.c and stub functions [L<GH #22691|https://github.com/Perl/perl5/issues/22691>] and [L<GH #22714|https://github.com/Perl/perl5/issues/22714>]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been reverted

=item *

put apostrophe as package separator behind a default enabled feature,
which is disabled from feature bundle 5.41.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this already covered enough earlier?


However, the separate numeric/string bitwise operators provided by L<the
C<bitwise> feature|feature/The 'bitwise' feature>, C<< &= ^= |= &.= ^.= |.= >>,
did not do so:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did is confusing with the above, and not fully explained below


=item *

XXX
Fix C<POSIX::strftime()> [L<GH #22369|https://github.com/Perl/perl5/issues/22369>].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

below we also mention strftime. The two should be merged

=item *

On threaded builds on POSIX-like systems, if the perl signal handler
receives we now resend the signal to the main perl thread. Previously
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

receives what?

=item *

L<perlfunc/shmread> and L<perlfunc/shmwrite> are no longer limited to 31-bit
values for their POS and SIZE arguments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they still are on a 32 bit box, no?


=item *

Save debugger lines as C<PVIV> SVs rather than as C<PVMG> SVs as they
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs expansion to make sense. And probably less detail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And is this change actually visible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not capable of expanding that, though.

=item *

Prevent a signature parameter of the form C<$ => from leaking an OP at
compile-time. [L<GH #23187|https://github.com/Perl/perl5/issues/23187>]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this important enough to include?


L<perlfunc/readline> now clears the error flag if an error occurs when
reading and that error is C<EAGAIN> or C<EWOULDBLOCK>. This allows
old code that depended on C<readline> to clear all errors to ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does the code have to be "old"


=item *

L<C<open>|perlfunc/open> automatically creates an anonymous temporary file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds similar to a previous entry.

@thibaultduponchelle thibaultduponchelle force-pushed the book/perl5420delta branch 2 times, most recently from e7c160d to 66fe524 Compare June 19, 2025 09:23
@thibaultduponchelle
Copy link
Member

thibaultduponchelle commented Jun 19, 2025

@haarg It would be great if you could double check aac338e (I followed your 17182bb) 🙏🏼

@haarg
Copy link
Contributor

haarg commented Jun 19, 2025

@haarg It would be great if you could double check aac338e (I followed your 17182bb) 🙏🏼

The commit message isn't quite right, because this just cleans up the old delta files, it doesn't do the merge.

@thibaultduponchelle
Copy link
Member

The commit message isn't quite right, because this just cleans up the old delta files, it doesn't do the merge.

I fixed that, thank you :)

@book book force-pushed the book/perl5420delta branch from 10396cf to 82c3b20 Compare June 19, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants