On Sat, 2005-09-10 at 20:21 +0200, Tels wrote:

> On Saturday 10 September 2005 19:27, chromatic wrote:

> > You can always just not run the tests and hope that things work.  If
> > the tests don't add any value to you, ignore them.

> They add some value to me (show that at least something works).

Either they're valuable enough that you install their prerequisites or
they're not.

> Btw, my graph-perl-usage project is about the same topic: don't load 
> unnec. modules.

*You* don't get to decide which modules *I* use are unnecessary.  You
don't know what problem I'm trying to solve, what my constraints are,
and how I want to solve those problems.  When I give away code I write,
I hope that it's valuable to other people.  I'm open to suggestions, but
I'm only going to go so far to make it useful to other people,
especially if those suggestions are to duplicate existing, well-tested
code that I don't have to maintain or to optimize for constraints I
don't have and don't believe in.

If I mark a module with "build_requires" in my Build.PL file, I know
that that means and I do it for a reason.  If you don't want to run the
tests, you don't have to install that module.  Life's good.

I don't think the answer is "don't use modules" or, as in the p5p
discussion to which I linked, "add these simple extra four lines of code
to every module to prevent using another module which already solves
this problem".  Some of the problems the testing modules solve are
difficult enough that it takes a lot of us to get them right and I don't
have a lot of hope that any one of us could get it right individually
every time we retype the same sort of code.

Test::Exception, for example, is a lot more valuable to me than the way
I tested exceptions before the module existed.  It has a better
interface, has more features, and requires me to use much less code.
The same goes for Test::MockObject, Test::Class, Test::LongString,
Test::Builder::Tester, ....

Code reuse is not the problem.  Manual installation is the problem.

Maybe there could be some sort of bundle installer that grabs a module
and all of its dependencies for people who do offline installations.
That might be a great thing.

-- c

Reply via email to