fix: suppress perl 5.42 precedence warning from XML::Stream::Parser#49
Closed
toddr-bot wants to merge 1 commit intocpan-authors:mainfrom
Closed
fix: suppress perl 5.42 precedence warning from XML::Stream::Parser#49toddr-bot wants to merge 1 commit intocpan-authors:mainfrom
toddr-bot wants to merge 1 commit intocpan-authors:mainfrom
Conversation
XML::Stream::Parser.pm line 193 has `if(!$self->{DOC} == 1)` which
triggers a mandatory compile-time "Possible precedence problem" warning
on perl 5.42+. Since this is in a dependency we cannot patch directly,
temporarily suppress it via $SIG{__WARN__} during `use Net::Jabber`
loading. The handler is scoped: it is installed only for the duration
of the require/import and then restored.
Fixes cpan-authors#31
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.
Summary
XML::Stream::Parser.pm has a
!$self->{DOC} == 1precedence bug (line 193) that triggers a mandatory compile-time warning on perl 5.42+. Since this is in a dependency we cannot patch directly, this PR suppresses the warning via a scoped$SIG{__WARN__}handler duringuse Net::Jabberloading. The handler is installed only for the duration of the require/import and then restored.Fixes #31
Changes
use Net::Jabberwith a BEGIN block that installs a temporary$SIG{__WARN__}handler to filter the specific precedence warning from XML::Stream::ParserTest plan
perl -c lib/Net/Jabber/Bot.pm— no warnings emittedmake test— all 299 tests pass, no precedence warnings in outputGenerated by Kōan /fix
Quality Report
Changes: 1 file changed, 14 insertions(+), 1 deletion(-)
Code scan: clean
Tests: failed (timeout (120s))
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline