Hi Cees -- 

>   my $rm_param = $self->mode_param() || croak("No rm_param() 
> specified");
> 
>   my $rm;
> 
>   # Support call-back instead of CGI mode param
>   if (ref($rm_param) eq 'CODE') {
>           # Get run mode from subref
>           $rm = $rm_param->($self);
>   }
>   # support setting run mode from PATH_INFO
>   elsif (ref($rm_param) eq 'HASH') {
>           $rm = $rm_param->{run_mode};
>   }
>   # Get run mode from CGI param
>   else {
>           $rm = $q->param($rm_param);
>   }
> 
> We could rewrite that like this:
> 
>  my $rm = $self->get_the runmode_for_the_current_request();


How about just using the code ref feature which already exists?:

  $self->mode_param(\&get_the runmode_for_the_current_request);


Refactoring is a fine thing, but I'm concerned about creating Code-TOFU:
A system which is so generalized that it doesn't actually add any value
over just writing what you want from the start.  What does it mean is
every line of code is optional?  Not much.

Rob:  Submit a patch.  I'd like to see what you're proposing, but
talking in abstracts isn't helping your case.  I'm not saying we're
going to accept the patch, but if you have an idea I think code is going
to make more sense than prose.

I am a use-case oriented guy.  Tell me a real thing (not a potential,
imagined thing -- some actual thing you need to do today) you're trying
to do which you can't do, and we'll talk about it.

And, FYI, I always thought the Apache guys over did it with the request
phases.  Considering most people don't understand the difference between
"authentication" and "authorization" and "access", or what the heck a
"fixup" handler is for, citing them as an example isn't doing it for me.


TTYL,

-Jesse-


--
 
Jesse Erlbaum
The Erlbaum Group
[EMAIL PROTECTED]
Phone: 212-684-6161
Fax: 212-684-6226
 

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to