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
Subroutine redefined warnings since Perl 5.35.9, dependent on module loading order #20246
Comments
@leonerd, can you take a look at this ticket? The problem appears connected to one of your commits from the last dev cycle. Thanks. |
Hi, could I request some eyeballs on this? It's a clear regression that affects at least MetaCPAN-Client for us, making it warn on plain See also https://bugs.debian.org/1019757 Thanks for your work as always! |
@leonerd, please take a look at this ticket. Thanks. |
Previously, Now, It would be possible for But As for Cpanel::JSON::XS and JSON::PP, they should probably take advantage of overload's unimport method to remove the methods they intend to overwrite. |
@haarg , thank you. Shipped JSON::PP 4.12 with your suggested fix. |
JSON-PP-4.12 synched into blead via commit 2edec0e. Will monitor for a few days before closing ticket. |
Well, that was more than a few days. No problems reported; closing ticket. |
(Creating a GH issue from https://www.nntp.perl.org/group/perl.perl5.porters/2022/09/msg264699.html.)
Kenichi Ishigaki wrote to Perl 5 Porters on September 4, 2022:
I have received a bug report that says loading JSON::PP after Cpanel::JSON::XS has started issuing Subroutine redefined warnings (again) since Perl 5.36 (more precisely, 5.35.9).
The report suggests this should be fixed in JSON::PP, and it is possible to add a weird workaround such as this in Cpanel-JSON-XS to JSON-PP, but I am wondering if this is more like a regression in Perl as the warnings reappear only recently.
Any thoughts?
Kenichi, initial thoughts ... On the one hand, these new warnings can be attributed to a change in Perl. On the other hand, you may wish to add a workaround similar to what @rurban did in Cpanel-JSON-XS.
My investigation indicates that these warnings first appeared in this commit:
This commit actually improved the warnings situation, because if we were to build perl at the previous commit, you would get even murkier warnings. Before and after on FreeBSD:
If you were to run a one-liner without warnings at the before and after commits, you would get:
So the crucial commit suppressed certain experimental warnings, but (I suspect) earlier commits in this time period created the potential for the warnings which you will only see if you ask for warnings.
@leonerd, can you investigate further?
Thank you very much.
Jim Keenan
The text was updated successfully, but these errors were encountered: