-
Notifications
You must be signed in to change notification settings - Fork 8
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
Study changes to regen/regen*.pl #198
Comments
@jkeenan, his looks interesting. Thank you. |
Here are my notes, tried to focus on what was relevant to know wrt "strict by default"
|
Wow! You really took the study part of the issue's subject seriously. This sets a very good example for other "code understanders" to come. Two questions:
Thank you very much. |
I was not looking at the change branch, apparently - but I was on the
I'll take a look at the changes in |
Here's the only diff in the files I studied between
(no other files in this task are different) |
Not 100% sure why I had to look up what |
|
@oodler577, what your research has inadvertently called to my attention is an error in the algorithm I used to determine which files had changed between the time we started work on "perl 7" and the present. My formula incorrectly identified a number of files as having non-whitespace changes. The formula I should have used to calculate the files needing study was this:
English translation: Return only the names of those files in the When you run the command above, only 3 files are returned:
Now, the fact that you studied more than just those three files is not wasted effort. It means that the number of people in the world has just grown by a large percentage! But what it does mean is:
Thank you very much. |
And on still more analysis, I realize that of the 3 files cited above, only 1 of them was originally included in this issue: So if you think that I apologize for the confusion. Thank you very much. |
This has been very fun and interesting so far. Thank you for the detailed explanation above. update - I will look at regen/feature.pl quickly and opine |
@jkeenan - I looked over it once more. I also have a correction to my note, I also see |
It turns out that formats can be problematic when we have a program running with strict on by default -- though I don't think this is the case with your files. That's because a format is an entry in a typeglob, so it's global. Moreover, formats, like subroutines, can be declared anywhere in a file. So there are cases where (a) we have test files that have accumulated hundreds of different unit tests over 33 years; (b) we have a format definition at, say, line 800 of a file; but (c) we have a reference to the format entry in the corresponding typeglob at, say, line 200 of a file. If, during debugging, I comment out lines 500 to 1000 of that file, I'm commenting out the format definition and causing an exception at line 200. So seeing a format declaration in the middle of a big test file is a red flag (though refactoring such files is not the point of this project right now). In any event, I'm satisfied with the work you've done on this ticket and am closing it now. At your earliest convenience, I'd encourage you to take on another ticket, perhaps one for the Thank you very much. |
In this ticket we will study our progress in pursuit of Objective 2, "strict-by-default", for the following files in the Perl core distribution:
These files should be evaluated in light of the guidelines presented on this wiki page. Please post the summary of your findings in a single comment in this issue.
First-time contributors: Please post a comment to this ticket indicating you are working on it. That will enable us to assign the ticket to you. (GitHub won't let us do that until it already thinks you're part of the project.)
Thank you for helping to improve the Perl programming language.
The text was updated successfully, but these errors were encountered: