Skip to content

Add some missing bits in features documentation: class, keyword_any, keyword_all #23438

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

Open
wants to merge 3 commits into
base: blead
Choose a base branch
from

Conversation

mvuets
Copy link

@mvuets mvuets commented Jul 15, 2025

I was adding missing features to experimental.pm. I couldn't find direct answers in which Perl versions the missing features (class, keyword_any, and keyword_all) were introduced. I had to do some code spelunking to figure it out. This patch is the result of my tiny investigation.

@jkeenan
Copy link
Contributor

jkeenan commented Jul 15, 2025

I checked out your branch locally, configured and built, then ran make test_porting. That exposed test failures in t/porting/authors.t and t/porting/regen.t, but also provided information as to how to correct these failures. You will probably have to run perl Porting/updateAUTHORS.pl to provide us with your name and email address, and also run make regen to address the other failures. Once you have made corrections, please re-push to your branch. Thanks.

@mvuets mvuets force-pushed the add-missing-features branch from deb7305 to fbd3c08 Compare July 16, 2025 13:43
@khwilliamson
Copy link
Contributor

@mvuets, thanks for this. It would be better to reorder the commits so your being an author comes before anything you authored.

@mvuets mvuets force-pushed the add-missing-features branch from fbd3c08 to 3318c56 Compare July 16, 2025 14:23
@mvuets
Copy link
Author

mvuets commented Jul 16, 2025

@jkeenan, my bad. I naively assumed I'd just send a quick patch and I didn't care about attribution. I apologise for causing you unnecessary work.

I have now got myself familiar with README, INSTALL, perlhack, etc., then configured perl, built perl, ran all tests, and it looks all okay on my end. The new patches have been rebased against blead and pushed.

Note: perlsource mentions Porting/podtidy and that "it's a good idea to run this on a pod file you've patched". I tried running it on both files, but it messed up a lot of existing formatting in perlexperiment.pod, so I didn't include that.

P.S. While I was writing this comment, I got a new failed test in t/porting/cmp_version.t. It's been fixed now. I'm going to re-push in a moment. Sorry for the noise.

P.P.S. @khwilliamson, noted! I don't know why is that better, but I've reordered them too.

Thank you all for help and patience. Whew 😅

@jkeenan
Copy link
Contributor

jkeenan commented Jul 17, 2025

Question for list: What would be the best way to verify statements such as this:

Introduced in Perl 5.37.9.

... at various points in lib/feature.pm?

@mauke
Copy link
Contributor

mauke commented Jul 17, 2025

@jkeenan Here's one way. Let's say I want to know when the class feature was added:

I run

git log -p -S class lib/feature.pm

to see all commits that added or removed the word class to/from lib/feature.pm. Unfortunately "class" is a common word, so this finds more than just the relevant commit. I type /'class' to search for 'class' in my pager (less). This quickly finds commit 99b497a, which did indeed add class => 'feature_class' to the %feature hash. I copy the commit hash.

I run

git describe --contains 99b497aa90ed7db99d29a301b47c91fba65c9cb3

to see the first tag that contains this commit. In this case it outputs v5.37.9~83^2~3, which means the commit is reachable from v5.37.9 (by going back 83 commits, then to the second parent (of what I assume is a merge commit), then back 3 commits again). In other words, the class feature was added between v5.37.8 and v5.37.9, so it first appeared in the v5.37.9 developer release, which corresponds to the v5.38.0 public release.

@mvuets
Copy link
Author

mvuets commented Jul 17, 2025

(I probably should have mentioned this in the commit message.) I used git-log -S (pickaxe) on perldelta.pod and then eyeballed when class was introduced. The git-describe method is good, I used its variation:

$ git name-rev --tags --name-only 8cf9e0b7ee431069f972a1e0a7ecc096a651a275
v5.37.9~63

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.

4 participants