httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache
Date Sat, 31 Jul 2004 16:46:13 GMT
David Wheeler wrote:
> On Jul 31, 2004, at 1:14 AM, Stas Bekman wrote:
>> so, have_foo is intuitive to be used anywhere in the code, and plan 
>> now will look like:
>> plan tests => 5, need_lwp, need_cgi, need_php;
> I like this, but isn't it putting the onus of change on module owners 
> and introducing the likelihood of unexpected test failures when module 
> owners don't realize that they need to change their C<use> lines from 
> have_* to need_*?
> Perhaps we leave have_* with its current semantics, but then add "got_*" 
> for the new semantics to be used anywhere in the code:
>   # Always allow redirection.
>   my $redir = got_lwp ? [qw(GET HEAD POST)] : 1;
>   Apache::TestRequest::user_agent(reset => 1,
>                                     requests_redirectable => $redir);

to me, got and have are exactly the same thing. How are you going to 
remember which one to use when?

Authors of the existing tests don't have to change anything, have_foo 
will work just the same, but won't add the skip reason anymore. This 
won't make affect the existing tests in any way, rather than not 
printing the reason for a tests being skipped.

But, yes, the transition could be made 100% perfect, by keeping have_ as 
it is, and adding a new interface which doesn't add the skip reason. But 
we need to find an unambiguous name for it. skip_foo will be good, but 
we have a general function have(), which can't be replaced with skip(). 
So may be want_foo() is a better choice. Or may be you have a better 

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message