[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Re: Q: CGI::Application::Dispatch V 2.00_03



Mark Stosberg wrote:
> On 2006-02-13, Ron Savage <suppressed> wrote:
> 
>>Hi Michael
>>
>>I'm beginning to understand this neat module, and have a couple of comments:
>>
>>(1)
>>Line 330:
>>    $app->mode_param(sub { return $rm }) if( $rm );
>>
>>What happens in my apps when I already have sub setup containing:
>>
>>	$self -> mode_param(\&setup_mode);
> 
> 
> Right now, your app breaks. Here's how I solved it for my own case,
> which could be come a more formal part of the dispatcher. 
> 
> I added a default param to the dispatcher of
> 
>     using_dispatcher_p => 1,
> 
> ( _p denotes a boolean ). 

Why 'p' for boolean, just out of curiosity?

> Then in my superclass:
>  
>  # Work with or withour dispatcher
>  unless ($self->param('using_dispatcher_p')) {
>          $self->mode_param(
>             path_info=> 1,
>             param =>'rm'
>         );
>  }
> 
> I propose that the dispatcher include a flag like itself, and then 
> document an example use like the one above. 

Yeah, I agree that Dispatch needs to set some sort of flag that it passes into
PARAMS to indicate that it's being used. I can imagine it being important in
some cases. Patches (or even better "commits") are welcome :)

-- 
Michael Peters
Developer
Plus Three, LP


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


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.