On Mon, 17 Sep 2001, Stas Bekman wrote:

> > - use better API naming s/warn/warn_type/. it's not clear what 'warn' is.
> 
> I still don't like the use of raw numbers 1, 2 for
> Apache::TestConfig::genwarning. We try to make the code self-documenting,
> so let's do that.
> 
> May I add:
> 
>   use constant WARN_STYLE_NONE => 0;
>   use constant WARN_STYLE_PERL => 1;
>   use constant WARN_STYLE_C    => 2;

that would be fine.
 
> or if you don't mind, adding a dependency on CPAN's enum.pm, which we may
> find useful in more places:

i do mind, but i think you already know that :-)
 
> Since we may find useful the context of NONE, PERL, C in other cases, we
> may as well define:
> 
>   use constant NONE => 0;
>   use constant PERL => 1;
>   use constant C    => 2;

just go with the WARN_STYLE_ for now.  if it turns out we need those other
constants, the WARN_STYLE_* can be implemented in terms of those:

use constant WARN_STYLE_PERL => Apache::Test::PERL;




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to