Andy Lester wrote:
> On Tue, Nov 30, 2004 at 10:36:00AM -0500, Geoffrey Young ([EMAIL PROTECTED]) 
> wrote:
> 
>>anyway, the point of this exercise is to present a few different options for
>>augmenting Test::More's plan().  personally, I really, really like the way
>>Apache::Test::plan() works,
> 
> 
> I do, too, and I've been wanting this since I found out about how it
> works at YAPC.  It just fell off my radar.

:)

> I would just ask that it be done as
> 
>    plan tests => $n, @list_of_conditions_to_be_met

I think that's possible.

> 
> I would hate to see the 3rd+ parms turn into a meta-language of stuff
> like 
> 
>    plan tests => 14, needs => "Apache::Wango 1.14";

in case it wasn't clear from my example before, need() is a function A-T
provides, not a new argument to plan().   so the example could be more clear as

  # skip unless we can do SSL in real time
  plan tests => 3, need(need_lwp, need_module('LWP::Protocol::https'));

which is different than

  plan tests => 3, (need_lwp && need_module('LWP::Protocol::https'));

in that the former allows the skip message to build up, while the latter
shows only the first condition to fail.

but I guess need() wouldn't be needed at all if the final argument were
allowed to be an array.  I'm not sure why it wasn't implemented that way in
the first place, come to think of it.  probably because we are passing off
to Test.pm, where plan() expects a hash instead of just ($self, $cmd, $arg).

--Geoff

Reply via email to