perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: a new stacked handlers paradigm
Date Fri, 06 Jun 2003 13:31:54 GMT
> Something like that (again just an idea). Perhaps we should really 
> create a struct:
> 
> typedef enum {
>     VOID,
>     RUN_FIRST,
>     RUN_ALL
> } modperl_hook_run_mode_e
> 
> struct modperl_hook_t {
>     const char *desc;
>     modperl_hook_run_mode_e run_mode;
> };
> 
> and now we can kill all the modperl_handler_desc_ functions and just 
> return this struct from modperl_hooks.c. Later on we might fold in more 
> information. Do you think anything else should be added there?

would those MP_ constants be helpful, such as MP_HANDLER_TYPE_PER_DIR and 
MP_HEADER_PARSER_HANDLER?  it's hard to tell without working on an 
implementation.

> 
> Or is it considered a bad practice to create a struct for a static data 
> that never changes?

I have no idea, not being a real C guy.

if we proceed this way it's probably going to take me a while to come up 
with another patch, since I'll need to do some reading first to fill in the 
gaps in my C :)

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message