Config::JSON dependencies

sigzero on 2007-07-10T12:39:22

This may be just me and if it is correct me please. I was looking at Config::JSON and thinking "this looks good". Then I look at its dependencies:

Test::Perl::Critic Test::Pod::Coverage version JSON Test::Deep Test::Pod

JSON and version I can understand but why do I "have to have" those "Test::" modules to install the dang thing without forcing it?


Yes, annoying.

educated_foo on 2007-07-10T14:00:26

Report it as a bug -- most people seem willing to fix this issue.

Reasonable is in the eye of the beholder

jjore on 2007-07-10T16:57:40

Generally I think I'm being extra nice if I make test dependencies optional. I only do that when I'm really feeling magnanimous. I would suppose other people might feel even less charitable toward the idea of optional testing prerequisites.

Re:Reasonable is in the eye of the beholder

sigzero on 2007-07-10T17:12:19

Shouldn't most of that "testing" by on the author's side of the house anyway and not on the users? I could care less if the authors POD is correct but to make that a dependency is not good. The same with Test::Perl::Critic...the end user shouldn't care a hoot about that.

Re:Reasonable is in the eye of the beholder

jjore on 2007-07-10T19:06:10

The set of tests that need modules might include the set of tests that are only important on the author's box but in my experience frequently cover things that are important to users.

That is, if you're using one of my modules. Shrug. You really oughta install the tests. Or I suppose you could just skip all tests but that sucks.

Re:Reasonable is in the eye of the beholder

sigzero on 2007-07-10T22:21:38

I don't mind running the tests except when I have to install Test:: modules that I really shouldn't need to. I don't think a user would need Test::Perl::Critic at all.

I guess mileage varies but I don't think an author should force something like that.

It's packaged badly

Alias on 2007-07-10T23:40:23

Tests that do not impact on functionality should always be optional, for two reasons.

Firstly, there's the issue of code bloat.

Test::Perl::Critic in particular has fairly serious dependencies (since it needs to install PPI).

But secondly, it results in false-positive failures.

That is, by making a test script for say POD checking, you are essentially saying that the POD for a module is SO important, if for some unknown reason there's a single small bug in the POD, you as the author would rather have them not use that module at all.

You should always assume that the user will not install the module if any of the tests fail (it's true for the most part).

And then there's your exposure to bugs.

OK, make that THREE reasons.

Every time I release a new version of PPI, it seems to break Perl::Critic (which is why I co-ordinate releases with them in advance now).

Any little tiny failure in any of the dependencies for those additional Test:: modules, that are entirely unrelated to the functionality of the module, and all of a sudden they can't use the module.

Re:It's packaged badly

DAxelrod on 2007-07-12T00:53:47

Tests that do not impact on functionality should always be optional, for two reasons.

OK, make that THREE reasons.
Nobody expects the CPANish imposition! :)

Changed in 1.1.1

rizen on 2007-08-17T17:06:12

To be honest, I really didn't think about the tests having an impact on users. I think tests are highly important, so I included them.

Anyway, I've moved all the author related tests out of the t folder so that they won't impact users installing Config::JSON from CPAN.