httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [PATCH] new need functions
Date Mon, 02 Aug 2004 18:10:53 GMT

> I'd suggest to simply explain that there are have_ and need_ functions
> at the beginning of that section that explains need_* ones. And one
> should use need_* inside plan(), because of the skip messages. Otherwise
> use have_*.

ok, done.

> Please don't commit w/o the docs. Once it's committed, the docs are most
> likely will be forgotten.

of course, no reminder necessary :)

> You don't want to remember to update two places when you add new
> functions. So there should be a need* functions array and when you
> populate the @EXPORT list you generate the have* list. Also there should
> be no have() function, but only need(). The rest map need_* => have_*.

good idea, done.

> Next you can use that have* list to generate the actual functions on the
> fly, similar to the generation of the subs similar to log levels subs in
> Apache::TestTrace. So you don't really need AUTOLOAD. It'll take the
> same amount of code w/o AUTOLOAD.

except that the autoload code is already written :)

>> +sub AUTOLOAD {
>> +
>> +    use vars qw($AUTOLOAD @SkipReasons);
> haven't you declared the two at the top of already?

sorry, leftover debugging foo.

> why not just:
>      local @SkipReasons;
>      return $cv->(@_);

yeah, that's better.

new patch attached.


View raw message