Rex
Rex copied to clipboard
lib/Rex/Config.pm: slurp file content using IO::File.
Fixes #1466.
This PR is an attempt to fix #1466. The ticket is self-explanatory as well as those changes.
Checklist
- [x] based on top of latest source code
- [ ] changelog entry included: not needed.
- [ ] tests pass in CI: not sure there are tests for such a change.
- [x] git history is clean
- [ ] git commit messages are well-written
Thanks @monsieurp for your contribution!
Tis PR is still marked as draft only, but reading through the linked issue and the proposed changes, I can provide some early feedback below and/or as code comments.
- [ ] changelog entry included: not needed.
Hmm, yeah, I agree it's probably fine to skip changelog entries for changes such as automated code formatting, refactoring, or CI workflow changes.
- [ ] tests pass in CI: not sure there are tests for such a change.
As a minimum quality requirement the current test suite should still pass. Ideally, if a changed code path is not covered yet, tests could be added first (to demonstrate a code is solid either by fixing a failing test to proving that it still passes the tests).
Currently t/config-ssh.t
fails in CI and on my system too.
There are currently 35 instances of local @ARGV ... <>
-style slurps. What do you think about fixing them all? Would we need a good module for that, or perhaps some helper function in Rex core?
I've fixed some CI-related issues recently, so you might need to rebase this PR on top if current default branch, and (force) push your branch again.
ps.: a git commit is explicit about which files are being changed, so there's no need to duplicate that info in the commit message. and to stop it with the period. Also do not end the subject line with a period.
E.g. instead of:
lib/Rex/Config.pm: slurp file content using IO::File.
it's fine to simply write:
Slurp file content using IO::File
It might also work better to explain what and why vs. how. E.g.
Avoid slurping with <> during compile time