Skip Menu |

This queue is for tickets about the Proch-N50 CPAN distribution.

Report information
The Basics
Id: 129392
Status: resolved
Priority: 0/
Queue: Proch-N50

People
Owner: PROCH [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc: DBOOK [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.03
Fixed in: 0.04



Subject: t/13_json.t fails (if JSON.pm is not installed?)
On some of my smokers the test suite fails: ... You tried to plan twice at t/13_json.t line 7. # Looks like your test exited with 2 before it could output anything. t/13_json.t ............... Dubious, test returned 2 (wstat 512, 0x200) Failed 6/6 subtests ... Probably this happens if JSON.pm is not installed, probably the skip() was not done right.
Thanks for the report. Yes, I'm trying to avoid forcing JSON installation to allow easier portability of this module in some legacy systems, but still would like to cover json in the unit tests. I'm trying to fix this behaviour. Thanks On Thu May 02 02:09:43 2019, SREZIC wrote: Show quoted text
> On some of my smokers the test suite fails: > > ... > You tried to plan twice at t/13_json.t line 7. > # Looks like your test exited with 2 before it could output anything. > t/13_json.t ............... > Dubious, test returned 2 (wstat 512, 0x200) > Failed 6/6 subtests > ... > > Probably this happens if JSON.pm is not installed, probably the skip() > was not done right.
On Fri May 03 13:14:28 2019, PROCH wrote: Show quoted text
> Thanks for the report. > Yes, I'm trying to avoid forcing JSON installation to allow easier > portability of this module in some legacy systems, but still would > like to cover json in the unit tests. > I'm trying to fix this behaviour.
Here are two easy options: You can use JSON::PP instead, which is core since Perl 5.14, but slow for general use (you should still declare your prerequisite on this, but it will be skipped when people already have it). Or, you can use Test::Needs to skip that test file if JSON is not installed. You will instead need a test-requires dependency on Test::Needs, though.
As suggested the modules itself now relies on JSON::PP as the objects will always be small. On Fri May 03 17:51:14 2019, DBOOK wrote: Show quoted text
> On Fri May 03 13:14:28 2019, PROCH wrote:
> > Thanks for the report. > > Yes, I'm trying to avoid forcing JSON installation to allow easier > > portability of this module in some legacy systems, but still would > > like to cover json in the unit tests. > > I'm trying to fix this behaviour.
> > Here are two easy options: You can use JSON::PP instead, which is core > since Perl 5.14, but slow for general use (you should still declare > your prerequisite on this, but it will be skipped when people already > have it). > > Or, you can use Test::Needs to skip that test file if JSON is not > installed. You will instead need a test-requires dependency on > Test::Needs, though.