On Tue, 6 Jun 2006 7:01 am, Geoffrey Young wrote:
>> -my %prereq = ('Apache::Test' => "1.23");
>> +my %prereq = ('Apache::Test' => "1.23",
>> + 'LWP::UserAgent' => 0);
>
> ok, I'll go off on a little rant here...
>
> I have this thing about making libraries required only for testing part
> of the prereqs for a module - you're essentially saying that
> Apache::Dispatch _requires_ Apache-Test and LWP, and so if someone
> ignores the PREREQ warning and runs the tests anyway and they fail
> users
> are left scratching their heads. there are other reasons I'm against
> it
> as well, but I'll spare you the ideology talk...
I agree with the ideology here, I built A::D with a fresh 5.8.8 and the
test suite did not function properly without LWP::UA, so I put that hack
in until I could come up with something better, my bad.
> anyway, if you're interested I think the proper approach is this
>
> o adjust your Makefile.PL such that it doesn't even create a 'test'
> target if Apache::Test isn't found
>
> o adjust each test such that it skips unless need_lwp()
I will check these out tonight when I get home from work and replace the
hack with one. I dug through the Apache::Test docs/source and saw
mention of a fallback method for an a::t user agent when lwp is not
present, but have not grasped the specifics yet.
> you can see an example of the first thingy here
>
> http://search.cpan.org/src/GEOFF/WebService-CaptchasDotNet-0.06/Makefile.PL
>
> just food for thought - I'm not going to veto a release or anything if
> you don't do it. but it might be a good exercise in well implemented
> testing - by understanding exactly what your tests require (lwp,
> mod_foo, etc) then you're one step closer to avoiding test failures
> that
> fail because of an improperly configured environment rather than
> Apache-Dispatch code, and that makes your support life easier :)
Any concerns you have please keep mentioning them, I don't want this
going out the door with anything you are not 100% comfortable with. I
want this module to use best testing practices, but sometimes the "just
make it work" reflex from the day job kicks in and I slip :)
> anyway, just my $0.02...
very much appreciated, thanks for the continued help.
|