fix: remove dead setlogsock call and expand Log.pm test coverage#70
Draft
toddr-bot wants to merge 1 commit into
Draft
fix: remove dead setlogsock call and expand Log.pm test coverage#70toddr-bot wants to merge 1 commit into
toddr-bot wants to merge 1 commit into
Conversation
setlogsock('unix') has been a no-op since Sys::Syslog 0.15 (2006) and
the cpanfile already requires >= 0.29. Remove the entire conditional
block that checked _PATH_LOG() and called setlogsock().
Add 10 tests covering Debug(), Error(), Fatal(), LogTime(), sprintf
formatting, and class method invocation — none of which had coverage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
What
Remove dead
setlogsock('unix')call from Log.pm and add tests for previouslyuntested Log utility methods.
Why
Sys::Syslog::setlogsock('unix')has been a no-op since Sys::Syslog 0.15 (2006).The cpanfile requires
>= 0.29, making the entire conditional block (OS checks,_PATH_LOG()probe,setlogsock()call) pure dead code. Meanwhile,Debug(),Error(),Fatal(),LogTime(), sprintf formatting, and class method invocationhad zero test coverage.
How
OpenLog()(lines 78-82)t/logfile.tcovering all untested Log.pm methodsTesting
Full test suite passes (86 subtests across 18 files). New tests verify:
Debug()suppression when debug flag is false, logging when trueError()logs aterrlevelFatal()logs and throws exception with formatted messageLog()sprintf-style argument formattingLogTime()returns valid timestampLog()as class method writes to STDERR🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 93 insertions(+), 6 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline