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

Subroutine JSON::PP::Boolean::(-- redefined with newer perls #76

Closed
ntyni opened this issue Aug 27, 2022 · 2 comments
Closed

Subroutine JSON::PP::Boolean::(-- redefined with newer perls #76

ntyni opened this issue Aug 27, 2022 · 2 comments

Comments

@ntyni
Copy link

ntyni commented Aug 27, 2022

As discussed in rurban/Cpanel-JSON-XS#201 this has started issuing warnings with Perl >= 5.36:

$ /opt/perl/bin/perl5.37.4 -we 'use Cpanel::JSON::XS (); use JSON::PP'
Subroutine JSON::PP::Boolean::(-- redefined at /opt/perl/lib/5.37.4/overload.pm line 52.
Subroutine JSON::PP::Boolean::(++ redefined at /opt/perl/lib/5.37.4/overload.pm line 52.
Subroutine JSON::PP::Boolean::(0+ redefined at /opt/perl/lib/5.37.4/overload.pm line 52.

I understand this should be fixed in JSON::PP.

The other direction (using JSON::PP first, then Cpanel::JSON::XS) was already fixed in Cpanel::JSON::XS 4.32.

@ntyni
Copy link
Author

ntyni commented Oct 5, 2022

Hi, thanks for bringing this up on the Perl side. Just in case you missed it: @haarg analyzed the problem in Perl/perl5#20246 , ending with:

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.

@charsbar
Copy link
Collaborator

charsbar commented Oct 8, 2022

Thanks for the notice. Shipped 4.12 with a fix suggested by haarg.

@charsbar charsbar closed this as completed Oct 8, 2022
jkeenan pushed a commit to Perl/perl5 that referenced this issue Oct 10, 2022
From Changes: Call unimport overload first to silence warnings.
(makamaka/JSON-PP#76, haarg++)

Committer: To keep 'make test_porting' happy, run:
    cd t; ./perl porting/regen.t; cd -
    ./perl -Ilib Porting/makemeta -j
scottchiefbaker pushed a commit to scottchiefbaker/perl5 that referenced this issue Nov 3, 2022
From Changes: Call unimport overload first to silence warnings.
(makamaka/JSON-PP#76, haarg++)

Committer: To keep 'make test_porting' happy, run:
    cd t; ./perl porting/regen.t; cd -
    ./perl -Ilib Porting/makemeta -j
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

No branches or pull requests

2 participants