Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove overloads before re-adding them to silence warnings #205

Merged
merged 1 commit into from Oct 19, 2022

Conversation

haarg
Copy link
Contributor

@haarg haarg commented Oct 19, 2022

To prevent warnings from redefining overloads on JSON::PP::Boolean, the code is setting $^W to 0. This has classically worked because overload.pm did not enable or disable warnings. This is not something that should be relied on.

Rather than rely on $^W, just remove the overloads we are expecting to overwrite using overload->unimport.

To prevent warnings from redefining overloads on JSON::PP::Boolean, the
code is setting $^W to 0. This has classically worked because
overload.pm did not enable or disable warnings. This is not something
that should be relied on.

Rather than rely on $^W, just remove the overloads we are expecting to
overwrite using overload->unimport.
@rurban
Copy link
Owner

rurban commented Oct 19, 2022

Excellent idea! p5p should do the same with their core modules

@rurban rurban merged commit 1f48ba1 into rurban:master Oct 19, 2022
@haarg
Copy link
Contributor Author

haarg commented Oct 19, 2022

JSON::PP at least has already integrated this change. I'll probably take a look and see if it applies anywhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants