Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Thursday December 20, 2007
05:28 AM

Test::JSON Now Failing

[ #35161 ]

My Test::JSON currently has 2 failures out of 106 test reports sent. One failure appears to be a messed up Perl installation, but the one I received yesterday is due to the JSON module being updated in a non-backwards compatible way. Apparently, there was a deprecation period of a whopping twelve days (going by the date of the first release of the new API to 2.0). I had not heard that there was going to be a new API and the author has made it clear that he won't support the old API.

Now I'll have to get a new release of Test::JSON out the door. Do I go through the trouble of allowing it to support the older JSON module in addition to the new API? I might. Frankly, I'm frustrated to be caught completely off guard by such a radical change in this important module, though I realize I'm not the first. But a twelve day deprecation period is ridiculous. And was this even at least announced anywhere? I might even look to switching to a different JSON module with an author who is less likely to pull the rug out from under me so quickly.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I currently have failing tests with JSON::Any because JSON::XS decided to make a similar (not the same mind you but related) API change without a deprecation period *at all* (and in a point release no less!).

    So really what would the alternative be?
    • :(

      This is very frustrating. I guess I really can't recommend anything. I'd be tempted to say JSON::Syck [cpan.org] as Tatsuhiko's pretty sharp and is unlikely to break everyone's code without warning, but I see there are a number of serious bug reports and it doesn't appear to be widely used :/

      • Well I just fixed JSON::Any to work, and since I didn't have to change a single test I suspect I'm 100% backwards compatible to what you're running. Sooo ... might I suggest JSON::Any?
  • Wow. I would have been kicking holes in walls and frothing at the mouth trying to debug if I hadn't seen your post, and wandered over to CPAN. "He couldn't possibly mean the 2 main methods in the module...could he ?"

    Yep.

    I think I've just discovered a new definition of arbitrary and capricious. But it appears the author has backed off for a bit...and will instead grace us with nagging warnings.

    • Ah, that's a relief. I'll take the warnings over the breakage any day of the week :)

    • Heh, at first I read the word in the subject of the comment as “headsoup” – and considering the issue at hand, that would be apt enough…