Bug#781697: libjson-perl: Erroneous Perl warnings
Damyan Ivanov
dmn at debian.org
Wed Apr 1 19:54:50 UTC 2015
Control: reassign -1 libjson-xs-perl
Control: retitle -1 (to|from)_json prototype mismatch with JSON
Control: affects -1 libjson-perl
-=| Victor Porton, 01.04.2015 20:50:48 +0300 |=-
> Package: libjson-perl
> Version: 2.61-1
> Severity: minor
>
> There are erroneous warnings using JSON modules.
>
> $ perl -Mstrict -Mwarnings -MJSON -MJSON::XS -e ''
> Prototype mismatch: sub main::to_json ($@) vs ($) at /usr/share/perl/5.20/Exporter.pm line 66.
> at -e line 0.
> Prototype mismatch: sub main::from_json ($@) vs ($) at /usr/share/perl/5.20/Exporter.pm line 66.
> at -e line 0.
As fas as I see, the prototype in JSON.pm is ($@) and it is right (as
far as prototypes go), as the routines take optional hash reference.
The prototype in JSON::XS is ($), leading to the warnings.
The prototype in JSON.pm is such since the first packaged version
(2008), so I guess the bug is clearly in JSON::XS.
More information about the pkg-perl-maintainers
mailing list