Chromatic wrote at Sat, 27 Jul 2002 18:55:38 +0200:
> On Fri, 26 Jul 2002 13:19:51 -0700, Johan Vromans wrote:
>
>> One of the problems I have with using Test::Builder is that I want to distribute
>packages to
>> systems that do not (necessarily) have a decent version of Test::* installed. Now
>it is easy to
>> include a copy of a suitable version of Test::Builder with the package (provided it
>is not too
>> big). Would it be a good idea to add a provision to Test::Builder that can be
>called, from the
>> Makefile.PL, to display a message like this:
>>
>> The verificiation tests for this package require the Test::Builder package of at
>least version
>> X.Y. You do not seem to have this installed. I have included a copy of
>Test::Builder in this
>> distribution that I can use for testing. Do you want me to install this version of
>> Test::Builder as well?
>>
>> This would help spreading the good stuff.
>
> This idea appeals to me, but I have thought of two drawbacks. The first is minor,
>and it's that I
> don't think Test::Builder should have special logic for installation. It seems that
>this would be
> better in CPANPLUS. It could then be something more modules would be able to use.
>
> The second drawback is that the bundled version may be out of date. This is also
>mostly minor, as
> the prompt will only happen if the currently installed version is older (or not
>installed).
> There's a minor possibility of distributing buggy code and not updating the bundled
>file
> appropriately -- dependencies help with that.
There's a third drawback not mentioned yet.
Allthough the user gets the option to decide whether she/he wants to install
the modules needed for testing,
she/he already *had* to download these modules.
Thinking to a time, when everybody would use this solution,
every module would bring e.g. Test::Builder, Test::Exception, ... with itself,
that would be wasted net traffic,
and following modules with many prequesited modules,
will need a lot more time to download and install.
A good solution from my point of view would be,
if you could use Makefile.PL to do this job,
perhaps similar to
'PREREQ_PM' => { ... }
a
'PREREQ_TEST_PM' => { ... }
statement,
warning the user that the test can't be done without a specific module,
and the module CPAN could ask whether to install.
Greetings,
Janek