tidy-up: fix Perl syntax and formatting nits - #22376
Closed
vszakats wants to merge 4 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tidies up a set of Perl scripts across the curl test suite, build helpers, and documentation tooling by addressing Perl syntax/formatting nits and moving several file opens toward the safer/more explicit 3-argument open(...) style.
Changes:
- Convert multiple
opencall sites from 2-arg forms likeopen FH, "<$file"/open(FH, ">$file")to 3-argopen(FH, "<", $file)/open(FH, ">", $file). - Apply consistent spacing/formatting in argument lists and
for(...)loops. - Minor tuple/argument formatting cleanups in a few helper modules.
Reviewed changes
Copilot reviewed 19 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testutil.pm | Uses 3-arg open in helper routines that read files for hashing/content extraction. |
| tests/testcurl.pl | Minor Perl formatting tweaks (loop formatting and open(...) call style). |
| tests/test1488.pl | Uses 3-arg open for reading the symbols-in-versions input. |
| tests/test1477.pl | Uses 3-arg open for header/manpage scanning. |
| tests/test1175.pl | Whitespace formatting in variable assignment from regex captures. |
| tests/test1165.pl | Uses 3-arg open for scanning config/docs inputs. |
| tests/test1135.pl | Uses 3-arg open for iterating include headers. |
| tests/test1119.pl | Uses 3-arg open for the preprocessor pipe. |
| tests/sshserver.pl | Consistent spacing in sshd_supports_opt(...) calls. |
| tests/servers.pm | Consistent spacing in tuple returns and assignment list. |
| tests/secureserver.pl | Consistent open(...) formatting for printing written config. |
| tests/runtests.pl | Uses 3-arg open with consistent quoting for buildinfo.txt. |
| tests/runner.pm | Consistent for(...) formatting in torture loop. |
| tests/memanalyze.pl | Consistent for(...) formatting when printing results. |
| tests/libtest/test613.pl | Uses 3-arg open, consistent spacing in timegm(...) and sprintf(...). |
| tests/libtest/test610.pl | Consistent spacing in move(...) call. |
| tests/getpart.pm | Consistent spacing in binmode(..., ":raw"). |
| tests/ftpserver.pl | Consistent spacing in comments/lists and caller indexing; loop formatting. |
| tests/devtest.pl | Consistent for(...) formatting for qx(...) output iteration. |
| src/mkhelp.pl | Consistent spacing in numeric expression inside printf. |
| scripts/release-notes.pl | Uses 3-arg open for writing RELEASE-NOTES. |
| scripts/mk-ca-bundle.pl | Spacing/formatting in list calls and 3-arg open for temp output file handling. |
| scripts/managen | Uses 3-arg open when reading curlver.h. |
| scripts/extract-unit-protos | Uses 3-arg open when scanning input files. |
| docs/libcurl/symbols.pl | Uses 3-arg open for reading symbols-in-versions. |
| docs/examples/version-check.pl | Uses 3-arg open for input files (including $ARGV[0]). |
| .github/scripts/verify-examples.pl | Uses 3-arg open for input/output file handling during example extraction. |
| .github/scripts/trimmarkdownheader.pl | Uses 3-arg open for in-place file rewrite flow. |
| .github/scripts/randcurl.pl | Uses 3-arg open and consistent for(...) loop formatting. |
| .github/scripts/cleancmd.pl | Uses 3-arg open for reading/writing the processed markdown files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/curl/curl/pull/22376/files?w=1