On Jul 31, 2004, at 9:46 AM, Stas Bekman wrote:
to me, got and have are exactly the same thing. How are you going to remember which one to use when?
Yes, I will. :-)
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.
Isn't that rather significant?
Significant, yes, but not critical. Most users aren't going to bother to figure out why tests were skipped and install optional modules required for the tests.
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...
I thought I did. Hrm...
Sorry, I was asking others to suggest too :)
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.
That's similar to have in the same way got is. Are you going to remember which is which?
Yes, because one suggests a requirement and the other tells you what you have. While essentially the two are the same, the context is different. It's almost like 'require Foo' vs. 'eval { require Foo }'.
I guess losing the skip message by making need_ functions that replace the existing have_ functions is okay. It's most important that tests continue to pass...
They will.
-- __________________________________________________________________ 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