Using have_ macros for non-plan() usage should be avoided, since it populates the SKIP messages array and if later the test is skipped, for a different reason it'll misleadingly tell the user that LWP was also a requirement for that test (which quite possibly could be what we want).
We need to fix that in general (since this issue is recurrent) and have a better way to handle requirements check+skip and only requirements check. Ideas?
have_foo('bar', 1); # don't populate @SkipReason
or
check_foo('bar'); # same as have_foo but don't populate @SkipReason
or a combination of both (where check_foo() is a wrapper around have_foo($a,1) and we keep the interface undocumented).
I'm in favor of having two distinct base names in order to keep things intuitive -- it's hard to remember what the extra argument in have_foo('bar', 1) means: should 1 add skip messages, or should it not...
My suggestion for the names selection:
have_foo # don't populate @SkipReason need_foo # populate @SkipReason
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;
or call it require_foo, or want_foo, or desire_foo, etc...
-- __________________________________________________________________ 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