fix: remove dead code and fix misleading debug log#57
Merged
toddr merged 1 commit intocpan-authors:mainfrom Mar 22, 2026
Merged
fix: remove dead code and fix misleading debug log#57toddr merged 1 commit intocpan-authors:mainfrom
toddr merged 1 commit intocpan-authors:mainfrom
Conversation
- Remove unused $iqReply variable and unreachable if-block in
_jabber_in_iq_message (declared but never assigned)
- Remove unused $reconnect_timeout variable in Start()
- Move DEBUG("Message not relevant to bot") inside the return-early
branch so it only logs when the message is actually irrelevant
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 three instances of dead/misleading code from Bot.pm.
Why
Dead code obscures intent and makes the module harder to maintain. The misleading DEBUG log actively confuses anyone reading debug output.
How
_jabber_in_iq_message: removed$iqReply(declared line 791, never assigned) and its unreachableif ($iqReply)block — leftover from when more IQ types were plannedStart(): removed$reconnect_timeout(set to 1, never read) — the actual sleep is hardcoded to 5_process_jabber_message: movedDEBUG("Message not relevant to bot")inside the!defined $requestguard so it only fires when the message is genuinely irrelevantTesting
Full test suite passes (327 tests, 14 files).
🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 4 insertions(+), 14 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline