RESOLVED FIXED 55503
Fix misspelled word in build-webkit's checkForJavaSDK() and sort forward declarations
https://bugs.webkit.org/show_bug.cgi?id=55503
Summary Fix misspelled word in build-webkit's checkForJavaSDK() and sort forward decl...
Daniel Bates
Reported 2011-03-01 13:44:02 PST
It is unnecessary in Perl to explicitly write "()" in function prototypes for functions that take no arguments. So, we can remove the "()" from the function prototypes for writeCongrats(), checkForJavaSDK(), and unlinkZeroFiles(). Additionally, the word "download" is misspelled in the message printed in checkForJavaSDK().
Attachments
Patch (2.69 KB, patch)
2011-03-01 13:45 PST, Daniel Bates
eric: review+
Daniel Bates
Comment 1 2011-03-01 13:45:32 PST
Eric Seidel (no email)
Comment 2 2011-03-01 18:04:37 PST
Comment on attachment 84288 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=84288&action=review rs=me, assuming this is considered "good perl style". > Tools/Scripts/build-webkit:44 > +sub checkForJavaSDK; I guess this is good perl? Looks strange to a non-perl-er.
David Kilzer (:ddkilzer)
Comment 3 2011-03-02 09:21:31 PST
(In reply to comment #2) > (From update of attachment 84288 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=84288&action=review > > rs=me, assuming this is considered "good perl style". > > > Tools/Scripts/build-webkit:44 > > +sub checkForJavaSDK; > > I guess this is good perl? Looks strange to a non-perl-er. I'm not particularly fond of this style. I like my functions to have parenthesis, even if it makes them more C-like.
David Kilzer (:ddkilzer)
Comment 4 2011-03-02 09:22:16 PST
(In reply to comment #3) > I'm not particularly fond of this style. I like my functions to have parenthesis, even if it makes them more C-like. But not enough to oppose this change. (Which style is more prevalent in the tools Perl code?)
Daniel Bates
Comment 5 2011-03-02 10:23:17 PST
(In reply to comment #4) > (In reply to comment #3) > > I'm not particularly fond of this style. I like my functions to have parenthesis, even if it makes them more C-like. > > But not enough to oppose this change. (Which style is more prevalent in the tools Perl code?) Using some regular expressions against webkitdirs.pm and VCSUtils.pm (*), the empty parentheses notation is more prevalent than the no-parentheses notation (which is proposed in this patch). So, I can change this patch only be a spelling correction and sorting of the forward declarations. For completeness, the sentiment on #perl on freenode seems to be against all uses of prototypes. They referred me to the Usenet post <http://groups.google.com/group/comp.lang.perl.modules/msg/84484de5eb01085b?dmode=source&output=gplain>. (*) I used the following regular expressions. Match all prototypes: sub (.+)$ Match prototypes that don't contain "()": sub ([^($]+)$ Match prototypes that contain "()": sub (.+)\s*\(\) Match prototypes with at least one compile-time argument check: sub (.+)\s*\((.+)\)
David Kilzer (:ddkilzer)
Comment 6 2011-03-03 18:13:36 PST
(In reply to comment #5) > For completeness, the sentiment on #perl on freenode seems to be against all uses of prototypes. They referred me to the Usenet post <http://groups.google.com/group/comp.lang.perl.modules/msg/84484de5eb01085b?dmode=source&output=gplain>. ZOMG. I didn't have the patience to read through the whole thing. My experience with prototypes has been generally good as they've caught issues when I didn't pass in the correct number of arguments, and I usually prefer to use parenthesis when calling methods (except for some built-in functions). I suppose we could also define some standard rules for Perl scripts, although Perl seems to be on its way out in the WebKit project in favor of Python or Ruby. As I said, I don't feel strongly enough to r- this, but it would be good to settle on a common way to define methods in Perl scripts, at least for the remaining ones.
Daniel Bates
Comment 7 2011-03-06 17:09:38 PST
(In reply to comment #6) > (In reply to comment #5) > [...] > As I said, I don't feel strongly enough to r- this, but it would be good to settle on a common way to define methods in Perl scripts, at least for the remaining ones. I decided to defer the no-parentheses notation change. I reduced the scope of this bug and its patch to just the misspelled word and sorting the forward declarations. We should consider standardizing on a notation for our existing Perl scripts.
Daniel Bates
Comment 8 2011-03-06 17:11:57 PST
Note You need to log in before you can comment on or make changes to this bug.