fix: bareword check typo + grep-on-hash bug#189
Closed
Koan-Bot wants to merge 2 commits intocpanel:masterfrom
Closed
fix: bareword check typo + grep-on-hash bug#189Koan-Bot wants to merge 2 commits intocpanel:masterfrom
Koan-Bot wants to merge 2 commits intocpanel:masterfrom
Conversation
52b34c1 to
86feb03
Compare
…zation Bug fixes: - Fix $_[9] typo in 6 dir functions (opendir, readdir, telldir, rewinddir, seekdir, closedir). The bareword detection guard was checking an out-of-bounds argument index instead of the first argument. In practice this didn't crash because _upgrade_barewords handles the case, but the condition was semantically wrong (always true instead of ref-checking). - Fix grep on hash values in dir() — was matching against both keys AND values of %files_being_mocked, should only match keys. - Fix POD: missing space in =item, typos (Unkownn, reaosn, desciptors). CI modernization: - Upgrade actions/checkout v2 -> v4 - Add Perl 5.34, 5.36, 5.38, 5.40 to CI matrix - Drop EOL Perl 5.10 and 5.12 from matrix (5.14+ still tested) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
86feb03 to
fc4f799
Compare
atoomic
reviewed
Feb 9, 2026
|
|
||
| # Upgrade but ignore bareword indicator | ||
| ( undef, @_ ) = _upgrade_barewords(@_) if defined $_[0] && !ref $_[9]; | ||
| ( undef, @_ ) = _upgrade_barewords(@_) if defined $_[0] && !ref $_[0]; |
Contributor
There was a problem hiding this comment.
is it really what we want there? 🤷
Contributor
There was a problem hiding this comment.
I ve the feeling that this wrong and we intentionally check defined on 0 and ref on 9
Member
|
Please submit these fixes as individual pull requests so I can merge some but not all of the fixes. Let's close this ticket and open new ones for each individual change. |
This was referenced Feb 11, 2026
Contributor
Author
|
Split into individual PRs as requested:
CI modernization was already merged separately in 3967067. Closing this one. |
Contributor
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.
Summary
First exploration of Test-MockFile. Found and fixed several bugs and modernized CI.
Bug Fixes
$_[9]→$_[0]in 6 dir functions — bareword detection guard in__opendir,__readdir,__telldir,__rewinddir,__seekdir,__closedirwas checking an out-of-bounds argument index. The condition was always true (undef is not a ref), making_upgrade_barewordsrun unconditionally. Fixed to check$_[0]as originally intended.grepon hash indir()—grep m{...}, %files_being_mockediterates both keys AND values. Stringified mock objects could accidentally match the path regex. Fixed tokeys %files_being_mocked.=itembroke POD parsing for$file_ruleparameter inadd_strict_rule().Unkownn→Unknown,reaosn→reason,desciptors→descriptors.Review Scores
🤖 Generated with Claude Code