Skip Menu |
 

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

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

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

Bug Information
Severity: (no value)
Broken in: 0.21
Fixed in: (no value)

Attachments
catalyst-view-json-0.21-update-bundled-json.patch



Subject: JSON 2.04 and bundled JSON cause test failures
Download (untitled) / with headers
text/plain 1.8k
Upon upgrading to JSON 2.04 and JSON::Any 1.15, I noticed that Catalyst::View::JSON has test failures due to the inc-bundled version of JSON: [16:34:31 dwc@adora ~/Catalyst-View-JSON-0.21]$ make test cp lib/Catalyst/View/JSON.pm blib/lib/Catalyst/View/JSON.pm cp lib/Catalyst/Helper/View/JSON.pm blib/lib/Catalyst/Helper/View/JSON.pm PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00_compile....ok t/01_server.....Couldn't instantiate component "TestApp::View::JSON", ""-support_by_pp" is not exported by the JSON module "-no_export" is not exported by the JSON module Can't continue after import errors at /usr/lib/perl5/vendor_perl/5.8.8/JSON/Any.pm line 41" at /usr/lib/perl5/vendor_perl/5.8.8/Catalyst/Test.pm line 90 Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Catalyst/Test.pm line 90. BEGIN failed--compilation aborted at t/01_server.t line 9. # Looks like your test died before it could output anything. t/01_server.....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-38 Failed 38/38 tests, 0.00% okay Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/01_server.t 255 65280 38 76 1-38 Failed 1/2 test scripts. 38/39 subtests failed. Files=2, Tests=39, 1 wallclock secs ( 0.56 cusr + 0.08 csys = 0.64 CPU) Failed 1/2 test programs. 38/39 subtests failed. make: *** [test_dynamic] Error 255 (See also the three most recent cpan-testers reports.) Attached is a patch to update the bundled version and to update the tests to reflect the deprecation of JSON::jsonToObj in favor JSON::from_json.
Subject: catalyst-view-json-0.21-update-bundled-json.patch
=== Makefile.PL ================================================================== --- Makefile.PL (revision 16898) +++ Makefile.PL (local) @@ -4,9 +4,9 @@ all_from 'lib/Catalyst/View/JSON.pm'; build_requires 'Test::More'; -build_requires $_ for qw( JSON JSON::Parser JSON::Converter ); +build_requires 'JSON', 2.04; -requires 'JSON::Any', 1.11; +requires 'JSON::Any', 1.15; requires 'Catalyst', 5.60; auto_include; === t/01_server.t ================================================================== --- t/01_server.t (revision 16898) +++ t/01_server.t (local) @@ -34,7 +34,7 @@ is( $response->code, 200, 'Response Code' ); is_deeply( [ $response->content_type ], [ 'application/json', 'charset=utf-8' ] ); - my $data = JSON::jsonToObj($response->content); + my $data = JSON::from_json($response->content); is $data->{json_foo}, "bar"; is_deeply $data->{json_baz}, [ 1, 2, 3 ]; ok ! $data->{foo}, "doesn't return stash that doesn't match json_"; @@ -48,7 +48,7 @@ is( $response->code, 200, 'Response Code' ); is_deeply( [ $response->content_type ], [ 'application/json', 'charset=utf-8' ] ); - my $data = JSON::jsonToObj($response->content); + my $data = JSON::from_json($response->content); is_deeply( $data, [1, 2, 3] ); } @@ -63,7 +63,7 @@ my $body = $response->content; ok $body =~ s/^foobar\((.*?)\);$/$1/sg, "wrapped in a callback"; - my $data = JSON::jsonToObj($body); + my $data = JSON::from_json($body); is $data->{json_foo}, "bar"; is_deeply $data->{json_baz}, [ 1, 2, 3 ]; ok ! $data->{foo}, "doesn't return stash that doesn't match json_";
Subject: Re: [rt.cpan.org #32212] JSON 2.04 and bundled JSON cause test failures
Date: Wed, 9 Jan 2008 14:37:03 -0800
To: bug-Catalyst-View-JSON [...] rt.cpan.org
From: "Tatsuhiko Miyagawa" <miyagawa [...] gmail.com>
Download (untitled) / with headers
text/plain 2.3k
Applied (now unbundled JSON and skip the test if it's not installed) and shipped to CPAN. Thanks, On 1/9/08, Daniel Westermann-Clark via RT <bug-Catalyst-View-JSON@rt.cpan.org> wrote: Show quoted text
> > Wed Jan 09 16:43:16 2008: Request 32212 was acted upon. > Transaction: Ticket created by DANIELTWC > Queue: Catalyst-View-JSON > Subject: JSON 2.04 and bundled JSON cause test failures > Broken in: 0.21 > Severity: (no value) > Owner: Nobody > Requestors: danieltwc@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32212 > > > > Upon upgrading to JSON 2.04 and JSON::Any 1.15, I noticed that > Catalyst::View::JSON has test failures due to the inc-bundled version of > JSON: > > [16:34:31 dwc@adora ~/Catalyst-View-JSON-0.21]$ make test > cp lib/Catalyst/View/JSON.pm blib/lib/Catalyst/View/JSON.pm > cp lib/Catalyst/Helper/View/JSON.pm blib/lib/Catalyst/Helper/View/JSON.pm > PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t > t/00_compile....ok > > t/01_server.....Couldn't instantiate component "TestApp::View::JSON", > ""-support_by_pp" is not exported by the JSON module > "-no_export" is not exported by the JSON module > Can't continue after import errors at > /usr/lib/perl5/vendor_perl/5.8.8/JSON/Any.pm line 41" at > /usr/lib/perl5/vendor_perl/5.8.8/Catalyst/Test.pm line 90 > Compilation failed in require at > /usr/lib/perl5/vendor_perl/5.8.8/Catalyst/Test.pm line 90. > BEGIN failed--compilation aborted at t/01_server.t line 9. > # Looks like your test died before it could output anything. > t/01_server.....dubious > > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 1-38 > Failed 38/38 tests, 0.00% okay > Failed Test Stat Wstat Total Fail List of Failed > ------------------------------------------------------------------------------- > t/01_server.t 255 65280 38 76 1-38 > Failed 1/2 test scripts. 38/39 subtests failed. > Files=2, Tests=39, 1 wallclock secs ( 0.56 cusr + 0.08 csys = 0.64 CPU) > Failed 1/2 test programs. 38/39 subtests failed. > make: *** [test_dynamic] Error 255 > > (See also the three most recent cpan-testers reports.) > > Attached is a patch to update the bundled version and to update the > tests to reflect the deprecation of JSON::jsonToObj in favor > JSON::from_json. > >
-- Tatsuhiko Miyagawa


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.