At the moment the only idea I have is to have 2 different sets of APIs which underneath will call the same core functions. e.g.:
skip_have_... have_...
the only difference is that skip will also push the reason, and non-skip won't. But may be there are better ideas.
I don't think that is necessary. plan() resets @SkipReasons at the end, so
the only place it would come into play is if you call have_* methods before
plan().
Which is exactly what your patch is trying to do. In which case plan() may confusingly report 2.0.49 as a missing requirement, even though it is not. You needed that check only for a sub-test. A user will then try to satisfy the requirement which it is not.
Moreover, some may use this function without calling plan at all, in which case it may affect a totally different test, since @SkipReasons is a global.
calls made after, such as skip(have_cgi, ...) would not interfere. and I never like the 'use constant' bit anyway ;)
What bit are you talking about? This one?
use constant APACHE_2_0_49 => have_apache_version('2.0.49');
It doesn't make any difference, if you move that call until after plan(), you will affect the next test if it skips, reporting an extra requirement which is not correct.
__________________________________________________________________ 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
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
