Skip Menu |

This queue is for tickets about the Catalyst-View-JSON CPAN distribution.

Report information
The Basics
Id: 34042
Status: resolved
Priority: 0/
Queue: Catalyst-View-JSON

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.24
Fixed in: (no value)



Subject: Couldn't find a JSON Package.
My smoke box reported this test failure: Couldn't find a JSON Package. In http://www.nntp.perl.org/group/perl.cpan.testers/2008/03/msg1155037.html As so often this failure cannot be reproduced later because the smoker has installed something else in the meantime. Seems to be a different logic in the test script and in the dependency declaration. Or something There are three other testers reports with the same error message. Thanks,
Subject: Re: [rt.cpan.org #34042] Couldn't find a JSON Package.
Date: Thu, 13 Mar 2008 01:27:41 -0700
To: bug-Catalyst-View-JSON [...] rt.cpan.org
From: "Tatsuhiko Miyagawa" <miyagawa [...] gmail.com>
This is actually a problem with JSON::Any, isn't it? On 3/12/08, Andreas Koenig via RT <bug-Catalyst-View-JSON@rt.cpan.org> wrote: Show quoted text
> > Thu Mar 13 02:41:28 2008: Request 34042 was acted upon. > Transaction: Ticket created by ANDK > Queue: Catalyst-View-JSON > Subject: Couldn't find a JSON Package. > Broken in: 0.24 > Severity: Normal > Owner: Nobody > Requestors: ANDK@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34042 > > > > My smoke box reported this test failure: Couldn't find a JSON Package. > > In http://www.nntp.perl.org/group/perl.cpan.testers/2008/03/msg1155037.html > > As so often this failure cannot be reproduced later because the smoker > has installed something else in the meantime. Seems to be a different > logic in the test script and in the dependency declaration. Or something > > There are three other testers reports with the same error message. > > Thanks, > >
-- Tatsuhiko Miyagawa
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #34042] Couldn't find a JSON Package.
Date: Thu, 13 Mar 2008 22:07:03 +0100
To: bug-Catalyst-View-JSON [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Thu, 13 Mar 2008 04:27:58 -0400, "miyagawa@gmail.com via RT" <bug-Catalyst-View-JSON@rt.cpan.org> said:
Show quoted text
> This is actually a problem with JSON::Any, isn't it?
If it is you would know better than me. Could you then reassign the ticket to the JSON::Any queue with enough information attached so that the maintainers there understand what needs fixing? Otherwise let me know what I could do to clear things up. Thanks,
RT-Send-CC: andreas.koenig.7os6VVqR [...] franz.ak.mind.de, miyagawa [...] gmail.com
For what it's worth I ran into this issue on my in-house smoke test box and after struggling with it for days noticed a stray symlink to View/JSON.pm in the top level of the application directory. After removing the symlink make test was able to complete without failures. While troubleshooting, I also discovered that prove -l t/ was not subject to the unexpected failures. I'm not sure what that means. On Thu Mar 13 01:41:28 2008, ANDK wrote: Show quoted text
> My smoke box reported this test failure: Couldn't find a JSON Package. > > In
http://www.nntp.perl.org/group/perl.cpan.testers/2008/03/msg1155037.html Show quoted text
> > As so often this failure cannot be reproduced later because the smoker > has installed something else in the meantime. Seems to be a different > logic in the test script and in the dependency declaration. Or
something Show quoted text
> > There are three other testers reports with the same error message. > > Thanks,
ecarroll@occupyboxen:/var/www/dealermade$ perl script/55901 Couldn't instantiate component "Dealermade::View::JSON", "Couldn't find a JSON package. Need XS, JSON, or DWIW at /usr/local/share/perl/5.14.2/Catalyst/View/JSON.pm line 42."Compilation failed in require at /usr/local/share/perl/5.14.2/Module/Runtime.pm line 317. at /usr/local/share/perl/5.14.2/Catalyst/ScriptRunner.pm line 50. ecarroll@occupyboxen:/var/www/dealermade$ perl -MJSON::XS -e1 I'll work on resolving this, I've got it too. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Here is the issue. Just looked into it, and figured it out quickly. I use Syck -- it's the only full featured JSON exporter. I have no intention of leaving Syck. The program generates the error message: "Couldn't find a JSON package. Need XS, JSON, or DWIW" Yet in my YAML conf file I have View::JSON: expose_stash: 'json' json_driver: 'Syck' I suggest we make the error message more verbose and say *what* driver failed to load, patch up now with pull request. https://github.com/EvanCarroll/catalyst-view-json -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
From: dsteinbrunner [...] pobox.com
On Thu Mar 13 02:41:28 2008, ANDK wrote: Show quoted text
> There are three other testers reports with the same error message.
Just ran into this. New perl 5.16.3 install along with Catalyst and other dependencies for the Catalyst app in question. Everything installed but Catalyst::View::JSON. These are the JSON modules that were installed: JSON::Any JSON::MaybeXS JSON::PP Cpanel::JSON::XS I tried installing JSON::XS and this did not help the test pass. Installing JSON however allowed the test to pass. Not sure why ones of the other JSON modules did not get picked up and used.
Subject: Re: [rt.cpan.org #34042] Couldn't find a JSON Package.
Date: Sat, 30 Nov 2013 07:28:11 -0800 (PST)
To: "bug-Catalyst-View-JSON [...] rt.cpan.org" <bug-Catalyst-View-JSON [...] rt.cpan.org>
From: John Napiorkowski <jjn1056 [...] yahoo.com>
I'm pretty sure this is a a problem with JSON::Any which in my mind is being far too clever for its own good.  What version of JSON::Any do you have? Can you try also JSON_ANY_ORDER=JSON cpanm Catalyst::View::JSON and let me know if that helps? john On Wednesday, November 27, 2013 1:46 PM, "dsteinbrunner@pobox.com via RT" <bug-Catalyst-View-JSON@rt.cpan.org> wrote:        Queue: Catalyst-View-JSON Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=34042 > On Thu Mar 13 02:41:28 2008, ANDK wrote: Show quoted text
> There are three other testers reports with the same error message.
Just ran into this.  New perl 5.16.3 install along with Catalyst and other dependencies for the Catalyst app in question.  Everything installed but Catalyst::View::JSON. These are the JSON modules that were installed: JSON::Any JSON::MaybeXS JSON::PP Cpanel::JSON::XS I tried installing JSON::XS and this did not help the test pass. Installing JSON however allowed the test to pass.  Not sure why ones of the other JSON modules did not get picked up and used.
From: Colin Newell
On Sat Nov 30 10:28:23 2013, jjn1056@yahoo.com wrote: Show quoted text
> I'm pretty sure this is a a problem with JSON::Any which in my mind is > being far too clever for its own good.  What version of JSON::Any do > you have? > > Can you try also JSON_ANY_ORDER=JSON cpanm Catalyst::View::JSON > > and let me know if that helps? > > john
Unfortunately @order contains 'JSON' so the JSON_ANY_ORDER= has no effect on proceedings. . = JSON::Any::import('JSON::Any', 'JSON') called from file `lib/Catalyst/View/JSON.pm' line 42 That appears to be the line calling JSON::Any->import($driver); That's defaulted to JSON which I don't install these days, instead preferring the new Cpanel module. It looks like that JSON default was added in 0.18 in 2007 for backwards compatibility. I've created a pull request to fix the test as it already appeared to try to avoid the dependency on JSON. https://github.com/shadowcat-mst/catalyst-view-json/pull/2 I also created one for preventing the attempt to load JSON in the module as that seems to be the core of the problem. https://github.com/colinnewell/catalyst-view-json/commit/9d0240c8283db6616eff5956ea48251a69ea04d6
I'm pretty sure the move to MaybJSON::XS solves this as I don't see errors reported in any recent version on CPAN testers.