Stas Bekman wrote:
[...]
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 name...

Sorry, that last para is contradicting itself. So again, I suggest to keep have_lwp, and remove the skip functionality from it, e.g.:


  # Always allow redirection.
  my $redir = have_lwp ? [qw(GET HEAD POST)] : 1; # no skip
  Apache::TestRequest::user_agent(reset => 1,
                                    requests_redirectable => $redir);

but having a new function that will be have_foo+skip:

plan tests => 5, need_lwp, need_cgi, need_php;

or:

plan tests => 5, want ['cgi', 'lwp'];

so require_ won't work too, as we will need a standalone word too. I think need_ or want_, or must_ pretty intuitive in the plan context.

or may be add must_have_*, so have_* is for checking, and must_have_* is checking and requiring. may be it's too long to type, but I like it.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to