Re: minor bugfix for Apache::Test

[prev] [thread] [next] [Date index for 2005/01/26]

From: Geoffrey Young
Subject: Re: minor bugfix for Apache::Test
Date: 12:42 on 26 Jan 2005

Torsten Foertsch wrote:
> Hi,
> 
> while trying out Apache-IncludeHook-2.00_02

I haven't touched that in a while, so if you see it failing to work on
newish apache just holler.  other than that, I hope you like it :)

> I stumbled across the lack of 
> Apache::Test::have().

hmm... is have() really required?

what need() provides is a way to aggregate tests in a single call to plan(),
allowing you to see "all skipped - foo not available, bar not available." so
you can satisfy all the prerequisites at once so the test file will run.
the "foo not available, bar not available" message is aquired because need()
populates a global variable behind the scenes and passes that to plan() (in
essence anyway).

have(), by definition of being a have*() variant, would not manipulate some
global variable.  so

  if (have have_cgi, have_php) { ... }

would be functionally equivalent to

  if (have_cgi && have_php) { ... }

while the same cannot be said for need() when used in plan().

so, I don't see a compelling reason to add have().  in fact, I think we left
it out on purpose if you check the archives.

--Geoff

minor bugfix for Apache::Test
Torsten Foertsch 10:13 on 26 Jan 2005

Re: minor bugfix for Apache::Test
Geoffrey Young 12:42 on 26 Jan 2005

Re: minor bugfix for Apache::Test
Torsten Foertsch 13:22 on 26 Jan 2005

Re: minor bugfix for Apache::Test
Geoffrey Young 14:28 on 26 Jan 2005

Re: minor bugfix for Apache::Test
Geoffrey Young 14:30 on 26 Jan 2005

Re: minor bugfix for Apache::Test
Torsten Foertsch 15:06 on 26 Jan 2005

Re: minor bugfix for Apache::Test
Geoffrey Young 18:00 on 26 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52